chore(pre-commit): add missing hooks for TOML, Python, merge conflicts, secrets, and meta-validation

## Why
Five gap areas were identified when auditing the config against tracked file extensions and the hooks reference:
- No TOML validator despite 2 `.toml` files tracked
- No Python AST check despite 10 `.py` files tracked
- No merge-conflict marker detection
- No PEM private key block detection (gitleaks covers high-entropy strings but not raw PEM)
- No meta-validation to catch hooks that match no files or useless exclude patterns

## Impact
All five new hooks pass on `--all-files` run.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P87CiC58Ru2PPWYTeXtjHT
This commit is contained in:
2026-06-28 09:07:50 +00:00
parent c2e749fe7c
commit 098fc7315e

View File

@@ -31,6 +31,14 @@ repos:
stages: ['pre-commit']
- id: trailing-whitespace
stages: ['pre-commit']
- id: check-merge-conflict
stages: ['pre-commit']
- id: detect-private-key
stages: ['pre-commit']
- id: check-toml
stages: ['pre-commit']
- id: check-ast
stages: ['pre-commit']
- repo: local
hooks:
@@ -88,3 +96,8 @@ repos:
fi
fi
done
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes