-
Notifications
You must be signed in to change notification settings - Fork 178
Description
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 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]
[5]
$ poetry run prospector
...
=================
Started: 2023-02-20 15:42:43.808330
Finished: 2023-02-20 15:42:53.087899
Time Taken: 9.28 seconds
Formatter: grouped
Profiles: .prospector.yml, no_doc_warnings, no_member_warnings, no_test_warnings, strictness_medium, strictness_high, strictness_veryhigh
Strictness: from profile
Libraries Used:
Tools Run: dodgy, mypy, profile-validator, pycodestyle, pyflakes, pylint
Messages Found: 24
External Config: pylint: ####/prospector/pyproject.toml
Expected result
- Expected
prospectorto return 0 issues onprospector. - Maybe change flag to
--ignore-errorsto 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.