Combine const and static fields' naming rules
MODIFY
.editorconfig
.editorconfig
@@ -104,24 +104,17 @@ csharp_prefer_braces = true:error
dotnet_style_readonly_field = false:error
-# name all constant fields using PascalCase
-dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = error
-dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
-dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
+# name all constant or static fields using PascalCase
+dotnet_naming_rule.constant_or_static_fields_should_be_pascal_case.severity = error
+dotnet_naming_rule.constant_or_static_fields_should_be_pascal_case.symbols = constant_or_static_fields
+dotnet_naming_rule.constant_or_static_fields_should_be_pascal_case.style = pascal_case_style
-dotnet_naming_symbols.constant_fields.applicable_kinds = field
-dotnet_naming_symbols.constant_fields.required_modifiers = const
+dotnet_naming_symbols.constant_or_static_fields.applicable_kinds = field
+dotnet_naming_symbols.constant_or_static_fields.required_modifiers = const
+dotnet_naming_symbols.constant_or_static_fields.required_modifiers = static
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
-# name all static fields using PascalCase
-dotnet_naming_rule.static_fields_should_be_pascal_case.severity = error
-dotnet_naming_rule.static_fields_should_be_pascal_case.symbols = static_fields
-dotnet_naming_rule.static_fields_should_be_pascal_case.style = pascal_case_style
-
-dotnet_naming_symbols.static_fields.applicable_kinds = field
-dotnet_naming_symbols.static_fields.required_modifiers = static
-
# name all readonly fields using PascalCase
dotnet_naming_rule.readonly_fields_should_be_pascal_case.severity = error
dotnet_naming_rule.readonly_fields_should_be_pascal_case.symbols = readonly_fields

Combine const and static fields' naming rules