tripleo-validations/.pre-commit-config.yaml
Gael Chamoulaud 001288ac0a Migrate ansible-lint to pre-commit
* Kept old specific linter tox targets for backwards compatibility,
  so developer can easily run a single linter if desired.
* Reused tox linters virtualenvs to avoid wasting space
* Moved linter config to their official location which enables
  developer to call them in any way he wants (like his IDE)
* tools/validate-files.py has been updated to check out all the custom
  library files coming from the new validation framework.

Change-Id: I4118200e6862763a0e9dac921dc7c42019224d12
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
(cherry picked from commit 82ccd69298)
2019-04-24 09:46:55 +00:00

30 lines
820 B
YAML

---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.0.0
hooks:
- id: trailing-whitespace
- id: mixed-line-ending
- id: check-byte-order-marker
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: debug-statements
- id: flake8
additional_dependencies:
- hacking<1.2.0,>=1.1.0
- id: check-yaml
files: .*\.(yaml|yml)$
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.13.0
hooks:
- id: yamllint
files: \.(yaml|yml)$
types: [file, yaml]
entry: yamllint --strict -f parsable
- repo: https://github.com/ansible/ansible-lint
rev: v4.0.1
hooks:
- id: ansible-lint
files: \.(yaml|yml)$
entry: ansible-lint --force-color -v