Skip to content

Editorconfig backwards compatibility dilemma #20907

@jnm2

Description

@jnm2

We have a bit of a dilemma. If you don't fix this in 15.0–15.2, it will still get in the way and totally break the experience for anyone using 15.0–15.2 if we ever use type_parameter in an OSS project's .editorconfig.

Imagine that 15.3 is out with support for type_parameter and we want to enforce a T prefix followed by pascal case:

dotnet_naming_style.type_parameter.required_prefix = T
dotnet_naming_style.type_parameter.capitalization = pascal_case 
dotnet_naming_symbols.type_parameters.applicable_kinds = type_parameter
dotnet_naming_rule.type_parameters.severity = error
dotnet_naming_rule.type_parameters.symbols = type_parameters
dotnet_naming_rule.type_parameters.style = type_parameter

The problem is that this same block of settings in VS15.0–15.2 acts as though you had said applicable_kinds = *. This is a problem because suddenly every identifier ever is required by VS15.0–15.2 to begin with T.

This is a very similar problem to https://github.com/dotnet/roslyn/issues/20891.

The only fix I can see is to push a fix to VS15.0–15.2 that

  1. splits the line by commas
  2. removes the items it doesn't recognize
  3. If the line exists and the list of recognized items is empty, apply the rule to nothing instead of applying the rule to everything.

For applicable_kinds, you have 1 and 2 correct but you can verify that you don't have 3 correct because type_parameter, event acts as event but type_parameter acts as *.

For dotnet_naming_rule.*.symbols, as far as I can tell, you have all three parts wrong for backwards compatibility.

Otherwise, as you version this very useful and attractive system, how is anyone supposed to adopt new features without forcing everyone in the codebase to upgrade to the very latest VS before continuing any work, or bear through a flood of erroneous squiggles?

Thanks for considering.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions