@@ -25,6 +25,7 @@ charset = utf-8
2525indent_style = space
2626indent_size = 2
2727trim_trailing_whitespace = true
28+ max_line_length = 140
2829
2930[* .json ]
3031insert_final_newline = false
@@ -88,7 +89,7 @@ dotnet_code_quality_unused_parameters = all:warning
8889
8990# C# code style settings - Implicit and explicit types
9091# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-language-conventions?view=vs-2019#implicit-and-explicit-types
91- csharp_style_var_for_built_in_types = false :suggestion
92+ csharp_style_var_for_built_in_types = true :suggestion
9293csharp_style_var_when_type_is_apparent = true :warning
9394csharp_style_var_elsewhere = true :suggestion
9495
@@ -140,8 +141,9 @@ csharp_style_prefer_range_operator = true:warning
140141csharp_style_deconstructed_variable_declaration = true :suggestion
141142csharp_style_pattern_local_over_anonymous_function = true :suggestion
142143csharp_using_directive_placement = outside_namespace:warning
144+ csharp_style_namespace_declarations = file_scoped:warning
143145csharp_prefer_static_local_function = true :suggestion
144- csharp_prefer_simple_using_statement = false : suggestion
146+ csharp_prefer_simple_using_statement = true : warning
145147csharp_style_prefer_switch_expression = true :suggestion
146148
147149# .NET formatting settings - Organize using directives
@@ -151,7 +153,7 @@ dotnet_separate_import_directive_groups = false
151153
152154# C# formatting settings - New-line options
153155# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-formatting-conventions?view=vs-2019#new-line-options
154- csharp_new_line_before_open_brace = types, methods
156+ csharp_new_line_before_open_brace = types, methods, properties
155157csharp_new_line_before_else = false
156158csharp_new_line_before_catch = false
157159csharp_new_line_before_finally = false
@@ -216,16 +218,35 @@ dotnet_naming_style.prefix_underscore.required_prefix = _
216218# dotnet_naming_rule.<namingRuleTitle>.severity = <value>
217219dotnet_naming_rule.private_fields_with_underscore.severity = warning
218220
219- # ######### name all constant fields using UPPER_CASE ##########
221+ # ######### name all public constant fields using PascalCase ##########
220222# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-naming-conventions?view=vs-2019
221223# dotnet_naming_rule.<namingRuleTitle>.symbols = <symbolTitle>
222- dotnet_naming_rule.constant_fields_should_be_upper_case .symbols = constant_fields
224+ dotnet_naming_rule.constant_fields_should_be_pascal_case .symbols = constant_fields
223225
224226# dotnet_naming_symbols.<symbolTitle>.<property> = <value>
225227dotnet_naming_symbols.constant_fields.applicable_kinds = field
226- dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
228+ dotnet_naming_symbols.constant_fields.applicable_accessibilities = public
227229dotnet_naming_symbols.constant_fields.required_modifiers = const
228230
231+ # dotnet_naming_rule.<namingRuleTitle>.style = <styleTitle>
232+ dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
233+
234+ # dotnet_naming_style.<styleTitle>.<property> = <value>
235+ dotnet_naming_style.pascal_case_style.capitalization = pascal_case
236+
237+ # dotnet_naming_rule.<namingRuleTitle>.severity = <value>
238+ dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = warning
239+
240+ # ######### name all other constant fields using UPPER_CASE ##########
241+ # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-naming-conventions?view=vs-2019
242+ # dotnet_naming_rule.<namingRuleTitle>.symbols = <symbolTitle>
243+ dotnet_naming_rule.constant_fields_should_be_upper_case.symbols = constant_fields_private
244+
245+ # dotnet_naming_symbols.<symbolTitle>.<property> = <value>
246+ dotnet_naming_symbols.constant_fields_private.applicable_kinds = field
247+ dotnet_naming_symbols.constant_fields_private.applicable_accessibilities = *
248+ dotnet_naming_symbols.constant_fields_private.required_modifiers = const
249+
229250# dotnet_naming_rule.<namingRuleTitle>.style = <styleTitle>
230251dotnet_naming_rule.constant_fields_should_be_upper_case.style = upper_case_style
231252
@@ -257,3 +278,18 @@ dotnet_naming_style.end_in_async_style.required_suffix = Async
257278
258279# dotnet_naming_rule.<namingRuleTitle>.severity = <value>
259280dotnet_naming_rule.async_methods_end_in_async.severity = warning
281+
282+ # ignore underscores in names
283+ dotnet_diagnostic.CA1707.severity = none
284+
285+ # IDE0005: Remove unnecessary using directives
286+ dotnet_diagnostic.IDE0005.severity = suggestion
287+
288+ # IDE0058: Remove unnecessary expression value
289+ dotnet_diagnostic.IDE0058.severity = none
290+
291+ # IDE0008: Use explicit type
292+ dotnet_diagnostic.IDE0008.severity = none
293+
294+ # IDE0290: Use primary constructor
295+ dotnet_diagnostic.IDE0290.severity = none
0 commit comments