# See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks # Adapted from terraphim-ai pre-commit config for infrastructure project default_language_version: python: python3.12 repos: # General code quality hooks - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: - id: trailing-whitespace name: Trim trailing whitespace - id: end-of-file-fixer name: Fix end of files - id: check-yaml name: Check YAML syntax - id: check-json name: Check JSON syntax - id: check-case-conflict name: Check for case conflicts - id: check-merge-conflict name: Check for merge conflicts - id: detect-private-key name: Detect private keys - id: check-added-large-files name: Check for large files args: ['--maxkb=1000'] # Secret detection - repo: https://github.com/Yelp/detect-secrets rev: v1.5.0 hooks: - id: detect-secrets name: Detect secrets args: ['--baseline', '.secrets.baseline'] exclude: .*\.template$|.*\.sample$ description: "Detect secrets in staged code" # Global exclusions exclude: | (?x)( ^\.cachebro/.* )