Skip to content

Commit 0d8b7b6

Browse files
committed
Align .editorconfig better with existing conventions
1 parent 5676598 commit 0d8b7b6

File tree

1 file changed

+56
-3
lines changed

1 file changed

+56
-3
lines changed

dotnet/.editorconfig

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,40 @@ trim_trailing_whitespace = true
1212
# Generated code
1313
[*{_AssemblyInfo.cs,.notsupported.cs,AsmOffsets.cs}]
1414
generated_code = true
15+
dotnet_style_operator_placement_when_wrapping = beginning_of_line
16+
tab_width = 4
17+
end_of_line = lf
18+
dotnet_style_coalesce_expression = true:suggestion
19+
dotnet_style_null_propagation = true:suggestion
20+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
21+
dotnet_style_prefer_auto_properties = true:suggestion
22+
dotnet_style_object_initializer = true:suggestion
23+
dotnet_style_collection_initializer = true:suggestion
24+
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
25+
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
26+
dotnet_style_prefer_conditional_expression_over_return = true:silent
27+
dotnet_style_explicit_tuple_names = true:suggestion
28+
dotnet_style_prefer_inferred_tuple_names = true:suggestion
29+
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
30+
dotnet_style_prefer_compound_assignment = true:suggestion
31+
dotnet_style_prefer_simplified_interpolation = true:suggestion
32+
dotnet_style_prefer_collection_expression = when_types_exactly_match:suggestion
33+
dotnet_style_namespace_match_folder = true:suggestion
34+
dotnet_style_readonly_field = true:suggestion
35+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
36+
dotnet_style_predefined_type_for_member_access = true:suggestion
37+
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
38+
dotnet_style_allow_multiple_blank_lines_experimental = false:suggestion
39+
dotnet_style_allow_statement_immediately_after_block_experimental = true:silent
40+
dotnet_code_quality_unused_parameters = all:suggestion
41+
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
42+
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
43+
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
44+
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
45+
dotnet_style_qualification_for_field = true:silent
46+
dotnet_style_qualification_for_property = true:silent
47+
dotnet_style_qualification_for_method = true:silent
48+
dotnet_style_qualification_for_event = true:silent
1549

1650
# C# files
1751
[*.cs]
@@ -50,15 +84,15 @@ dotnet_style_predefined_type_for_member_access = true:suggestion
5084
# name all constant fields using PascalCase
5185
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
5286
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
53-
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
87+
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
5488
dotnet_naming_symbols.constant_fields.applicable_kinds = field
5589
dotnet_naming_symbols.constant_fields.required_modifiers = const
5690
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
5791

5892
# static fields should have s_ prefix
5993
dotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion
6094
dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields
61-
dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style
95+
dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style
6296
dotnet_naming_symbols.static_fields.applicable_kinds = field
6397
dotnet_naming_symbols.static_fields.required_modifiers = static
6498
dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, private_protected
@@ -68,7 +102,7 @@ dotnet_naming_style.static_prefix_style.capitalization = camel_case
68102
# internal and private fields should be _camelCase
69103
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
70104
dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
71-
dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
105+
dotnet_naming_rule.camel_case_for_private_internal_fields.style = pascal_case_style
72106
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
73107
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
74108
dotnet_naming_style.camel_case_underscore_style.required_prefix = _
@@ -147,6 +181,25 @@ csharp_space_between_method_declaration_name_and_open_parenthesis = false
147181
csharp_space_between_method_declaration_parameter_list_parentheses = false
148182
csharp_space_between_parentheses = false
149183
csharp_space_between_square_brackets = false
184+
csharp_style_namespace_declarations = file_scoped:silent
185+
csharp_style_prefer_method_group_conversion = false:silent
186+
csharp_style_prefer_top_level_statements = true:silent
187+
csharp_style_prefer_primary_constructors = false:silent
188+
csharp_prefer_system_threading_lock = true:suggestion
189+
csharp_style_prefer_null_check_over_type_check = true:suggestion
190+
csharp_style_prefer_local_over_anonymous_function = true:suggestion
191+
csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
192+
csharp_style_prefer_tuple_swap = true:suggestion
193+
csharp_style_prefer_utf8_string_literals = true:suggestion
194+
csharp_style_deconstructed_variable_declaration = true:suggestion
195+
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
196+
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
197+
csharp_prefer_static_anonymous_function = true:suggestion
198+
csharp_style_prefer_readonly_struct = true:suggestion
199+
csharp_style_prefer_readonly_struct_member = true:suggestion
200+
csharp_style_prefer_pattern_matching = true:silent
201+
csharp_style_prefer_not_pattern = true:suggestion
202+
csharp_style_prefer_extended_property_pattern = true:suggestion
150203

151204
# C++ Files
152205
[*.{cpp,h,in}]

0 commit comments

Comments
 (0)