Overview
Code-style options are to serve the following main purposes:
- Control how certain code generation features behave.
- Changes how analyzers/codefixes behave per user preference.
Today, some code-style options exist that only enables/disables certain analyzers. This is already achievable by the dotnet_diagnostic.IDExxxx.severity = none setting.
From earlier discussion with @CyrusNajmabadi, those options are needed for showing a Visual Studio setting for these code-styles. However, that comes with noise for .editorconfig files.
Is it really necessary?
I think the fact that we need a code-style option for showing VS setting doesn't mean we really need an editorconfig storage location for this particular code-style option. We can create a roaming-only storage location for such option to show it up in VS and be able to persist it
Proposal
Two directions can be taken:
- Take a breaking change and remove the unnecessary code-style options (should be done in a major version). We should offer an easy way for developers to get rid of those
csharp_style_that_is_deleted and replace them with the corresponding dotnet_diagnostic.IDExxxx.severity
- Keep the existing code-style options. For new analyzers, follow a new pattern that creates roaming-only storage location options.
cc @mikadumont @mavasani @CyrusNajmabadi @sharwell @jmarolf
Overview
Code-style options are to serve the following main purposes:
Today, some code-style options exist that only enables/disables certain analyzers. This is already achievable by the
dotnet_diagnostic.IDExxxx.severity = nonesetting.From earlier discussion with @CyrusNajmabadi, those options are needed for showing a Visual Studio setting for these code-styles. However, that comes with noise for
.editorconfigfiles.Is it really necessary?
I think the fact that we need a code-style option for showing VS setting doesn't mean we really need an editorconfig storage location for this particular code-style option. We can create a roaming-only storage location for such option to show it up in VS and be able to persist it
Proposal
Two directions can be taken:
csharp_style_that_is_deletedand replace them with the correspondingdotnet_diagnostic.IDExxxx.severitycc @mikadumont @mavasani @CyrusNajmabadi @sharwell @jmarolf