Files
playbooks/.pre-commit-config.yaml
T
tanshu 2aab1aec1e Add secret scanning, layout checks, and a --changed mode
gitleaks runs before each commit and in CI, with known values in a redacted baseline. The layout check rejects empty readmes and main.yml role entrypoints. --changed lints only the YAML files that differ from HEAD.
2026-10-18 21:53:29 +05:30

34 lines
905 B
YAML

---
# Local hooks, same checks as CI. Enable with:
# pre-commit install
# pre-commit install --hook-type commit-msg
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: [--allow-multiple-documents]
- id: check-added-large-files
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
- repo: https://github.com/ansible/ansible-lint
rev: v24.7.0
hooks:
- id: ansible-lint
- repo: local
hooks:
- id: gitleaks
name: gitleaks
entry: scripts/check-secrets.sh --staged
language: script
pass_filenames: false
- id: commit-message
name: commit message
entry: scripts/check-commit-msg.sh
language: script
stages: [commit-msg]