4969f31ce1
Updated ansible-lint to run via pre-commit only on ansible files. Moved config file to its standard location, repository root, which simplifies syncronization and usage. Contains bumping ansible-lint to current version which also required adding few more rule excludes. These excludes are going to be removed one by one in follow-up changes. This gradual approach allow us to improve code style without endless merge conflicts. Config settings mostly based on those used by tripleo repos. Bumping linters can now be done by running 'pre-commit autoupdate'. Pro-commit always locks versions so there is no chance that a newer linter (ansible-lint) would break CI. Some documentation can be found at https://github.com/openstack/tripleo-quickstart/blob/master/doc/source/contributing.rst and applies mostly to any project using pre-commit. Co-Authored-By: Sorin Sbarnea <ssbarnea@redhat.com> Change-Id: I05eb561c4e353b5fe0bc7c6d3ab2f8ea6c6ea2f4
16 lines
484 B
Plaintext
16 lines
484 B
Plaintext
---
|
|
parseable: true
|
|
skip_list:
|
|
- '102' # [E102] No Jinja2 in when
|
|
- '204' # [E204] Lines should be no longer than 120 chars
|
|
- '206' # [E206] Variables should have spaces before and after: {{ var_name }}
|
|
- '405'
|
|
- '503' # [E503] Tasks that run when changed should likely be handlers
|
|
- '504'
|
|
- '601' # [E601] Don't compare to literal True/False
|
|
- '602' # [E602] Don't compare to empty string
|
|
- ANSIBLE0006
|
|
- ANSIBLE0007
|
|
- ANSIBLE0012
|
|
use_default_rules: true
|