# Pre-commit hooks for backend quality and security checks. # # Install: # cd backend && uv run pre-commit install # # Run manually on all files: # cd backend && uv run pre-commit run --all-files # # Skip hooks temporarily: # git commit --no-verify # repos: # ── Code Quality ────────────────────────────────────────────────────────── - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.14.4 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] - id: ruff-format # ── General File Hygiene ────────────────────────────────────────────────── - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - id: check-toml - id: check-merge-conflict - id: check-added-large-files args: [--maxkb=500] - id: debug-statements # ── Security ────────────────────────────────────────────────────────────── - repo: https://github.com/Yelp/detect-secrets rev: v1.5.0 hooks: - id: detect-secrets args: ['--baseline', '.secrets.baseline'] exclude: | (?x)^( .*\.lock$| .*\.svg$ )$