- Use recommended flake8 setup in pre-commit
- Removes use of hacking as pre-commit provides the lock-in
- Bumps flake8 to latest stable
- Resolves two ignored rules
Change-Id: I98f382cd2b72345748e40106624c73039e0f0f2c
- run `pre-commit autoupdate` and fixed new issues
- adopted newer pre-commit config for ansible-lint 4.2.0+
- fixed some reported broken rules
- temporary disabled few rules, just to contain the size of of review,
planning to drop/fix them in follow-ups.
Change-Id: I807ba4e919527be56c85ec72d0f4c7148f04e994
- Fixes 206 errors and removed the skip.
- Also replaces revision with latest tag (pushed today)
Bug: https://bugs.launchpad.net/tripleo/+bug/1848512
Change-Id: I69d75ba9de8ab0e91eb45fd4f9febfdb28cdcb3a
Previously ansible-lint was running without any rules, so mainly as good
as not runnign at all. Renabling it required updating the list of skips,
but we will address these in follow-ups.
This also bumps ansible-lint to the master version which is not affected
by the installation bug.
Bug: https://bugs.launchpad.net/tripleo/+bug/1848512
Change-Id: I3e78dbf6d3a09aea9430a01e9553d31f8171235a
* 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)
* Updates yamllint to its newer version which supports strict
* Fixed yamllint errors
* Used parsable output format on yamllint which is more consistent
with other tools, being also recognized by IDEs and terminals.
Change-Id: I2bd44feb0a221dcd6f5402e070cf38b31fd8ac97
Depends-On: https://review.openstack.org/#/c/621930/
Story: https://tree.taiga.io/project/tripleo-ci-board/task/381
Upgrades yamllint to latest version and adots use of its strict
checking.
Fix all known problems reported by yamllint so we don't have to do
that while touching these files.
Change-Id: I4bdc520d9e2aff086c4b463718bc1e053261a4f5
Story: https://tree.taiga.io/project/tripleo-ci-board/task/381
* Start running flake8 and ansible-lint via pre-commit
* Bumped hacking version to last release and fixed new errors
Change-Id: Iefe8794abba70660559fcb8cba12dc0b41737882
Story: https://tree.taiga.io/project/tripleo-ci-board/task/381
Allows us to slowly adopt yamllint by having to fix only the files
we would be touching. Once we lower the amount of differences we
can switch it to run on all files.
In addition to having a more consistent code-style this solves
*recurring* bugs like duplicate dictionary keys, like the one
fixes in this change. Only few weeks ago we had to fix a similar bug.
Change-Id: I2ef275700b420a0f700613568e43576079cd4d03
Migrates bashate linting task to pre-commit in order to allow fast
and transparent execution before uploading changes to gerrit.
Other linters can be run as well, including flake8 and ansible-linter.
This also lowers the footprint on developer machines because each
linter/version is stored only once on disk, regardless how many
repositories are using it.
Only action needed for enabling pre-commit as a developer is to
run `pip install pre-commit`, everything else is done transparently
after.
Partial-Bug: #1786286
Change-Id: I6ad834bbfbaf7645c542e4f922e89bc4449247c3