You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
git clone https://github.com/mondeja/nitpick-pre-commit-list-keys-error
cd nitpick-pre-commit-list-keys-error
pip install nitpick
nitpick check
Possible Solution
I suspect that the logic of defining list keys in the YAML plugin is incomplete.
Context
I'm defining multiple hooks for the same repo from different style files and this bug stucked me. As a workaround, I'm defining the hooks in the same style file, but is not scalable.
The text was updated successfully, but these errors were encountered:
Different pre-commit hooks with the same
id
but different repos are not properly checked.I've created a repository with a minimal reproducible example to explain the problem. You can see the execution of
nitpick check
and threenitpick fix
here.Expected behavior
I would be fine if nitpick would output one of these outputs.
The first would be that there aren't violations, as could be interpreted like so:
The second, as there is no more fields at
repo
level, would be to merge the two repos because there are the same. This would be the optimal solution:Current behavior
Note that
nitpick fix
does not solves the problem, it enters in a infinite loop of rewritings.Steps to reproduce
git clone https://github.com/mondeja/nitpick-pre-commit-list-keys-error cd nitpick-pre-commit-list-keys-error pip install nitpick nitpick check
Possible Solution
I suspect that the logic of defining list keys in the YAML plugin is incomplete.
Context
I'm defining multiple hooks for the same repo from different style files and this bug stucked me. As a workaround, I'm defining the hooks in the same style file, but is not scalable.
The text was updated successfully, but these errors were encountered: