-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Make the ':severity' suffix in editorconfig code style value optional #48580
Make the ':severity' suffix in editorconfig code style value optional #48580
Conversation
Contributes towards dotnet#44201 - All code style option editorconfig entries can now be specified as `option_name = option_value` without `:severity` suffix - `Configure code style option` code fix will no longer add add `:severity` suffix for new entries. For fix that changes existing entries which have `:severity` suffix, it will retain the existing severity suffix. Note that `Configure severity` code fix was already switched to use `dotnet_diagnostic.RuleID.severity` entries for code style diagnostics in dotnet#47052. Once we have the editorconfig UX to change code style option value and severity, we can safely deprecate the `:severity` suffix in option value syntax. All our UI gestures will use the `option_name = option_value` syntax for code style value changes and `dotnet_diagnostic.RuleID.severity = severity` syntax for severity changes and users do not need to deal with these manually editing or understanind these different syntaxes or mapping rule IDs to option names and vice versa for code styles.
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
@@ -98,7 +98,7 @@ public Customer() | |||
<AnalyzerConfigDocument FilePath=""z:\\.editorconfig"">[*.{cs,vb}] | |||
|
|||
# IDE0017: Simplify object initialization | |||
dotnet_style_object_initializer = true:suggestion | |||
dotnet_style_object_initializer = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the core user facing change.
Ping for reviews... |
@mavasani I plan on taking a look at this later today. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, although there were some areas I wasn't very familiar with, so definitely could have missed something. Excited to see this change!
Thank you for the review @allisonchou! I'll wait for one more day to see if there is any further feedback. |
Contributes towards #44201
option_name = option_value
without:severity
suffixConfigure code style option
code fix will no longer add add:severity
suffix for new entries. For fix that changes existing entries which have:severity
suffix, it will retain the existing severity suffix. Note thatConfigure severity
code fix was already switched to usedotnet_diagnostic.RuleID.severity
entries for code style diagnostics in Update configure severity code fix for IDE code style diagnostics to use dotnet_diagnostic entries #47052.Once we have the editorconfig UX to change code style option value and severity, we can safely deprecate the
:severity
suffix in option value syntax. All our UI gestures will use theoption_name = option_value
syntax for code style value changes anddotnet_diagnostic.RuleID.severity = severity
syntax for severity changes. Users would no longer need to deal with manually editing or understanding these different syntaxes or mapping rule IDs to option names and vice versa for code styles.