-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Using --max-warnings in combination with --quiet should error #14202
Using --max-warnings in combination with --quiet should error #14202
Comments
It looks like there is probably a bug when quiet and max-warnings are used together. In that case, it should still exit with a 1 exit code saying that there were too many warnings. I think it makes sense to not show warnings in this case. |
I agree that
I don't have a strong opinion on this. Not showing warnings looks less surprising, but the list of warnings might be valuable in this case. |
I agree that this is a bug and that
I also agree that this is the correct behavior because we should respect |
Okay, so it sounds like we've agreed that the current behavior is a bug. Current behavior: When using Desired behavior: When using |
Should we show the number of found warnings in the message? Current message is: Lines 315 to 318 in ebd7026
Without With |
I don’t think that’s necessary. The max allowable warnings is already shown so I don’t think there’s any need to show the actual number |
The version of ESLint you are using.
v7.21.0
The problem you want to solve.
Using the
--max-warnings
cli option is useless in combination with--quiet
.I'm running this in
Note the following, first running without
--quiet
, then with.Your take on the correct solution to problem.
Ideally: The
--quiet
flag should be overriden when the amount of warnings exceedsmax-warnings
, logging the warnings.Also acceptable: The exit code should be 1 when
max-warnings
is exceeded.Are you willing to submit a pull request to implement this change?
Not really 😇
The text was updated successfully, but these errors were encountered: