my-homelab-configs/.pre-commit-config.yaml

56 lines
1.2 KiB
YAML

default_language_version:
python: python3.13
repos:
- repo: local
hooks:
- id: ruff
name: ruff
entry: ruff check
language: system
types: [python]
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
name: ruff-format
entry: ruff format
language: system
types: [python]
- repo: local
hooks:
- id: shellcheck
name: shellcheck
entry: shellcheck
language: system
types: [shell]
- repo: local
hooks:
- id: terraform_fmt
name: terraform_fmt
entry: tofu fmt -recursive
language: system
files: \.(tf|hcl)$
- id: terraform_validate
name: terraform_validate
entry: tofu validate
language: system
pass_filenames: false
- repo: local
hooks:
- id: ansible-lint
name: ansible-lint
entry: ansible-lint
language: system
types: [yaml]
files: \.(yaml|yml)$
- repo: local
hooks:
- id: gitleaks
name: gitleaks
entry: gitleaks detect --no-git
language: system
pass_filenames: false