dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
19.12k stars 4.04k forks source link

Comma-separated dotnet_naming_rule.*.symbols #20891

Open jnm2 opened 7 years ago

jnm2 commented 7 years ago

In VS2017.2, dotnet_naming_rule.*.symbols does not support a comma-separated list. If a comma appears, VS acts as if the line was = *. (Which is much worse than acting as though the line was not there, because if you don't fix this in 15.2, it will still take over the world for anyone using 15.2 if we add it to an OSS project's .editorconfig.)

I didn't see an issue tracking this, but I'm interested to know when it will be fixed.

Instead of writing:

dotnet_naming_style.pascal_case.capitalization = pascal_case

dotnet_naming_symbols.types_and_members.applicable_kinds = class, struct, enum, interface, delegate, method, property, event
dotnet_naming_rule.types_and_members.severity = error
dotnet_naming_rule.types_and_members.style = pascal_case

dotnet_naming_symbols.publicly_visible_fields.applicable_kinds = field
dotnet_naming_symbols.publicly_visible_fields.applicable_accessibilities = public, protected, protected_friend, protected_internal
dotnet_naming_rule.publicly_visible_fields.severity = error
dotnet_naming_rule.publicly_visible_fields.symbols = publicly_visible_fields
dotnet_naming_rule.publicly_visible_fields.style = pascal_case

dotnet_naming_symbols.static_fields.applicable_kinds = field
dotnet_naming_symbols.static_fields.required_modifiers = static
dotnet_naming_rule.static_fields.severity = error
dotnet_naming_rule.static_fields.symbols = static_fields
dotnet_naming_rule.static_fields.style = pascal_case

dotnet_naming_symbols.constants.applicable_kinds = field
dotnet_naming_symbols.constants.required_modifiers = const
dotnet_naming_rule.constants.severity = error
dotnet_naming_rule.constants.symbols = constants
dotnet_naming_rule.constants.style = pascal_case

I would like to write:

dotnet_naming_style.pascal_case.capitalization = pascal_case

dotnet_naming_symbols.types_and_members.applicable_kinds = class, struct, enum, interface, delegate, method, property, event

dotnet_naming_symbols.publicly_visible_fields.applicable_kinds = field
dotnet_naming_symbols.publicly_visible_fields.applicable_accessibilities = public, protected, protected_friend, protected_internal

dotnet_naming_symbols.static_fields.applicable_kinds = field
dotnet_naming_symbols.static_fields.required_modifiers = static

dotnet_naming_symbols.constants.applicable_kinds = field
dotnet_naming_symbols.constants.required_modifiers = const

dotnet_naming_rule.pascal_case.severity = error
dotnet_naming_rule.pascal_case.symbols = types_and_members, publicly_visible_fields, static_fields, constants
dotnet_naming_rule.pascal_case.style = pascal_case
Pilchie commented 7 years ago

Tagging @kuhlenh and @dpoeschl for feedback here.

@jnm2 for ETA - the soonest this could be addressed would be 15.5.

jnm2 commented 7 years ago

the soonest this could be addressed would be 15.5.

Okay, well, thanks for letting me know what to expect.