You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The editor config should allow for some configuration options per rule that state whether the rule is included as part of code cleanup.
Background and Motivation
The VS option to Fix analyzer warnings and errors set in EditorConfig can be very aggressive and unhelpful for some warnings that are commonly generated when writing code. Namely CS0219 - The variable 'variable' is assigned but its value is never used is commonly created when writing code, and saving the file will automatically remove these. Changing the rule to suggestion will mean that it is not cleaned up on save, however, the suggestion is much harder to spot than errors/warnings.
We currently have this rule as warning in CI but suggestion for developers. It is frustrating when this suggestion is not immediately obvious in VS and only caught in CI which can take up to 10min and relies on the developer checking their CI workflow.
Proposed Feature
I'm suggesting that a cleanup option is added to the editor config so that a analyzer can both be a error/warning and not be cleaned up on save.
I guess one alternative is make this suggestion more obvious in visual studio. I'm not sure if there is an option to do this, but the red and green squiggles for errors/warnings are very obvious. The suggestion is three dots that are hard to spot. I believe this is a blue squiggle in VSCode, and VS could allow for the same?
The text was updated successfully, but these errors were encountered:
SoggyBottomBoy
changed the title
The editor config should allow specifying whether a warning is include in code cleanup
The editor config should allow specifying whether a warning is included in code cleanup
May 3, 2024
Summary
The editor config should allow for some configuration options per rule that state whether the rule is included as part of code cleanup.
Background and Motivation
The VS option to
Fix analyzer warnings and errors set in EditorConfig
can be very aggressive and unhelpful for some warnings that are commonly generated when writing code. NamelyCS0219 - The variable 'variable' is assigned but its value is never used
is commonly created when writing code, and saving the file will automatically remove these. Changing the rule tosuggestion
will mean that it is not cleaned up on save, however, the suggestion is much harder to spot than errors/warnings.We currently have this rule as warning in CI but suggestion for developers. It is frustrating when this suggestion is not immediately obvious in VS and only caught in CI which can take up to 10min and relies on the developer checking their CI workflow.
Proposed Feature
I'm suggesting that a
cleanup
option is added to the editor config so that a analyzer can both be a error/warning and not be cleaned up on save.Alternative Designs
I guess one alternative is make this suggestion more obvious in visual studio. I'm not sure if there is an option to do this, but the red and green squiggles for errors/warnings are very obvious. The suggestion is three dots that are hard to spot. I believe this is a blue squiggle in VSCode, and VS could allow for the same?
The text was updated successfully, but these errors were encountered: