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

@duaraghav8 duaraghav8 added this to To do in Version 1.2.3 Jan 20, 2019
@duaraghav8 duaraghav8 moved this from To do to In progress in Version 1.2.3 Jan 21, 2019
duaraghav8 pushed a commit that referenced this issue Feb 2, 2019
duaraghav8 pushed a commit that referenced this issue Feb 2, 2019
@duaraghav8 duaraghav8 added this to In progress in Version 1.2.4 Feb 11, 2019
@duaraghav8 duaraghav8 removed this from In progress in Version 1.2.3 Feb 11, 2019
@duaraghav8 duaraghav8 moved this from In progress to To do in Version 1.2.4 Apr 7, 2019
@duaraghav8 duaraghav8 added this to To do in Version 1.2.6 Apr 7, 2019
@duaraghav8 duaraghav8 removed this from To do in Version 1.2.4 Apr 7, 2019
@duaraghav8 duaraghav8 removed this from To do in Version 1.2.6 Apr 25, 2019
@duaraghav8 duaraghav8 added the Hacktoberfest Hacktoberfest 2019 label Oct 1, 2019
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