mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-25 00:44:42 +00:00
Merge pull request #393 from rjeffman/coding_precommit_checks
Add pre-commit configuration for linters.
This commit is contained in:
31
.pre-commit-config.yaml
Normal file
31
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
---
|
||||||
|
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
|
||||||
|
args: ['.']
|
||||||
|
- 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$
|
||||||
@@ -1,2 +1,3 @@
|
|||||||
-r requirements-tests.txt
|
-r requirements-tests.txt
|
||||||
ipdb
|
ipdb
|
||||||
|
pre-commit
|
||||||
|
|||||||
Reference in New Issue
Block a user