Skip to content

Commit 8f738eb

Browse files
committed
make editorconfig match project style i think
1 parent 1318733 commit 8f738eb

File tree

1 file changed

+26
-17
lines changed

1 file changed

+26
-17
lines changed

.editorconfig

+26-17
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,16 @@ dotnet_style_require_accessibility_modifiers = for_non_interface_members
4545
dotnet_style_coalesce_expression = true
4646
dotnet_style_collection_initializer = true
4747
dotnet_style_explicit_tuple_names = true
48-
dotnet_style_namespace_match_folder = false
48+
dotnet_style_namespace_match_folder = true
4949
dotnet_style_null_propagation = true
5050
dotnet_style_object_initializer = true
5151
dotnet_style_operator_placement_when_wrapping = beginning_of_line
5252
dotnet_style_prefer_auto_properties = true
53+
dotnet_style_prefer_collection_expression = when_types_loosely_match
5354
dotnet_style_prefer_compound_assignment = true
5455
dotnet_style_prefer_conditional_expression_over_assignment = true
5556
dotnet_style_prefer_conditional_expression_over_return = true
57+
dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed
5658
dotnet_style_prefer_inferred_anonymous_type_member_names = true
5759
dotnet_style_prefer_inferred_tuple_names = true
5860
dotnet_style_prefer_is_null_check_over_reference_equality_method = true
@@ -69,8 +71,8 @@ dotnet_code_quality_unused_parameters = all
6971
dotnet_remove_unnecessary_suppression_exclusions = none
7072

7173
# New line preferences
72-
dotnet_style_allow_multiple_blank_lines_experimental = false
73-
dotnet_style_allow_statement_immediately_after_block_experimental = false
74+
dotnet_style_allow_multiple_blank_lines_experimental = true
75+
dotnet_style_allow_statement_immediately_after_block_experimental = true
7476

7577
#### C# Coding Conventions ####
7678

@@ -99,28 +101,33 @@ csharp_style_prefer_switch_expression = true
99101

100102
# Null-checking preferences
101103
csharp_style_conditional_delegate_call = true
102-
csharp_style_prefer_parameter_null_checking = true
103104

104105
# Modifier preferences
106+
csharp_prefer_static_anonymous_function = true
105107
csharp_prefer_static_local_function = true
106-
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async
108+
csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async
109+
csharp_style_prefer_readonly_struct = true
110+
csharp_style_prefer_readonly_struct_member = true
107111

108112
# Code-block preferences
109-
csharp_prefer_braces = true
113+
csharp_prefer_braces = when_multiline
110114
csharp_prefer_simple_using_statement = true
111-
csharp_style_namespace_declarations = block_scoped
115+
csharp_style_namespace_declarations = file_scoped
112116
csharp_style_prefer_method_group_conversion = true
117+
csharp_style_prefer_primary_constructors = true
118+
csharp_style_prefer_top_level_statements = true
113119

114120
# Expression-level preferences
115121
csharp_prefer_simple_default_expression = true
116122
csharp_style_deconstructed_variable_declaration = true
117123
csharp_style_implicit_object_creation_when_type_is_apparent = true
118124
csharp_style_inlined_variable_declaration = true
119-
csharp_style_prefer_index_operator = false
125+
csharp_style_prefer_index_operator = true
120126
csharp_style_prefer_local_over_anonymous_function = true
121127
csharp_style_prefer_null_check_over_type_check = true
122-
csharp_style_prefer_range_operator = false
128+
csharp_style_prefer_range_operator = true
123129
csharp_style_prefer_tuple_swap = true
130+
csharp_style_prefer_utf8_string_literals = true
124131
csharp_style_throw_expression = true
125132
csharp_style_unused_value_assignment_preference = discard_variable
126133
csharp_style_unused_value_expression_statement_preference = discard_variable
@@ -129,19 +136,21 @@ csharp_style_unused_value_expression_statement_preference = discard_variable
129136
csharp_using_directive_placement = outside_namespace
130137

131138
# New line preferences
132-
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = false
133-
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false
134-
csharp_style_allow_embedded_statements_on_same_line_experimental = false
139+
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true
140+
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true
141+
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true
142+
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true
143+
csharp_style_allow_embedded_statements_on_same_line_experimental = true
135144

136145
#### C# Formatting Rules ####
137146

138147
# New line preferences
139-
csharp_new_line_before_catch = false
140-
csharp_new_line_before_else = false
141-
csharp_new_line_before_finally = false
148+
csharp_new_line_before_catch = true
149+
csharp_new_line_before_else = true
150+
csharp_new_line_before_finally = true
142151
csharp_new_line_before_members_in_anonymous_types = true
143152
csharp_new_line_before_members_in_object_initializers = true
144-
csharp_new_line_before_open_brace = none
153+
csharp_new_line_before_open_brace = all
145154
csharp_new_line_between_query_expression_clauses = true
146155

147156
# Indentation preferences
@@ -178,7 +187,7 @@ csharp_space_between_square_brackets = false
178187

179188
# Wrapping preferences
180189
csharp_preserve_single_line_blocks = true
181-
csharp_preserve_single_line_statements = false
190+
csharp_preserve_single_line_statements = true
182191

183192
#### Naming styles ####
184193

0 commit comments

Comments
 (0)