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

Make the ':severity' suffix in editorconfig code style value optional #48580

Merged

Conversation

mavasani
Copy link
Contributor

Contributes towards #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 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 the option_name = option_value syntax for code style value changes and dotnet_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.

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.
@Dotnet-GitSync-Bot
Copy link
Collaborator

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.

@mavasani mavasani marked this pull request as ready for review October 14, 2020 13:23
@mavasani mavasani requested a review from a team as a code owner October 14, 2020 13:23
@mavasani mavasani added this to the 16.9.P1 milestone Oct 14, 2020
@@ -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
Copy link
Contributor Author

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.

@mavasani
Copy link
Contributor Author

Ping for reviews...

@allisonchou
Copy link
Contributor

@mavasani I plan on taking a look at this later today.

Copy link
Contributor

@allisonchou allisonchou left a 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!

@mavasani
Copy link
Contributor Author

Thank you for the review @allisonchou! I'll wait for one more day to see if there is any further feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants