-
-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy path.editorconfig
More file actions
557 lines (480 loc) · 25 KB
/
Copy path.editorconfig
File metadata and controls
557 lines (480 loc) · 25 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
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
# If you wanna change a setting maybe drop a comment in slack to see what everyone thinks first.
# Some useful references...
# http://editorconfig.org/
# http://editorconfig.org/#supported-properties
# https://docs.microsoft.com/en-us/visualstudio/ide/create-portable-custom-editor-options
# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-naming-conventions
# https://kent-boogaart.com/blog/editorconfig-reference-for-c-developers
# https://www.jetbrains.com/help/resharper/EditorConfig_Index.html
root = true
[*]
indent_style = space
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj,props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
indent_size = 2
[*.{xml,xaml}]
indent_size = 4
[*.json]
indent_size = 2
[*.{js,ts}]
indent_size = 4
[*.{html,htm}]
indent_size = 4
[*.cs]
# misc
dotnet_sort_system_directives_first = true
# Note: CSharpier enforces a print width of 100 by default, so this is mainly for editor guidance
max_line_length = 100
# indentation and white space
indent_size = 4
end_of_line = crlf
charset = utf-8-bom
trim_trailing_whitespace = true
insert_final_newline = true
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_labels = one_less_than_current
csharp_indent_switch_labels = true
# namespace declarations (C# 10+)
csharp_style_namespace_declarations = file_scoped : warning
# using directives
csharp_using_directive_placement = outside_namespace : warning
# spacing
csharp_space_after_cast = false
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 = do_not_ignore
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
# var usage
csharp_style_var_when_type_is_apparent = true : suggestion
csharp_style_var_elsewhere = true : suggestion
csharp_style_var_for_built_in_types = true : suggestion
# Prefer method-like constructs to have a block body
csharp_style_expression_bodied_methods = false : none
csharp_style_expression_bodied_constructors = false : none
csharp_style_expression_bodied_operators = false : none
# Prefer property-like constructs to have an expression-body
csharp_style_expression_bodied_properties = true : suggestion
csharp_style_expression_bodied_indexers = true : suggestion
csharp_style_expression_bodied_accessors = true : suggestion
csharp_style_expression_bodied_local_functions = false : none
csharp_style_expression_bodied_lambdas = true : suggestion
# Suggest more modern language features when available
csharp_style_pattern_matching_over_is_with_cast_check = true : suggestion
csharp_style_pattern_matching_over_as_with_null_check = true : suggestion
csharp_style_inlined_variable_declaration = true : suggestion
csharp_style_throw_expression = true : suggestion
csharp_style_conditional_delegate_call = true : suggestion
csharp_style_prefer_switch_expression = true : suggestion
csharp_style_prefer_not_pattern = true : suggestion
csharp_style_prefer_pattern_matching = true : suggestion
csharp_style_prefer_null_check_over_type_check = true : suggestion
# target-typed new (C# 9+)
csharp_style_implicit_object_creation_when_type_is_apparent = true : suggestion
# primary constructors (C# 12+)
csharp_style_prefer_primary_constructors = true : warning
# collection expressions (C# 12+)
dotnet_style_prefer_collection_expression = true : suggestion
# newline & brace settings
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_prefer_braces = true : error
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = false
csharp_prefer_simple_default_expression = true : suggestion
csharp_new_line_between_query_expression_clauses = true
# qualification with 'this' etc
dotnet_style_qualification_for_event = false : warning
dotnet_style_qualification_for_field = false : warning
dotnet_style_qualification_for_method = false : warning
dotnet_style_qualification_for_property = false : warning
# syntatic sugar preferences
dotnet_style_coalesce_expression = true : suggestion
dotnet_style_collection_initializer = true : suggestion
dotnet_style_explicit_tuple_names = true : suggestion
dotnet_style_null_propagation = true : suggestion
dotnet_style_object_initializer = true : suggestion
dotnet_style_predefined_type_for_locals_parameters_members = true : suggestion
dotnet_style_predefined_type_for_member_access = true : suggestion
dotnet_style_prefer_auto_properties = true : suggestion
dotnet_style_prefer_compound_assignment = true : suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true : suggestion
dotnet_style_prefer_conditional_expression_over_return = true : suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true : suggestion
dotnet_style_prefer_inferred_tuple_names = true : suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true : suggestion
dotnet_style_prefer_simplified_boolean_expressions = true : suggestion
dotnet_style_prefer_simplified_interpolation = true : suggestion
# custom resharper settings
# https://www.jetbrains.com/help/resharper/EditorConfig_Index.html
# tabs, indents, alignment
# general
resharper_csharp_continuous_indent_multiplier = 1
# nested statements
resharper_csharp_indent_nested_usings_stmt = false
resharper_csharp_indent_nested_fixed_stmt = false
resharper_csharp_indent_nested_lock_stmt = false
resharper_csharp_indent_nested_for_stmt = false
resharper_csharp_indent_nested_foreach_stmt = false
resharper_csharp_indent_nested_while_stmt = false
# parenthesis
resharper_csharp_use_continuous_indent_inside_parens = true
resharper_csharp_indent_method_decl_pars = inside
resharper_csharp_indent_invocation_pars = inside
resharper_csharp_indent_statement_pars = inside
resharper_csharp_indent_typeparam_angles = inside
resharper_csharp_indent_typearg_angles = inside
resharper_csharp_indent_pars = inside
# preprocessor directives
resharper_csharp_indent_preprocessor_if = no_indent
resharper_csharp_indent_preprocessor_region = usual_indent
resharper_csharp_indent_preprocessor_other = no_indent
# other idents
resharper_csharp_indent_type_constraints = true
resharper_csharp_stick_comment = true
# allow multiline constructs
resharper_csharp_alignment_tab_fill_style = use_spaces
resharper_csharp_align_multiline_parameter = true
resharper_csharp_align_multiline_extends_list = false
resharper_csharp_align_linq_query = false
resharper_csharp_align_multiline_binary_expressions_chain = true
resharper_csharp_outdent_binary_ops = false
resharper_csharp_align_multiline_calls_chain = true
resharper_csharp_outdent_dots = false
resharper_csharp_align_multiline_array_and_object_initializer = false
resharper_csharp_indent_anonymous_method_block = false
resharper_csharp_align_first_arg_by_paren = true
resharper_csharp_align_multiline_argument = true
resharper_csharp_align_tuple_components = false
resharper_csharp_align_multiline_expression = false
resharper_csharp_align_multiline_for_stmt = true
resharper_csharp_align_multiple_declaration = false
resharper_csharp_align_multline_type_parameter_list = false
resharper_csharp_align_multline_type_parameter_constrains = false
resharper_csharp_outdent_commas = false
# align similar code in columns
resharper_csharp_int_align_fields = false
resharper_csharp_int_align_properties = false
resharper_csharp_int_align_methods = false
resharper_csharp_int_align_parameters = false
resharper_csharp_int_align_variables = false
resharper_csharp_int_align_assignments = false
resharper_csharp_int_align_nested_ternary = false
resharper_csharp_int_align_invocations = false
resharper_csharp_int_align_binary_expressions = false
resharper_csharp_int_align_comments = false
resharper_csharp_int_align_switch_sections = false
# braces layout
resharper_csharp_allow_comment_after_lbrace = false
resharper_csharp_empty_block_style = multiline
# blank lines
# general
resharper_csharp_blank_lines_around_region = 1
resharper_csharp_blank_lines_inside_region = 1
resharper_csharp_blank_lines_before_single_line_comment = 0
# blank lines in declarations
resharper_csharp_keep_blank_lines_in_declarations = 2
resharper_csharp_remove_blank_lines_near_braces_in_declarations = true
resharper_csharp_blank_lines_after_start_comment = 1
resharper_csharp_blank_lines_between_using_groups = 0
resharper_csharp_blank_lines_after_using_list = 1
resharper_csharp_blank_lines_around_namespace = 1
resharper_csharp_blank_lines_inside_namespace = 0
resharper_csharp_blank_lines_around_type = 1
resharper_csharp_blank_lines_inside_type = 0
resharper_csharp_blank_lines_around_field = 1
resharper_csharp_blank_lines_around_single_line_field = 0
resharper_csharp_blank_lines_around_property = 1
resharper_csharp_blank_lines_around_single_line_property = 0
resharper_csharp_blank_lines_around_auto_property = 1
resharper_csharp_blank_lines_around_single_line_auto_property = 0
resharper_csharp_blank_lines_around_invocable = 1
resharper_csharp_blank_lines_around_single_line_invocable = 0
# blank lines in code
resharper_csharp_keep_blank_lines_in_code = 2
resharper_csharp_remove_blank_lines_near_braces_in_code = true
resharper_csharp_blank_lines_around_local_method = 1
resharper_csharp_blank_lines_around_single_line_local_method = 0
resharper_csharp_blank_lines_before_control_transfer_statements = 0
resharper_csharp_blank_lines_after_control_transfer_statements = 0
resharper_csharp_blank_lines_before_block_statements = 0
resharper_csharp_blank_lines_after_block_statements = 1
resharper_csharp_blank_lines_before_multiline_statements = 0
resharper_csharp_blank_lines_after_multiline_statements = 0
# line breaks
# general
resharper_csharp_keep_user_linebreaks = true
resharper_csharp_wrap_before_comma = false
resharper_csharp_special_else_if_treatment = true
# arrangement of attributes
resharper_csharp_max_attribute_length_for_same_line = 38
resharper_csharp_keep_existing_attribute_arrangement = false
resharper_csharp_place_type_attribute_on_same_line = never
resharper_csharp_place_method_attribute_on_same_line = never
resharper_csharp_place_accessorholder_attribute_on_same_line = never
resharper_csharp_place_accessor_attribute_on_same_line = if_owner_is_single_line
resharper_csharp_place_field_attribute_on_same_line = always
# arrangement of method signature
resharper_csharp_wrap_parameters_style = chop_if_long
resharper_csharp_wrap_before_declaration_lpar = false
resharper_csharp_wrap_after_declaration_lpar = false
resharper_csharp_place_constructor_initializer_on_same_line = true
# body style preferences (aligns with csharp_style_expression_bodied_* settings)
resharper_csharp_accessor_owner_body = expression_body
resharper_csharp_method_or_operator_body = block_body
resharper_csharp_constructor_or_destructor_body = block_body
resharper_csharp_local_function_body = block_body
# arrangement of expression bodied members
resharper_csharp_keep_existing_expr_member_arrangement = false
resharper_csharp_place_expr_method_on_single_line = if_owner_is_single_line
resharper_csharp_place_expr_property_on_single_line = if_owner_is_single_line
resharper_csharp_place_expr_accessor_on_single_line = if_owner_is_single_line
resharper_csharp_wrap_before_arrow_with_expressions = false
# arrangement of type parameters, contraints and base types
resharper_csharp_place_type_constraints_on_same_line = true
resharper_csharp_wrap_before_first_type_parameter_constraint = false
resharper_csharp_wrap_multiple_type_parameter_constraints_style = chop_if_long
resharper_csharp_wrap_before_type_parameter_langle = false
resharper_csharp_wrap_before_extends_colon = false
resharper_csharp_wrap_extends_list_style = wrap_if_long
# arrangement of declaration blocks
resharper_csharp_keep_existing_declaration_block_arrangement = false
resharper_csharp_place_abstract_accessorholder_on_single_line = true
resharper_csharp_place_simple_accessorholder_on_single_line = false
resharper_csharp_place_accessor_with_attrs_holder_on_single_line = false
resharper_csharp_place_simple_accessor_on_single_line = true
resharper_csharp_place_simple_method_on_single_line = false
# arrangement of statements
resharper_csharp_new_line_before_while = false
resharper_csharp_wrap_for_stmt_header_style = chop_if_long
resharper_csharp_wrap_multiple_declaration_style = chop_if_long
# arrangement of embedded statement
resharper_csharp_keep_existing_embedded_arrangement = true
resharper_csharp_place_simple_embedded_statement_on_same_line = if_owner_is_single_line
resharper_csharp_place_simple_case_statement_on_same_line = never
# arrangement of embedded blocks
resharper_csharp_keep_existing_embedded_block_arrangement = false
resharper_csharp_place_simple_embedded_block_on_same_line = false
resharper_csharp_place_simple_anonymousmethod_on_single_line = true
# arrangement of initializers
resharper_csharp_keep_existing_initializer_arrangement = true
resharper_csharp_place_simple_initializer_on_single_line = true
resharper_csharp_wrap_array_initializer_style = wrap_if_long
# arrangement of invocations
resharper_csharp_wrap_arguments_style = wrap_if_long
resharper_csharp_wrap_before_invocation_lpar = false
resharper_csharp_wrap_after_invocation_lpar = false
# arrangement of member access expressions
resharper_csharp_wrap_after_dot_in_method_calls = false
resharper_csharp_wrap_chained_method_calls = wrap_if_long
# arrangement of binary expressions
resharper_csharp_wrap_before_binary_opsign = false
resharper_csharp_wrap_chained_binary_expressions = wrap_if_long
resharper_csharp_force_chop_compound_if_expression = false
resharper_csharp_force_chop_compound_while_expression = false
resharper_csharp_force_chop_compound_do_expression = false
# arrangement of ternary expressions
resharper_csharp_wrap_before_ternary_opsigns = true
resharper_csharp_wrap_ternary_expr_style = chop_if_long
resharper_csharp_nested_ternary_style = autodetect
# arrangement of linq expressions
resharper_csharp_wrap_linq_expressions = chop_if_long
# spaces
# preserve existing formatting
resharper_csharp_extra_spaces = remove_all
# before other parentheses
resharper_csharp_space_before_typeof_parentheses = false
resharper_csharp_space_before_default_parentheses = false
resharper_csharp_space_before_checked_parentheses = false
resharper_csharp_space_before_sizeof_parentheses = false
resharper_csharp_space_before_nameof_parentheses = false
resharper_csharp_space_between_keyword_and_expression = true
# within other parentheses
resharper_csharp_space_within_typeof_parentheses = false
resharper_csharp_space_within_default_parentheses = false
resharper_csharp_space_within_checked_parentheses = false
resharper_csharp_space_within_sizeof_parentheses = false
resharper_csharp_space_within_nameof_parentheses = false
# around angle brackets
resharper_csharp_space_before_type_parameter_angle = false
resharper_csharp_space_before_type_argument_angle = false
resharper_csharp_space_within_type_parameter_angles = false
resharper_csharp_space_within_type_argument_angles = false
# around braces
resharper_csharp_space_before_singleline_accessorholder = true
resharper_csharp_space_in_singleline_accessorholder = true
resharper_csharp_space_between_accessors_in_singleline_property = true
resharper_csharp_space_within_empty_braces = true
resharper_csharp_space_in_singleline_method = true
resharper_csharp_space_in_singleline_anonymous_method = true
resharper_csharp_space_within_single_line_array_initializer_braces = true
# around binary operators
resharper_csharp_space_around_arrow_op = false
# around unary operators
resharper_csharp_space_after_logical_not_op = false
resharper_csharp_space_after_unary_minus_op = false
resharper_csharp_space_after_unary_plus_op = false
resharper_csharp_space_after_ampersand_op = false
resharper_csharp_space_after_asterik_op = false
resharper_csharp_space_near_postfix_and_prefix_op = false
# in ternary operator
resharper_csharp_space_before_ternary_quest = true
resharper_csharp_space_after_ternary_quest = true
resharper_csharp_space_before_ternary_colon = true
resharper_csharp_space_after_ternary_colon = true
# around command ans semicolon
resharper_csharp_space_before_semicolon = false
# around colon
resharper_csharp_space_before_colon_in_case = false
resharper_csharp_space_before_type_parameter_constraint_colon = true
resharper_csharp_space_after_type_parameter_constraint_colon = true
resharper_csharp_space_before_attribute_colon = false
resharper_csharp_space_after_attribute_colon = true
# attributes
resharper_csharp_space_between_attribute_sections = true
resharper_csharp_space_after_attributes = true
# other
resharper_csharp_space_around_lambda_arrow = true
resharper_csharp_space_before_pointer_asterik_declaration = false
resharper_csharp_space_before_nullable_mark = false
resharper_csharp_space_around_alias_eq = false
resharper_csharp_space_before_trailing_comment = true
resharper_csharp_space_after_operator_keyword = true
# other
resharper_csharp_old_engine = false
xmldoc_indent_style = space
xmldoc_indent_size = 2
resharper_xmldoc_wrap_tags_and_pi = false
resharper_xmldoc_spaces_around_eq_in_pi_attribute = false
resharper_xmldoc_space_after_last_pi_attribute = true
resharper_xmldoc_pi_attribute_style = do_not_touch
resharper_xmldoc_pi_attributes_indent = align_by_first_attribute
resharper_xmldoc_blank_line_after_pi = false
resharper_xmldoc_spaces_around_eq_in_attribute = false
resharper_xmldoc_space_after_last_attribute = true
resharper_xmldoc_space_before_self_closing = true
resharper_xmldoc_attribute_style = do_not_touch
resharper_xmldoc_attribute_indent = align_by_first_attribute
resharper_xmldoc_keep_user_linebreaks = true
resharper_xmldoc_linebreaks_inside_tags_for_multiline_elements = true
resharper_xmldoc_linebreaks_inside_tags_for_elements_with_child_elements = true
resharper_xmldoc_linebreaks_inside_tags_for_elements_longer_than = 1
resharper_xmldoc_spaces_inside_tags = false
resharper_xmldoc_wrap_text = true
resharper_xmldoc_wrap_around_elements = false
resharper_xmldoc_indent_child_elements = oneindent
resharper_xmldoc_indent_text = zeroindent
resharper_xmldoc_max_blank_lines_between_tags = false
resharper_xmldoc_linebreak_before_singleline_elements = false
# naming rules etc...
# const fields should be pascal cased
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
dotnet_naming_symbols.constant_fields.applicable_kinds = field
dotnet_naming_symbols.constant_fields.required_modifiers = const
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
# private fields should be camel cased.
dotnet_naming_symbols.private_field_symbol.applicable_kinds = field
dotnet_naming_symbols.private_field_symbol.applicable_accessibilities = private
dotnet_naming_style.private_field_style.capitalization = camel_case
dotnet_naming_style.private_field_style.required_prefix = _
dotnet_naming_rule.private_fields_are_camel_case.severity = error
dotnet_naming_rule.private_fields_are_camel_case.symbols = private_field_symbol
dotnet_naming_rule.private_fields_are_camel_case.style = private_field_style
# non-private fields should be pascal cased
dotnet_naming_symbols.non_private_field_symbol.applicable_kinds = field
dotnet_naming_symbols.non_private_field_symbol.applicable_accessibilities = public, internal, friend, protected, protected_internal, protected_friend
dotnet_naming_style.non_private_field_style.capitalization = pascal_case
dotnet_naming_rule.non_private_fields_are_pascal_case.severity = error
dotnet_naming_rule.non_private_fields_are_pascal_case.symbols = non_private_field_symbol
dotnet_naming_rule.non_private_fields_are_pascal_case.style = non_private_field_style
# parameters should be camel cased
dotnet_naming_symbols.parameter_symbol.applicable_kinds = parameter
dotnet_naming_style.parameter_style.capitalization = camel_case
dotnet_naming_rule.parameters_are_camel_case.severity = error
dotnet_naming_rule.parameters_are_camel_case.symbols = parameter_symbol
dotnet_naming_rule.parameters_are_camel_case.style = parameter_style
# type symbols (except interfaces) should be camel cased
dotnet_naming_symbols.non_interface_type_symbol.applicable_kinds = class, struct, enum, delegate
dotnet_naming_style.non_interface_type_style.capitalization = pascal_case
dotnet_naming_rule.non_interface_types_are_pascal_case.severity = error
dotnet_naming_rule.non_interface_types_are_pascal_case.symbols = non_interface_type_symbol
dotnet_naming_rule.non_interface_types_are_pascal_case.style = non_interface_type_style
# interface symbol should be prefixed with I and pascal cased
dotnet_naming_symbols.interface_type_symbol.applicable_kinds = interface
dotnet_naming_style.interface_type_style.capitalization = pascal_case
dotnet_naming_style.interface_type_style.required_prefix = I
dotnet_naming_rule.interface_types_must_be_prefixed_with_I.severity = error
dotnet_naming_rule.interface_types_must_be_prefixed_with_I.symbols = interface_type_symbol
dotnet_naming_rule.interface_types_must_be_prefixed_with_I.style = interface_type_style
# member symbols should be pascal cased
dotnet_naming_symbols.member_symbol.applicable_kinds = method, property, event
dotnet_naming_style.member_style.capitalization = pascal_case
dotnet_naming_rule.members_are_pascal_case.severity = error
dotnet_naming_rule.members_are_pascal_case.symbols = member_symbol
dotnet_naming_rule.members_are_pascal_case.style = member_style
# internal and private fields should be camelCase and prefixed with _ (this goes against MS guidelines but this seems to be more common in the code)
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
dotnet_naming_style.camel_case_underscore_style.required_prefix = _
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
# Meziantou.Analyzer rules
# https://github.com/meziantou/Meziantou.Analyzer/tree/main/docs/Rules
# MA0002: Use IEqualityComparer/IComparer - HashSet/Dictionary use ordinal by default which is correct for most cases
dotnet_diagnostic.MA0002.severity = suggestion
# MA0004: Use Task.ConfigureAwait
dotnet_diagnostic.MA0004.severity = suggestion
# MA0006: Use string.Equals instead of == for string comparison
dotnet_diagnostic.MA0006.severity = suggestion
# MA0011: IFormatProvider is missing
dotnet_diagnostic.MA0011.severity = suggestion
# MA0015: Specify the parameter name in ArgumentException - lowered since validation methods validate properties not parameters
dotnet_diagnostic.MA0015.severity = suggestion
# MA0016: Prefer using collection abstraction instead of implementation
dotnet_diagnostic.MA0016.severity = suggestion
# MA0018: Do not declare static members on generic types
dotnet_diagnostic.MA0018.severity = suggestion
# MA0026: Fix TODO comment
dotnet_diagnostic.MA0026.severity = suggestion
# MA0039: Do not write your own certificate validation method - intentional for simulator to accept self-signed certs
dotnet_diagnostic.MA0039.severity = none
# MA0048: File name must match type name - noisy for internal helper types in same file
dotnet_diagnostic.MA0048.severity = suggestion
# MA0049: Type name should not match containing namespace
dotnet_diagnostic.MA0049.severity = suggestion
# MA0051: Method is too long
dotnet_diagnostic.MA0051.severity = suggestion
# MA0055: Do not use finalizer - allowed in test fixtures for cleanup safety nets
dotnet_diagnostic.MA0055.severity = suggestion
# MA0158: Use System.Threading.Lock (.NET 9+) - lowered due to multi-targeting .NET 8 which doesn't have Lock
dotnet_diagnostic.MA0158.severity = suggestion
# MA0074: Use overload with StringComparison parameter
dotnet_diagnostic.MA0074.severity = warning
# MA0099: Use the null-forgiving operator with caution (disallow !)
dotnet_diagnostic.MA0099.severity = warning