Skip to content

Commit

Permalink
Add more style configuration (#854)
Browse files Browse the repository at this point in the history
This sets up .NET naming for fields, locals and parameters to use
snake_case, so that editors won't complain about those.

It also disables trimming of trailing blanks to avoid accidentally
including such whitespace diffs in PRs.
  • Loading branch information
Zastai authored Sep 29, 2022
1 parent 9eb00e4 commit 65a2912
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,16 @@ csharp_space_between_method_call_name_and_opening_parenthesis = true
csharp_space_before_open_square_brackets = true
csharp_new_line_before_open_brace = methods
csharp_new_line_before_else = false
csharp_indent_switch_labels = false
csharp_indent_switch_labels = false

trim_trailing_whitespace = false

dotnet_naming_symbols.fields_locals_and_parameters.applicable_kinds = field, local, parameter
dotnet_naming_symbols.fields_locals_and_parameters.applicable_accessibilities = *

dotnet_naming_style.snake_case.capitalization = all_lower
dotnet_naming_style.snake_case.word_separator = _

dotnet_naming_rule.fields_locals_and_parameters_use_snake_case.symbols = fields_locals_and_parameters
dotnet_naming_rule.fields_locals_and_parameters_use_snake_case.style = snake_case
dotnet_naming_rule.fields_locals_and_parameters_use_snake_case.severity = suggestion

0 comments on commit 65a2912

Please sign in to comment.