-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.editorconfig
More file actions
313 lines (273 loc) · 15.2 KB
/
.editorconfig
File metadata and controls
313 lines (273 loc) · 15.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
root = true
[*]
indent_style = space
charset = utf-8
indent_size = 4
#### New line preferences ####
max_line_length = 120
insert_final_newline = true
trim_trailing_whitespace = true
#### .NET Formatting Options ####
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/dotnet-formatting-options
# Using directive options
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = false
#### C# Formatting Options ####
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/csharp-formatting-options
# New line options
csharp_new_line_before_catch = true
csharp_new_line_before_else = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_open_brace = all
csharp_new_line_between_query_expression_clauses = true
# Indentation options
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = true
csharp_indent_labels = one_less_than_current
csharp_indent_switch_labels = true
# Spacing options
csharp_space_after_cast = true
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = false
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false
# Wrap options
csharp_preserve_single_line_statements = false ;
csharp_preserve_single_line_blocks = true ;
#### Language and unnecessary rules ####
# (https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/language-rules)
# Using directive preferences
file_header_template = unset # (IDE0073)
csharp_using_directive_placement = outside_namespace # (IDE0065)
# Code-block preferences
csharp_prefer_braces = true:suggestion # (IDE0011)
csharp_prefer_simple_using_statement = unset # (IDE0063)
csharp_style_namespace_declarations = file_scoped # (IDE0160 & IDE0161)
resharper_namespace_body = file_scoped # Temp Resharper setting for line above
csharp_style_prefer_method_group_conversion = true # (IDE0200) - Unable to find Resharper setting
csharp_style_prefer_top_level_statements = true # (IDE0210 & IDE0211) - Unable to find Resharper setting
csharp_style_prefer_primary_constructors = true # (IDE0290)
csharp_prefer_system_threading_lock = true # (IDE0330)
# Expression-bodied members
csharp_style_expression_bodied_constructors = when_on_single_line # (IDE0021)
csharp_style_expression_bodied_methods = when_on_single_line # (IDE0022)
csharp_style_expression_bodied_operators = when_on_single_line # (IDE0023 & IDE0024)
csharp_style_expression_bodied_properties = when_on_single_line # (IDE0025)
csharp_style_expression_bodied_indexers = when_on_single_line # (IDE0026)
csharp_style_expression_bodied_accessors = when_on_single_line # (IDE0027)
csharp_style_expression_bodied_lambdas = when_on_single_line # (IDE0053)
csharp_style_expression_bodied_local_functions = when_on_single_line # (IDE0061)
# Expression-level preferences
dotnet_style_object_initializer = true # (IDE0017)
dotnet_style_collection_initializer = true # (IDE0028)
dotnet_style_coalesce_expression = true # (IDE0029 & IDE0030 & IDE0270)
dotnet_style_null_propagation = true # (IDE0031)
dotnet_style_prefer_auto_properties = true # (IDE0032)
dotnet_style_explicit_tuple_names = true # (IDE0033)
dotnet_style_prefer_inferred_tuple_names = true # (IDE0037)
dotnet_style_prefer_inferred_anonymous_type_member_names = true # (IDE0037)
dotnet_style_prefer_is_null_check_over_reference_equality_method = true # (IDE0041)
dotnet_style_prefer_conditional_expression_over_assignment = true # (IDE0045)
dotnet_style_prefer_conditional_expression_over_return = true # (IDE0046)
dotnet_style_prefer_compound_assignment = true # (IDE0054 & IDE0074)
csharp_style_unused_value_expression_statement_preference = discard_variable # (IDE0058)
csharp_style_unused_value_assignment_preference = discard_variable # (IDE0059)
dotnet_style_prefer_simplified_interpolation = true # (IDE0066)
dotnet_style_prefer_simplified_boolean_expressions = true # (IDE0075)
dotnet_style_namespace_match_folder = true # (IDE0130) - Unable to find Resharper setting
csharp_style_throw_expression = true # (IDE0016)
csharp_style_inlined_variable_declaration = true # (IDE0018)
csharp_prefer_simple_default_expression = true # (IDE0034)
csharp_style_prefer_local_over_anonymous_function = true # (IDE0039)
csharp_style_pattern_local_over_anonymous_function = false # Temp Resharper setting for line above
csharp_style_deconstructed_variable_declaration = true # (IDE0042)
csharp_style_prefer_index_operator = true # (IDE0056)
csharp_style_prefer_range_operator = true # (IDE0057)
csharp_style_implicit_object_creation_when_type_is_apparent = true # (IDE0090)
resharper_object_creation_when_type_evident = target_typed # Temp Resharper setting for line above
csharp_style_prefer_null_check_over_type_check = true # (IDE0150) - Unable to find Resharper setting
csharp_style_prefer_tuple_swap = true # (IDE0180) - Unable to find Resharper setting
dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed # (IDE0220) - Unable to find Resharper setting
csharp_style_prefer_utf8_string_literals = true # (IDE0230) - Unable to find Resharper setting
dotnet_style_prefer_collection_expression = when_types_loosely_match # (IDE0300 & IDE0301)
# Field preferences
dotnet_style_readonly_field = true # (IDE0044)
# Language keyword vs. framework types preferences
dotnet_style_predefined_type_for_locals_parameters_members = true:warning # (IDE0049)
dotnet_style_predefined_type_for_member_access = true:suggestion # (IDE0049)
# Modifier preferences
csharp_preferred_modifier_order = public, private, protected, internal, new, abstract, virtual, sealed, override, static, readonly, extern, unsafe, volatile, async:suggestion # (IDE0036)
dotnet_style_require_accessibility_modifiers = for_non_interface_members:warning # (IDE0040)
csharp_prefer_static_local_function = true # (IDE0062)
csharp_style_prefer_readonly_struct = true # (IDE0250) - Unable to find Resharper setting
csharp_style_prefer_readonly_struct_member = true # (IDE0251) - Unable to find Resharper setting
csharp_prefer_static_anonymous_function = false # (IDE0320)
# New-line preferences
# No options
# Null-checking preferences
csharp_style_conditional_delegate_call = true # (IDE1005)
# Parameter preferences
dotnet_code_quality_unused_parameters = all # (IDE0060)
# Parentheses preferences
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:suggestion # (IDE0047 & IDE0048)
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:suggestion # (IDE0047 & IDE0048)
dotnet_style_parentheses_in_other_binary_operators = never_if_unnecessary:suggestion # (IDE0047 & IDE0048)
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion # (IDE0047 & IDE0048)
# Pattern-matching preferences
csharp_style_pattern_matching_over_as_with_null_check = true # (IDE0019 & IDE0260)
csharp_style_pattern_matching_over_is_with_cast_check = true # (IDE0020 & IDE0038)
csharp_style_prefer_switch_expression = true # (IDE0066)
csharp_style_prefer_pattern_matching = true # (IDE0078)
csharp_style_prefer_not_pattern = true # (IDE0083)
csharp_style_prefer_extended_property_pattern = true # (IDE0170) - Unable to find Resharper setting
# Suppression preferences
dotnet_remove_unnecessary_suppression_exclusions = none # (IDE0079) - Unable to find Resharper setting
# This preferences
dotnet_style_qualification_for_field = false:suggestion # (IDE0003 & IDE0009)
dotnet_style_qualification_for_property = false:suggestion # (IDE0003 & IDE0009)
dotnet_style_qualification_for_method = false:suggestion # (IDE0003 & IDE0009)
dotnet_style_qualification_for_event = false:suggestion # (IDE0003 & IDE0009)
# var preferences
csharp_style_var_for_built_in_types = true:suggestion # (IDE0007 & IDE0008)
csharp_style_var_when_type_is_apparent = true:suggestion # (IDE0007 & IDE0008)
csharp_style_var_elsewhere = true:suggestion # (IDE0007 & IDE0008)
#### ReSharper properties ####
# Many of these are reported as "Property Unsupported" but they appear in the Rider docs
resharper_align_multiline_binary_expressions_chain = false
resharper_blank_lines_after_control_transfer_statements = 1
resharper_blank_lines_around_single_line_auto_property = 0
resharper_blank_lines_around_single_line_local_method = 1
resharper_blank_lines_around_single_line_property = 0
resharper_braces_for_for = required
resharper_braces_for_foreach = required
resharper_braces_for_ifelse = required
resharper_braces_for_while = required
resharper_braces_redundant = true
resharper_csharp_anonymous_method_declaration_braces = next_line_shifted_2
resharper_csharp_blank_lines_around_single_line_invocable = 1
resharper_csharp_blank_lines_inside_region = 0
resharper_csharp_empty_block_style = together_same_line
resharper_csharp_insert_final_newline = true
resharper_csharp_keep_blank_lines_in_code = 1
resharper_csharp_max_line_length = 120
resharper_csharp_new_line_before_while = true
resharper_csharp_place_type_constraints_on_same_line = false
resharper_csharp_stick_comment = false
resharper_csharp_wrap_after_declaration_lpar = true
resharper_csharp_wrap_after_invocation_lpar = true
resharper_csharp_wrap_arguments_style = chop_if_long
resharper_csharp_wrap_before_binary_opsign = true
resharper_csharp_wrap_before_first_type_parameter_constraint = true
resharper_csharp_wrap_chained_method_calls = chop_if_long
resharper_csharp_wrap_extends_list_style = chop_if_long
resharper_csharp_wrap_parameters_style = chop_if_long
resharper_css_insert_final_newline = true
resharper_html_insert_final_newline = true
resharper_indent_nested_foreach_stmt = true
resharper_indent_nested_for_stmt = true
resharper_indent_nested_while_stmt = true
resharper_js_insert_final_newline = true
resharper_keep_existing_arrangement = false
resharper_keep_existing_declaration_block_arrangement = false
resharper_keep_existing_embedded_arrangement = false
resharper_keep_existing_embedded_block_arrangement = false
resharper_keep_existing_enum_arrangement = false
resharper_keep_existing_expr_member_arrangement = false
resharper_keep_existing_initializer_arrangement = false
resharper_keep_existing_linebreaks = false
resharper_local_function_body = expression_body
resharper_max_array_initializer_elements_on_line = 1
resharper_max_enum_members_on_line = 1
resharper_max_initializer_elements_on_line = 1
resharper_method_or_operator_body = expression_body
resharper_place_accessorholder_attribute_on_same_line = False
resharper_place_constructor_initializer_on_same_line = false
resharper_place_simple_embedded_statement_on_same_line = false
resharper_protobuf_insert_final_newline = false
resharper_resx_insert_final_newline = true
resharper_space_within_empty_braces = true
resharper_space_within_single_line_array_initializer_braces = true
resharper_use_heuristics_for_body_style = true
resharper_vb_insert_final_newline = true
resharper_xmldoc_insert_final_newline = true
resharper_xml_insert_final_newline = true
resharper_wrap_before_linq_expression = false
resharper_wrap_chained_binary_expressions = chop_if_long
resharper_wrap_array_initializer_style = chop_if_long
resharper_xml_linebreaks_inside_tags_for_multiline_elements = false
resharper_xml_wrap_around_elements = false
# ReSharper inspection severities
resharper_arrange_accessor_owner_body_highlighting = hint
resharper_arrange_attributes_highlighting = suggestion
resharper_arrange_constructor_or_destructor_body_highlighting = hint
resharper_arrange_local_function_body_highlighting = hint
resharper_arrange_method_or_operator_body_highlighting = hint
resharper_arrange_this_qualifier_highlighting = hint
resharper_built_in_type_reference_style_for_member_access_highlighting = hint
resharper_class_never_instantiated_global_highlighting = none
resharper_class_never_instantiated_local_highlighting = none
resharper_enforce_do_while_statement_braces_highlighting = warning
resharper_enforce_fixed_statement_braces_highlighting = warning
resharper_enforce_foreach_statement_braces_highlighting = warning
resharper_enforce_for_statement_braces_highlighting = warning
resharper_enforce_if_statement_braces_highlighting = warning
resharper_enforce_lock_statement_braces_highlighting = warning
resharper_enforce_using_statement_braces_highlighting = warning
resharper_enforce_while_statement_braces_highlighting = warning
resharper_explicit_caller_info_argument_highlighting = none
resharper_heuristic_unreachable_code_highlighting = none
resharper_member_can_be_protected_global_highlighting = none
resharper_redundant_base_qualifier_highlighting = warning
resharper_redundant_case_label_highlighting = none
resharper_redundant_comma_in_enum_declaration_highlighting = none
resharper_redundant_using_directive_highlighting = error
resharper_tabs_are_disallowed_highlighting = warning
resharper_unnecessary_whitespace_highlighting = warning
# Default severity for analyzer diagnostics with category 'Style' (IDExxxx) (escalated to build warnings)
dotnet_analyzer_diagnostic.category-Style.severity = warning
# CA1812 is flagged for all internal classes used in DI or Serialization
dotnet_diagnostic.CA1812.severity = none
# CA1848 requires a lot of code to specify Log Messages. Should only be needed in high perf
dotnet_diagnostic.CA1848.severity = none
# CA1308 tries to make user facing string upper case
dotnet_diagnostic.CA1308.severity = none
# CA1303 wants localization of text - I'm unlikely to do this
dotnet_diagnostic.CA1303.severity = none
# CA2007 only applies to libraries that may be consumed by UI frameworks
dotnet_diagnostic.CA2007.severity = none
# CA1873 flags logging calls as expensive - not a concern for this project
dotnet_diagnostic.CA1873.severity = none
# Workaround for https://github.com/dotnet/roslyn/issues/41640
dotnet_diagnostic.IDE0005.severity = suggestion
dotnet_analyzer_diagnostic.category-roslynator.severity = warning
# RCS1181 prevents use of simple comments to explain private fields
dotnet_diagnostic.RCS1181.severity = none
# RCS1123 fights with IDE0047
dotnet_diagnostic.RCS1123.severity = none
[*.{yml,aiproj,appxmanifest,axml,build,config,csproj,dbml,discomap,DotSettings,dtd,json,jsproj,lsproj,njsproj,nuspec,proj,props,resjson,resw,resx,StyleCop,targets,tasks,vbproj,xml,xsd}]
indent_size = 2
tab_width = 2
[{*.makefile,makefile}]
indent_style = tab
indent_size = tab