Skip to content

Commit

Permalink
add static fields rule
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-erojaslizano committed May 28, 2024
1 parent 272ce15 commit d8b0c0b
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d8b0c0b

Please sign in to comment.