mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-26 21:33:05 +00:00
With the parameter `args: ['.']`, yamllint would run over every file during pre-commit, including those not being commited, and it would allow for false negatives, not allowing a commit, even if commited yaml files had no issues, but another file, not par of the commit, had. By changing the yamllint parameter to `files: \.(yaml|yml)$` it will only check files being commited, preventing false negatives, and allowing for faster commits.
32 lines
796 B
YAML
32 lines
796 B
YAML
---
|
|
repos:
|
|
- repo: https://github.com/ansible/ansible-lint.git
|
|
rev: v4.3.5
|
|
hooks:
|
|
- id: ansible-lint
|
|
always_run: true
|
|
pass_filenames: true
|
|
files: \.(yaml|yml)$
|
|
entry: env ANSIBLE_LIBRARY=./plugins/modules ANSIBLE_MODULE_UTILS=./plugins/module_utils ansible-lint --force-color
|
|
- repo: https://github.com/adrienverge/yamllint.git
|
|
rev: v1.25.0
|
|
hooks:
|
|
- id: yamllint
|
|
files: \.(yaml|yml)$
|
|
- repo: https://gitlab.com/pycqa/flake8
|
|
rev: 3.8.4
|
|
hooks:
|
|
- id: flake8
|
|
- repo: https://gitlab.com/pycqa/pydocstyle
|
|
rev: 5.1.1
|
|
hooks:
|
|
- id: pydocstyle
|
|
- repo: local
|
|
hooks:
|
|
- id: ansible-doc-test
|
|
name: Verify Ansible roles and module documentation.
|
|
language: script
|
|
entry: utils/ansible-doc-test
|
|
# args: ['-v', 'roles', 'plugins']
|
|
files: ^.*.py$
|