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
I noticed that both the CI [1] and the pre-commit [2] use --zero-exit. But --zero-exit is telling prospector to ignore the issues it found, since the flag check [3] is run before the length of the messages check [4].
I think that defeats the purpose of having it on the CI and pre-commit.
As an example, I ran prospector on this repo and got 24 issues.[5]
Expected prospector to return 0 issues on prospector.
Maybe change flag to --ignore-errors to make the purpose clearer.
Environment (please complete the following information):
OS: linux
poetry run prospector
Version 1.9.1
Python 3.9.16
Additional context
I was trying to change from a manual .githooks/pre-commit configuration to pre-commit (https://pre-commit.com). The project passes prospector but was failing pre-commit run -a (with pylint: import-error / Unable to import). I was looking through other pre-commit configs trying to fix it and noticed that the zero-exit flag could lead to errors.
The text was updated successfully, but these errors were encountered:
cc @sjvrijn @luisaforozco which helped track this down
Description
I noticed that both the CI [1] and the pre-commit [2] use
--zero-exit
. But--zero-exit
is tellingprospector
to ignore the issues it found, since the flag check [3] is run before the length of the messages check [4].I think that defeats the purpose of having it on the CI and pre-commit.
As an example, I ran
prospector
on this repo and got 24 issues.[5][1] https://github.com/PyCQA/prospector/blob/197622ef559b2056c7d3fa486be84d9251026be7/.github/workflows/tests.yml#L31
[2] https://github.com/PyCQA/prospector/blob/197622ef559b2056c7d3fa486be84d9251026be7/.pre-commit-config.yaml#L42
[3] https://github.com/PyCQA/prospector/blob/866b79ed7aa381266939bcac952df40993dbfad3/prospector/run.py#L201-L204
[4]
https://github.com/PyCQA/prospector/blob/866b79ed7aa381266939bcac952df40993dbfad3/prospector/run.py#L209-L211
[5]
Expected result
prospector
to return 0 issues onprospector
.--ignore-errors
to make the purpose clearer.Environment (please complete the following information):
poetry run prospector
Additional context
I was trying to change from a manual
.githooks/pre-commit
configuration topre-commit
(https://pre-commit.com). The project passesprospector
but was failingpre-commit run -a
(withpylint: import-error / Unable to import
). I was looking through other pre-commit configs trying to fix it and noticed that thezero-exit
flag could lead to errors.The text was updated successfully, but these errors were encountered: