ci: add pre-commit, lint and changelog configuration
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
This commit is contained in:
1 parent
a317ec3e93
commit
904d833a6f
9 files changed
+176
No files matched your search
@@ -0,0 +1,82 @@
|
||||
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']
|
||||
|
||||
- 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$|\.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
|
||||
Reference in new issue
Block a user