mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-06 04:56:54 +00:00
Add a flag for exiting with status code 0, even when there are warnings
This might be useful e.g. in a build system where exiting with status code > 0 always means the build failed. In that case, you still want to signify that flake8 itself ran without problems, even when there are warnings.
This commit is contained in:
parent
fabd0fa801
commit
1feeec96f9
2 changed files with 6 additions and 0 deletions
|
|
@ -59,6 +59,9 @@ def main():
|
|||
else:
|
||||
stdin = sys.stdin.read()
|
||||
warnings += check_code(stdin, complexity)
|
||||
|
||||
if options.exit_zero:
|
||||
raise SystemExit(0)
|
||||
raise SystemExit(warnings > 0)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue