From d8b0c0bbdd7ab959b1f7a932aaa7f532f0d3291a Mon Sep 17 00:00:00 2001 From: Steven Lizano Date: Tue, 28 May 2024 14:58:05 -0600 Subject: [PATCH] add static fields rule --- .editorconfig | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/.editorconfig b/.editorconfig index cf077cd49..cbb50c4bb 100644 --- a/.editorconfig +++ b/.editorconfig @@ -13,17 +13,31 @@ trim_trailing_whitespace = true charset = utf-8 max_line_length = 150 -# Interfaces should start with I and PascalCase +## Interfaces should start with I and PascalCase # naming style -dotnet_naming_style.prefix_and_pascal_case.required_prefix = O +dotnet_naming_style.prefix_and_pascal_case.required_prefix = I dotnet_naming_style.prefix_and_pascal_case.capitalization = pascal_case # naming symbols dotnet_naming_symbols.interfaces.applicable_kinds = interface -dotnet_naming_rule.interfaces_begin_with.severity = error -dotnet_naming_rule.interfaces_begin_with.symbols = interfaces -dotnet_naming_rule.interfaces_begin_with.style = prefix_and_pascal_case +dotnet_naming_rule.interfaces_begin_with_I.severity = error +dotnet_naming_rule.interfaces_begin_with_I.symbols = interfaces +dotnet_naming_rule.interfaces_begin_with_I.style = prefix_and_pascal_case -dotnet_diagnostic.interfaces_begin_with.enabled = true +dotnet_diagnostic.interfaces_begin_with_I.enabled = true +## Static fields should start with _s +# naming style +dotnet_naming_rule.static_fields_begin_with_s.style = custom +dotnet_naming_rule.static_fields_begin_with_s.required_prefix = _r +dotnet_naming_rule.static_fields_begin_with_s.capitalization = camel_case + +# naming symbols +dotnet_naming_symbols.static_fields.applicable_kinds = field +dotnet_naming_symbols.static_fields.applicable_accessibilities = public, internal, private, protected, protected_internal +dotnet_naming_symbols.static_fields.required_modifiers = static + +dotnet_naming_rule.static_fields_begin_with_s.severity = error +dotnet_naming_rule.static_fields_begin_with_s.symbols = static_fields +dotnet_diagnostic.static_fields_begin_with_s.enabled = true