Files
Kamino/.pre-commit-config.yaml
T
Defame1297andClaude Sonnet 5.5 42ad8de88f fix(ci): correct three review findings on the ruff and collections change
ruff.toml described the older E/F default rule set, which ruff 0.17 widened. The ansible-lint hook now also runs when requirements.yml changes, so a pin bump in a partial commit is linted. The Renovate post-upgrade note names requirements.yml among the image inputs.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
2026-11-14 14:04:33 +00:00

101 lines
3.4 KiB
YAML

default_install_hook_types: [pre-commit, commit-msg]
repos:
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.4.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
- repo: https://github.com/gitleaks/gitleaks
rev: v8.30.1
hooks:
- id: gitleaks
stages: ['pre-commit']
- repo: https://github.com/adrienverge/yamllint
rev: v1.38.0
hooks:
- id: yamllint
args: [--strict]
stages: ['pre-commit']
# Python and shell scripts under scripts/ and tests/scripts/ (#112). ruff.toml holds the
# configuration. No --fix: a finding fails the hook instead of rewriting files in CI.
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.17.5
hooks:
- id: ruff-check
stages: ['pre-commit']
- id: ruff-format
stages: ['pre-commit']
# shellcheck-py ships the shellcheck binary as a wheel, so no system package is needed.
# Default severity, no .shellcheckrc. actionlint (below) covers the run: blocks of workflows.
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.11.0.1
hooks:
- id: shellcheck
stages: ['pre-commit']
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-toml
stages: ['pre-commit']
- id: check-merge-conflict
stages: ['pre-commit']
# Blocking. .gitea/actionlint.yaml declares the runner labels. The workflows use the
# github.* contexts (Gitea aliases them), because actionlint does not know gitea.*.
# actionlint runs shellcheck over run: blocks when shellcheck is on PATH.
- repo: https://github.com/rhysd/actionlint
rev: v1.7.12
hooks:
- id: actionlint
args: [-config-file, .gitea/actionlint.yaml]
files: ^\.gitea/workflows/.*\.ya?ml$
stages: ['pre-commit']
# ansible-lint and the changelog lint run from PATH (language: system): their
# versions are the pins in requirements-dev.txt, installed into a virtualenv by
# CI and locally. ansible-lint is the slowest hook, so fail_fast stops the run
# once it fails (a global fail_fast would hide every other failure).
- repo: local
hooks:
# REUSE compliance (licence files, SPDX data, REUSE.toml; docs/licensing.md in the
# environment repo). The wrapper tolerates only unused licence texts, see its docstring.
- id: reuse-lint
name: REUSE compliance
description: reuse lint, tolerating unused licence texts until the roles arrive
entry: python3 scripts/reuse_lint.py
language: system
pass_filenames: false
always_run: true
stages: ['pre-commit']
- id: antsibull-changelog-lint
name: Changelog fragments lint
description: antsibull-changelog lint over changelogs/
entry: antsibull-changelog lint
language: system
files: ^(changelogs/|galaxy\.yml$)
stages: ['pre-commit']
pass_filenames: false
- id: ansible-lint
name: ansible-lint
description: ansible-lint production profile, offline
entry: ansible-lint --offline --nocolor
language: system
files: ^(roles/|plugins/|meta/|galaxy\.yml$|requirements\.yml$|\.ansible-lint$|\.yamllint$)
stages: ['pre-commit']
pass_filenames: false
require_serial: true
fail_fast: true
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes