Files
pet-project-server/lefthook.yml
Anton Vakhrushev 1a98aa504c
Some checks failed
Linting / YAML Lint (push) Successful in 9s
Linting / Ansible Lint (push) Failing after 28s
increase verbosity
2026-01-02 20:30:45 +03:00

36 lines
893 B
YAML

# Refer for explanation to following link:
# https://lefthook.dev/configuration/
glob_matcher: doublestar
templates:
av-hooks-dir: "/home/av/projects/private/git-hooks"
pre-commit:
jobs:
- name: "format python"
glob: "**/*.py"
run: "black --quiet {staged_files}"
stage_fixed: true
- name: "mypy"
glob: "**/*.py"
run: "mypy {staged_files}"
- name: "yamllint"
glob: "**/*.{yml,yaml}"
run: "uv run yamllint --config-file .yamllint.yml --format colored {staged_files}"
- name: "ansible-lint"
glob: "**/*.{yml,yaml}"
exclude:
- ".gitea"
run: "uv run ansible-lint --profile production --offline -- {staged_files}"
- name: "gitleaks"
run: "gitleaks git --staged"
- name: "check secret files"
run: "python3 {av-hooks-dir}/pre-commit/check-secrets-encrypted-with-ansible-vault.py"