-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.editorconfig
More file actions
572 lines (489 loc) · 32.2 KB
/
Copy path.editorconfig
File metadata and controls
572 lines (489 loc) · 32.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
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
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
root = true
# All files
[*]
indent_style = space
indent_size = 4
tab_width = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 200
# Xml files
[*.{xml,csproj,props,targets,ruleset,nuspec,resx}]
indent_size = 2
# Json files
[*.{json,config,nswag}]
indent_size = 2
# C# files
[*.cs]
# .NET Coding Conventions
# Organize usings
dotnet_separate_import_directive_groups = false
dotnet_sort_system_directives_first = true
file_header_template = unset
# this. and Me. preferences
dotnet_style_qualification_for_event = false:error
dotnet_style_qualification_for_field = false:error
dotnet_style_qualification_for_method = false:error
dotnet_style_qualification_for_property = false:error
# Language keywords vs BCL types preferences
dotnet_style_predefined_type_for_locals_parameters_members = true:error
dotnet_style_predefined_type_for_member_access = true:error
# Parentheses preferences
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
# Modifier preferences
dotnet_style_require_accessibility_modifiers = for_non_interface_members:error
# Expression-level 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_operator_placement_when_wrapping = beginning_of_line
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
# Field preferences
dotnet_style_readonly_field = true:warning
# Parameter preferences
dotnet_code_quality_unused_parameters = all:suggestion
# Suppression preferences
dotnet_remove_unnecessary_suppression_exclusions = none
# var preferences
csharp_style_var_elsewhere = true:error
csharp_style_var_for_built_in_types = true:error
csharp_style_var_when_type_is_apparent = true:error
# Expression-bodied members
csharp_style_expression_bodied_accessors = true:warning
csharp_style_expression_bodied_constructors = false:silent
csharp_style_expression_bodied_indexers = true:warning
csharp_style_expression_bodied_lambdas = true:suggestion
csharp_style_expression_bodied_local_functions = false:silent
csharp_style_expression_bodied_methods = false:silent
csharp_style_expression_bodied_operators = true:warning
csharp_style_expression_bodied_properties = true:warning
# Pattern matching preferences
csharp_style_pattern_matching_over_as_with_null_check = true:warning
csharp_style_pattern_matching_over_is_with_cast_check = true:warning
csharp_style_prefer_not_pattern = true:suggestion
csharp_style_prefer_pattern_matching = true:silent
csharp_style_prefer_switch_expression = true:suggestion
# Null-checking preferences
csharp_style_conditional_delegate_call = true:error
# Modifier preferences
csharp_prefer_static_local_function = true:warning
csharp_preferred_modifier_order = public, private, protected, internal, static, extern, new, virtual, abstract, sealed, override, readonly, unsafe, volatile, async:silent
# Code-block preferences
csharp_prefer_braces = true:error
csharp_prefer_simple_using_statement = true:suggestion
# Expression-level preferences
csharp_prefer_simple_default_expression = true:suggestion
csharp_style_deconstructed_variable_declaration = true:warning
csharp_style_inlined_variable_declaration = true:error
csharp_style_pattern_local_over_anonymous_function = true:suggestion
csharp_style_prefer_index_operator = true:suggestion
csharp_style_prefer_range_operator = true:suggestion
csharp_style_throw_expression = true:error
csharp_style_unused_value_assignment_preference = discard_variable:warning
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
# 'using' directive preferences
csharp_using_directive_placement = inside_namespace:warning
# C# Formatting Rules
# New line preferences
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 preferences
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
# Space preferences
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 = 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
# Wrapping preferences
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true
csharp_style_namespace_declarations = file_scoped:none
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
# Project convention: conventional constructors only — dependencies guarded into private readonly fields, and a
# wide constructor stays visible as the responsibility smell it is (docs/wiki/16-code-conventions.md).
csharp_style_prefer_primary_constructors = false:suggestion
csharp_style_prefer_null_check_over_type_check = true:suggestion
csharp_style_prefer_local_over_anonymous_function = true:suggestion
csharp_style_implicit_object_creation_when_type_is_apparent = false
csharp_style_prefer_tuple_swap = true:suggestion
csharp_style_prefer_utf8_string_literals = true:suggestion
# Application-specific exception types are not a public reusable framework and intentionally expose only the
# constructors their call sites use; DI/reflection-created implementation types are not visible to CA1812.
dotnet_diagnostic.CA1032.severity = none # 120 violations (distinct source lines) measured 2026-09-17
dotnet_diagnostic.CA1812.severity = none # 59 violations (distinct source lines) measured 2026-09-17
# Catch blocks sometimes translate or aggregate failures for a caller that owns the final log entry; requiring every
# catch to log the exception would duplicate operator-visible errors.
dotnet_diagnostic.S6667.severity = none # 88 violations (distinct source lines) measured 2026-09-17
# Rider Code Cleanup reorders type members and splits overloads apart; let the layout win instead of fighting S4136 every build.
dotnet_diagnostic.S4136.severity = none # 40 violations (distinct source lines) measured 2026-09-17
# ReSharper properties
resharper_enforce_line_ending_style = true
resharper_formatter_off_tag = @formatter:off
resharper_formatter_on_tag = @formatter:on
resharper_formatter_tags_enabled = true
# ReSharper inspection severities
# DTOs/options/payloads are populated by reflection (System.Text.Json, SignalR, model/config binding), which the
# analyzer can't see, so it wrongly thinks the init accessor is unused. Disabling stops Cleanup from stripping
# `init` and turning the property get-only, which breaks deserialization and the E2E tests that assert on it.
resharper_auto_property_can_be_made_get_only_global_highlighting = none
resharper_auto_property_can_be_made_get_only_local_highlighting = none
resharper_unused_auto_property_accessor_global_highlighting = none
resharper_unused_auto_property_accessor_local_highlighting = none
resharper_arrange_redundant_parentheses_highlighting = hint
resharper_arrange_this_qualifier_highlighting = hint
resharper_arrange_type_member_modifiers_highlighting = hint
resharper_arrange_type_modifiers_highlighting = hint
resharper_built_in_type_reference_style_for_member_access_highlighting = hint
resharper_built_in_type_reference_style_highlighting = hint
resharper_mvc_action_not_resolved_highlighting = warning
resharper_mvc_area_not_resolved_highlighting = warning
resharper_mvc_controller_not_resolved_highlighting = warning
resharper_mvc_masterpage_not_resolved_highlighting = warning
resharper_mvc_partial_view_not_resolved_highlighting = warning
resharper_mvc_template_not_resolved_highlighting = warning
resharper_mvc_view_component_not_resolved_highlighting = warning
resharper_mvc_view_component_view_not_resolved_highlighting = warning
resharper_mvc_view_not_resolved_highlighting = warning
resharper_razor_assembly_not_resolved_highlighting = warning
resharper_redundant_base_qualifier_highlighting = warning
resharper_suggest_var_or_type_built_in_types_highlighting = hint
resharper_suggest_var_or_type_elsewhere_highlighting = hint
resharper_suggest_var_or_type_simple_types_highlighting = hint
resharper_web_config_module_not_resolved_highlighting = warning
resharper_web_config_type_not_resolved_highlighting = warning
resharper_web_config_wrong_module_highlighting = warning
resharper_align_multiline_calls_chain = true
resharper_braces_for_for = required
resharper_braces_for_foreach = required
resharper_braces_for_ifelse = required
resharper_braces_for_while = required
resharper_braces_redundant = false
resharper_csharp_max_line_length = 200
resharper_csharp_wrap_arguments_style = wrap_if_long
resharper_empty_block_style = multiline
resharper_indent_nested_fixed_stmt = true
resharper_indent_nested_foreach_stmt = true
resharper_indent_nested_for_stmt = true
resharper_indent_nested_lock_stmt = true
resharper_indent_nested_usings_stmt = true
resharper_indent_nested_while_stmt = true
resharper_keep_existing_declaration_parens_arrangement = false
resharper_keep_existing_embedded_arrangement = false
resharper_keep_existing_expr_member_arrangement = false
resharper_keep_existing_invocation_parens_arrangement = false
resharper_keep_existing_property_patterns_arrangement = false
resharper_keep_existing_switch_expression_arrangement = false
resharper_max_attribute_length_for_same_line = 0
resharper_max_enum_members_on_line = 1
resharper_max_initializer_elements_on_line = 1
resharper_max_invocation_arguments_on_line = 100000
resharper_place_simple_anonymousmethod_on_single_line = false
resharper_place_simple_initializer_on_single_line = false
resharper_place_simple_property_pattern_on_single_line = true
resharper_qualified_using_at_nested_scope = true
resharper_wrap_arguments_style = wrap_if_long
resharper_wrap_multiple_type_parameter_constraints_style = wrap_if_long
resharper_wrap_object_and_collection_initializer_style = chop_if_long
resharper_wrap_property_pattern = wrap_if_long
resharper_place_expr_method_on_single_line = false
resharper_wrap_array_initializer_style = chop_always
resharper_wrap_list_pattern = chop_always
resharper_csharp_arguments_skip_single = true
resharper_csharp_arguments_literal = named
resharper_csharp_arguments_string_literal = positional
resharper_arguments_style_literal_highlighting = warning
# Naming rules
dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.symbols = types_and_namespaces
dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.interfaces_should_be_ipascalcase.severity = suggestion
dotnet_naming_rule.interfaces_should_be_ipascalcase.symbols = interfaces
dotnet_naming_rule.interfaces_should_be_ipascalcase.style = ipascalcase
dotnet_naming_rule.type_parameters_should_be_tpascalcase.severity = suggestion
dotnet_naming_rule.type_parameters_should_be_tpascalcase.symbols = type_parameters
dotnet_naming_rule.type_parameters_should_be_tpascalcase.style = tpascalcase
dotnet_naming_rule.methods_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.methods_should_be_pascalcase.symbols = methods
dotnet_naming_rule.methods_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.properties_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.properties_should_be_pascalcase.symbols = properties
dotnet_naming_rule.properties_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.events_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.events_should_be_pascalcase.symbols = events
dotnet_naming_rule.events_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.local_variables_should_be_camelcase.severity = suggestion
dotnet_naming_rule.local_variables_should_be_camelcase.symbols = local_variables
dotnet_naming_rule.local_variables_should_be_camelcase.style = camelcase
dotnet_naming_rule.local_constants_should_be_camelcase.severity = suggestion
dotnet_naming_rule.local_constants_should_be_camelcase.symbols = local_constants
dotnet_naming_rule.local_constants_should_be_camelcase.style = camelcase
dotnet_naming_rule.parameters_should_be_camelcase.severity = suggestion
dotnet_naming_rule.parameters_should_be_camelcase.symbols = parameters
dotnet_naming_rule.parameters_should_be_camelcase.style = camelcase
dotnet_naming_rule.public_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.public_fields_should_be_pascalcase.symbols = public_fields
dotnet_naming_rule.public_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.private_fields_should_be__camelcase.severity = suggestion
dotnet_naming_rule.private_fields_should_be__camelcase.symbols = private_fields
dotnet_naming_rule.private_fields_should_be__camelcase.style = _camelcase
dotnet_naming_rule.private_static_fields_should_be_s_camelcase.severity = suggestion
dotnet_naming_rule.private_static_fields_should_be_s_camelcase.symbols = private_static_fields
dotnet_naming_rule.private_static_fields_should_be_s_camelcase.style = s_camelcase
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.symbols = public_constant_fields
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.symbols = private_constant_fields
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.symbols = public_static_readonly_fields
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.symbols = private_static_readonly_fields
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.enums_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.enums_should_be_pascalcase.symbols = enums
dotnet_naming_rule.enums_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.local_functions_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.local_functions_should_be_pascalcase.symbols = local_functions
dotnet_naming_rule.local_functions_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.non_field_members_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.non_field_members_should_be_pascalcase.symbols = non_field_members
dotnet_naming_rule.non_field_members_should_be_pascalcase.style = pascalcase
# Symbol specifications
dotnet_naming_symbols.interfaces.applicable_kinds = interface
dotnet_naming_symbols.interfaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interfaces.required_modifiers =
dotnet_naming_symbols.enums.applicable_kinds = enum
dotnet_naming_symbols.enums.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.enums.required_modifiers =
dotnet_naming_symbols.events.applicable_kinds = event
dotnet_naming_symbols.events.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.events.required_modifiers =
dotnet_naming_symbols.methods.applicable_kinds = method
dotnet_naming_symbols.methods.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.methods.required_modifiers =
dotnet_naming_symbols.properties.applicable_kinds = property
dotnet_naming_symbols.properties.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.properties.required_modifiers =
dotnet_naming_symbols.public_fields.applicable_kinds = field
dotnet_naming_symbols.public_fields.applicable_accessibilities = public, internal
dotnet_naming_symbols.public_fields.required_modifiers =
dotnet_naming_symbols.private_fields.applicable_kinds = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
dotnet_naming_symbols.private_fields.required_modifiers =
dotnet_naming_symbols.private_static_fields.applicable_kinds = field
dotnet_naming_symbols.private_static_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
dotnet_naming_symbols.private_static_fields.required_modifiers = static
dotnet_naming_symbols.types_and_namespaces.applicable_kinds = namespace, class, struct, interface, enum
dotnet_naming_symbols.types_and_namespaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types_and_namespaces.required_modifiers =
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =
dotnet_naming_symbols.type_parameters.applicable_kinds = type_parameter
dotnet_naming_symbols.type_parameters.applicable_accessibilities = *
dotnet_naming_symbols.type_parameters.required_modifiers =
dotnet_naming_symbols.private_constant_fields.applicable_kinds = field
dotnet_naming_symbols.private_constant_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
dotnet_naming_symbols.private_constant_fields.required_modifiers = const
dotnet_naming_symbols.local_variables.applicable_kinds = local
dotnet_naming_symbols.local_variables.applicable_accessibilities = local
dotnet_naming_symbols.local_variables.required_modifiers =
dotnet_naming_symbols.local_constants.applicable_kinds = local
dotnet_naming_symbols.local_constants.applicable_accessibilities = local
dotnet_naming_symbols.local_constants.required_modifiers = const
dotnet_naming_symbols.parameters.applicable_kinds = parameter
dotnet_naming_symbols.parameters.applicable_accessibilities = *
dotnet_naming_symbols.parameters.required_modifiers =
dotnet_naming_symbols.public_constant_fields.applicable_kinds = field
dotnet_naming_symbols.public_constant_fields.applicable_accessibilities = public, internal
dotnet_naming_symbols.public_constant_fields.required_modifiers = const
dotnet_naming_symbols.public_static_readonly_fields.applicable_kinds = field
dotnet_naming_symbols.public_static_readonly_fields.applicable_accessibilities = public, internal
dotnet_naming_symbols.public_static_readonly_fields.required_modifiers = readonly, static
dotnet_naming_symbols.private_static_readonly_fields.applicable_kinds = field
dotnet_naming_symbols.private_static_readonly_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
dotnet_naming_symbols.private_static_readonly_fields.required_modifiers = readonly, static
dotnet_naming_symbols.local_functions.applicable_kinds = local_function
dotnet_naming_symbols.local_functions.applicable_accessibilities = *
dotnet_naming_symbols.local_functions.required_modifiers =
# Naming styles
dotnet_naming_style.pascalcase.required_prefix =
dotnet_naming_style.pascalcase.required_suffix =
dotnet_naming_style.pascalcase.word_separator =
dotnet_naming_style.pascalcase.capitalization = pascal_case
dotnet_naming_style.ipascalcase.required_prefix = I
dotnet_naming_style.ipascalcase.required_suffix =
dotnet_naming_style.ipascalcase.word_separator =
dotnet_naming_style.ipascalcase.capitalization = pascal_case
dotnet_naming_style.tpascalcase.required_prefix = T
dotnet_naming_style.tpascalcase.required_suffix =
dotnet_naming_style.tpascalcase.word_separator =
dotnet_naming_style.tpascalcase.capitalization = pascal_case
dotnet_naming_style._camelcase.required_prefix = _
dotnet_naming_style._camelcase.required_suffix =
dotnet_naming_style._camelcase.word_separator =
dotnet_naming_style._camelcase.capitalization = camel_case
dotnet_naming_style.camelcase.required_prefix =
dotnet_naming_style.camelcase.required_suffix =
dotnet_naming_style.camelcase.word_separator =
dotnet_naming_style.camelcase.capitalization = camel_case
dotnet_naming_style.s_camelcase.required_prefix = s_
dotnet_naming_style.s_camelcase.required_suffix =
dotnet_naming_style.s_camelcase.word_separator =
dotnet_naming_style.s_camelcase.capitalization = camel_case
# A type's namespace must match its folder path — prevents files drifting into the wrong folder.
# The pre-existing backlog has been cleared, so this is enforced as an error (no carve-out remains
# in Directory.Build.props): a file whose namespace drifts from its folder breaks the build.
dotnet_style_namespace_match_folder = true
dotnet_diagnostic.IDE0130.severity = error
# Parameter names in overrides/interfaces should match.
# Important when callers use named arguments.
dotnet_diagnostic.CA1725.severity = warning
# Correct ArgumentException / ArgumentNullException parameter names.
dotnet_diagnostic.CA2208.severity = warning
# Unused parameters.
dotnet_diagnostic.IDE0060.severity = warning
# Unnecessary using directives. Warning, like its IDE0060 sibling above, which TreatWarningsAsErrors turns into a
# build error in Release. The rule is inert unless GenerateDocumentationFile is true — Directory.Build.props sets it
# and says why.
dotnet_diagnostic.IDE0005.severity = warning
# LoggerMessage template must be a static expression — already error via TreatWarningsAsErrors; explicit so an
# SDK default change cannot silently relax it.
dotnet_diagnostic.CA2254.severity = warning
# Rethrow with `throw;` not `throw ex;` — already error via TreatWarningsAsErrors; explicit for the same reason.
dotnet_diagnostic.CA2200.severity = warning
# S1135: bare TODO/FIXME/HACK/XXX markers fail Release under TreatWarningsAsErrors — SonarSource's own
# default severity for this rule is warning; made explicit so a reader grepping this file finds it
# instead of only the docs. See docs/wiki/16-code-conventions.md ("Comments and XML documentation").
dotnet_diagnostic.S1135.severity = warning
# Application-wide analyzer calibration. The none entries below are library-design prescriptions, duplicate
# another enforced project rule, or produce reflection/DI/serializer false positives in this application. Code-specific
# exceptions (ownership transfer, fixed SQL, experimental SDKs) stay locally scoped and justified instead of being added
# to this list. Re-enable entries only as a separate rule-by-rule cleanup with the full solution build and tests.
# Entries measured at zero violations on 2026-09-16 are promoted to warning in place and carry
# their own inline reason; entries that stay none carry their measured violation count.
dotnet_diagnostic.CA1707.severity = none # 11731 violations (distinct source lines) measured 2026-09-16
dotnet_diagnostic.CA2217.severity = warning # 8 files declare [Flags] enums here and none has a non-power-of-two member; a wrong flag value silently corrupts every bitwise combination
dotnet_diagnostic.CA1724.severity = none # 38 violations (distinct source lines) measured 2026-09-16
dotnet_diagnostic.CA1040.severity = none # 2 violations (distinct source lines) measured 2026-09-16
dotnet_diagnostic.CA1034.severity = none # 81 violations (distinct source lines) measured 2026-09-16
dotnet_diagnostic.CA1861.severity = none # 87 violations (distinct source lines) measured 2026-09-16
dotnet_diagnostic.CA2007.severity = none # ConfigureAwait is contextual: the application layers and the tests run on hosts with no synchronization context and write no ConfigureAwait at all, and the rule stays off for the library projects too because it also fires on every await using declaration; ConfigureAwaitPolicyTests enforces both halves
dotnet_diagnostic.S2326.severity = warning # an unused type parameter is always refactor residue, and generics are pervasive in this codebase
dotnet_diagnostic.S3427.severity = warning # overlapping default-argument overloads resolve silently and not the way the author expects; no overload set here relies on that
dotnet_diagnostic.CA1062.severity = none # 275 violations (distinct source lines) measured 2026-09-16
dotnet_diagnostic.S2139.severity = none # 17 violations (distinct source lines) measured 2026-09-16
dotnet_diagnostic.CA1848.severity = none # 1170 violations (distinct source lines) measured 2026-09-16
dotnet_diagnostic.S6580.severity = none # 1 violation (distinct source line) measured 2026-09-16
dotnet_diagnostic.CA1056.severity = none # 55 violations (distinct source lines) measured 2026-09-16
dotnet_diagnostic.CA1054.severity = none # 25 violations (distinct source lines) measured 2026-09-16
dotnet_diagnostic.CA1002.severity = none # 22 violations (distinct source lines) measured 2026-09-16
dotnet_diagnostic.S2955.severity = warning # comparing an unconstrained T to null is always false for value types; constrain the parameter or use EqualityComparer
dotnet_diagnostic.CA5394.severity = suggestion # 9 violations (distinct source lines) measured 2026-09-30; every site is statistical resampling, retry jitter or test data, never a secret, and the rule flags any Random use
dotnet_diagnostic.CA1305.severity = none # 25 violations (distinct source lines) measured 2026-09-16
dotnet_diagnostic.CA1515.severity = none # 2794 violations (distinct source lines) measured 2026-09-16
dotnet_diagnostic.S2094.severity = none # 2 violations (distinct source lines) measured 2026-09-16
dotnet_diagnostic.CA1019.severity = warning # no custom attribute types exist here yet; an attribute is only ever read back by reflection, so a positional argument with no accessor would be unreadable
dotnet_diagnostic.CA1031.severity = none # 292 violations (distinct source lines) measured 2026-09-16
dotnet_diagnostic.CA5404.severity = warning # 0 violations measured 2026-09-30; a JWT validation parameter that switches off a token check must fail the build
dotnet_diagnostic.CA2234.severity = none # 79 violations (distinct source lines) measured 2026-09-16
dotnet_diagnostic.CA1859.severity = suggestion # 438 violations (distinct source lines) in 342 files measured 2026-09-30; a performance-only hint (devirtualization) on interface-typed private returns and locals
dotnet_diagnostic.CA2213.severity = suggestion # 13 violations (distinct source lines) measured 2026-09-30; several are deliberate non-owners (NonDisposingStream, swapped CancellationTokenSource fields), so each needs a per-site ownership review
dotnet_diagnostic.CA1303.severity = none # 1 violation (distinct source line) measured 2026-09-16
dotnet_diagnostic.S2068.severity = warning # 0 violations measured 2026-09-30; a hard-coded credential must fail the build
dotnet_diagnostic.CA1873.severity = suggestion # 324 violations (distinct source lines) measured 2026-09-30; argument evaluation before a disabled log level, a cost the same CA1848=none decision above already accepts
dotnet_diagnostic.S4487.severity = warning # 4 violations measured 2026-09-30 and removed; an unread private field is refactor residue
# Meziantou.Analyzer (MA####) calibration.
# All Meziantou rules NOT listed here keep their default severity (warning) and are promoted to
# build errors by TreatWarningsAsErrors — i.e. correctness/security/quality rules (e.g. MA0009 regex
# ReDoS, MA0002 StringComparer, MA0015, MA0158, MA0144, MA0023, MA0099, MA0132, MA0008) are ENFORCED.
# The rules below are deliberately turned off because they are stylistic or duplicate an existing,
# already-made repo decision — NOT to make the build pass:
# MA0048: file name must match type name — repo intentionally groups related contracts/DTOs per file.
dotnet_diagnostic.MA0048.severity = none
# MA0051: method too long — already governed by Analyzer S138 and the repo <100-line standard.
dotnet_diagnostic.MA0051.severity = none
# MA0006: string.Equals vs ==/!= — == / != on strings is idiomatic C#; ordinal intent is covered by MA0002.
dotnet_diagnostic.MA0006.severity = none
# MA0004: ConfigureAwait(false) — reports the same sites as CA2007 and is off for the same reason;
# ConfigureAwaitPolicyTests enforces the rule.
dotnet_diagnostic.MA0004.severity = none
# MA0016: prefer collection abstraction over implementation — consistent with the existing CA1002=none.
dotnet_diagnostic.MA0016.severity = none
# MA0011: IFormatProvider on TryParse — consistent with the existing CA1305=none decision above.
dotnet_diagnostic.MA0011.severity = none
# Blocking calls + cancellation forwarding, measured 2026-09-16 in Release with warnings not promoted
# (-p:TreatWarningsAsErrors=false), all 26 solution projects compiled, de-duplicated by (rule, file, line):
# MA0042 26 sites / 17 files, MA0045 150 / 79, MA0079 2 / 2, MA0080 0 / 0, MA0040 12 / 11,
# CA2016 0 / 0 (already a build warning under AnalysisMode=All, i.e. already enforced), MA0032 50 / 22.
# Every rule was under the 80-file cap and every site was fixed or carries a per-site reasoned pragma:
dotnet_diagnostic.MA0042.severity = warning
dotnet_diagnostic.MA0045.severity = warning
dotnet_diagnostic.MA0079.severity = warning
dotnet_diagnostic.MA0080.severity = warning
dotnet_diagnostic.MA0040.severity = warning
dotnet_diagnostic.MA0032.severity = warning
# CA2016 is a warning already (AnalysisMode=All); stated explicitly so this rule set is visible in one place.
dotnet_diagnostic.CA2016.severity = warning
# Ignore paths
[**/Migrations/*.cs]
generated_code = true
dotnet_analyzer_diagnostic.severity = none
# Endpoint DTO folders: files are organized into a Dtos/ subfolder for
# navigability, but their namespace is deliberately kept flat (the parent
# Endpoints/{Area}/V1 namespace). Reason: FastEndpoints/NSwag derives OpenAPI
# schema IDs from the full type namespace (e.g. XE_..EndpointsSkillsV1SkillResponse).
# Nesting a `.Dtos` segment would rename ~361 schema keys and churn the entire
# generated hey-api client with zero behavioural gain. Flat namespaces keep the
# contract stable, so IDE0130 (namespace-must-match-folder) is intentionally
# disabled for these folders only. Mappers/ and Validators/ are NOT serialized
# and keep folder-matching namespaces (IDE0130 stays enforced there).
[**/Endpoints/**/V1/Dtos/*.cs]
dotnet_style_namespace_match_folder = false
dotnet_diagnostic.IDE0130.severity = none