Skip to content

Proposal: Remove unneeded code-style options, or not include more of them #60584

@Youssef1313

Description

@Youssef1313

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-IDEConcept-Design DebtEngineering Debt, Design Debt, or poor product code quality

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Complete

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions