repos: - repo: https://github.com/gitleaks/gitleaks rev: v8.30.1 hooks: - id: gitleaks - repo: local hooks: # AGENTS.md 硬性约束 1、3:即使 git add -f 也不能提交本地材料。 - id: local-only-paths name: 本地材料(data、library、answers、work、runs、reference、models)和 .env 不进提交 language: fail entry: "禁止提交本地材料:" files: '^(data|library|answers|work|runs|reference|reference-pdf|models)(/|$)|(^|/)\.env(\.[^/]+)?$' exclude: '^\.env\.example$' types_or: [file, symlink] # 使用 uv.lock 中的同一版本,不另装一份 ruff。 - id: ruff-format name: ruff format --check language: system entry: uv run --frozen ruff format --check --force-exclude types_or: [python, pyi]