From 098fc7315e3f5a7655e754b46c1f55f19baebce1 Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Sun, 28 Jun 2026 09:07:50 +0000 Subject: [PATCH] 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 Claude-Session: https://claude.ai/code/session_01P87CiC58Ru2PPWYTeXtjHT --- .pre-commit-config.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c72cbf3..ae6d0d6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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