Replies: 2 comments 7 replies
-
There are users that want to downgrade a rule to a warning because they want them to distinguish from syntax errors or type errors, and still get the code fix , and use Our users from I don't mind the proposal, but I fear that if we decide to change the behaviour of the tool to satisfy some use cases, we risk penalizing others without even knowing. Wouldn't it be safer to keep the existing behaviour, and craft new options to enable the behaviour to the one you proposed? |
Beta Was this translation helpful? Give feedback.
-
Closing in favor of #2882 |
Beta Was this translation helpful? Give feedback.
-
The problem
Some code fixes, such as
noUnusedVariables
can be annoying when someone is programming. However, it is valuable before committing or pushing at a repository. However, some users like also to apply the code fixes on every save.For example, some users would like removing unused imports on save.
Others dislike the idea.
I think we can satisfy the two wishes with the following proposal.
Proposal
I propose to disable code fixes for rules set on warning level.
A user could still opt in either changing the level to "error", or using the option
--error-on-warnings
.This solves the previous issue:
--error-on-warnings
.--error-on-warning
.Notes
Also I think we shoudl be able to set a rule level to warning for a recommended rule.
We could then recommend
noUnusedVariables
keeping its level atwarn
by default.Beta Was this translation helpful? Give feedback.
All reactions