Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use return value 1 always if there are linter errors #34

Merged
merged 10 commits into from
Apr 2, 2024
Merged

Conversation

akaihola
Copy link
Owner

@akaihola akaihola commented Apr 1, 2024

Fixes #6

@akaihola akaihola added the enhancement New feature or request label Apr 1, 2024
@akaihola akaihola added this to the Graylint 1.1.0 milestone Apr 1, 2024
@akaihola akaihola self-assigned this Apr 1, 2024
@akaihola akaihola force-pushed the error-retval branch 2 times, most recently from 3d7c8db to c303b89 Compare April 2, 2024 19:17
@akaihola akaihola force-pushed the error-retval branch 2 times, most recently from 31ba566 to e99202a Compare April 2, 2024 19:28
Used to return the number of linter errors. Didn't make sense as a shell
return value.
Pytest will get confused otherwise:

================================ ERRORS ================================
___________ ERROR collecting src/graylint/tests/test_main.py ___________
import file mismatch:
imported module 'test_main' has this __file__ attribute:
  /home/akaihola/prg/graylint/action/tests/test_main.py
which is not the same as the test file we want to collect:
  /home/akaihola/prg/graylint/src/graylint/tests/test_main.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for
      your test file modules
======================= short test summary info ========================
ERROR src/graylint/tests/test_main.py
!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!
@akaihola akaihola merged commit 441dc76 into main Apr 2, 2024
38 checks passed
@akaihola akaihola deleted the error-retval branch April 2, 2024 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

Exit Graylint with retval 1 on linter errors
1 participant