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

Add --max-warnings cli option #255

Open
duaraghav8 opened this issue Jan 20, 2019 · 0 comments
Open

Add --max-warnings cli option #255

duaraghav8 opened this issue Jan 20, 2019 · 0 comments
Labels

Comments

@duaraghav8
Copy link
Owner

duaraghav8 commented Jan 20, 2019

Description
--max-warnings [integer] CLI option lets a user specify the maximum number of warnings tolerable. If the number of warnings crosses this threshold, linter prints Warning threshold exceeded and returns a non-zero exit code.

Keep in mind that the value of this option is compared with the total number of warnings across all the files that the linter covers.

Use case
Keep the number of warnings in control.

Screenshots

Alternatives
Configure rules as errors instead of warnings

Comments

  • If --fix-dry-run is used, linter should count the warnings that were temporarily fixed because dry run doesn't make those warnings go away from the code. Regardless of whether any warnings were fixed by dry run, all warnings should be counted.

  • If --fix is used, linter should only count the warnings remaining after all fixes have been applied. Any warnings that --fix resolves need not be considered because they're removed permanently from the code.

Priority
MEDIUM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant