pre-commit is not fully running on triple-ansible

Bug #1852213 reported by Sorin Sbarnea
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Confirmed
Medium
Sorin Sbarnea

Bug Description

Despite the fact that openstack/tripleo-ansible repository has a pre-commit config, the CI job is not fully running it, missing to spot various errors.

If a user runs it locally on all files, it will fail as we have already merged files that are not conformant.

By looking deeper on how openstack-tox-linters job is running I discovered that this repository tox configuration is extremely complex for no good reasons.

We need to address this and assure that `tox -e linters` runs and tests all files on both Zuul and also on developer machines.

For example, I saw tox environments created for some random pre-commit hooks but not for others and I see no real need to create a never ending suite of tox environments for each check, fix or linter that we may use at one point, that is non-maintainable.

By default, it should run all linters, with auto-fixers first and slow one at bottom. Also, tox can pass name of the nook as optional parameter which would allow users to run a single hook/linter even without spamming the tox environments.

Example: `pre-commit run flake8` can be run via tox as `tox -e linters -- flake8` -- that is the same pattern that people use to run specific unittests with tox.

Sorin Sbarnea (ssbarnea)
Changed in tripleo:
assignee: nobody → Sorin Sbarnea (ssbarnea)
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.