forked from andrewjsaid/builderbuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.editorconfig
862 lines (631 loc) · 31.2 KB
/
.editorconfig
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
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
# http://EditorConfig.org
#################
# Common Settings
#################
# This file is the top-most EditorConfig file
root = true
# All Files
[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
# Spelling rules
spelling_languages = en-us
spelling_checkable_types = strings,identifiers,comments
spelling_error_severity = info
#########################
# File Extension Settings
#########################
# R Files
[*.r*]
indent_size = 2
# Visual Studio Solution Files
[*.sln]
indent_style = tab
# Visual Studio XML Project Files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
indent_size = 2
# XML Configuration Files
[*.{json,xml,yml,config,props,targets,nuspec,resx,ruleset,vsixmanifest,vsct}]
indent_size = 2
# Markdown Files
[*.md]
trim_trailing_whitespace = false
# Web Files
[*.{htm,html,js,ts,css,scss,less}]
indent_size = 2
insert_final_newline = true
# Batch Files
[*.{cmd,bat}]
end_of_line = crlf
# Bash Files
[*.sh]
end_of_line = lf
# JSON Files
[*.{json,json5}]
indent_size = 2
# YAML Files
[*.{yml,yaml}]
indent_size = 2
[Makefile]
indent_style = tab
[*.{AssemblyAttributes.cs,AssemblyInfo.cs,generated.cs,g.cs}]
exclude = true
generated_code = true
[*.{cs,csx,cake}]
##########################################
# .NET Code Actions
##########################################
# Type members
dotnet_hide_advanced_members = false
dotnet_member_insertion_location = with_other_members_of_the_same_kind
dotnet_property_generation_behavior = prefer_throwing_properties
# Symbol search
dotnet_search_reference_assemblies = true
##########################################
# Default .NET Code Style Severities
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/configuration-options#scope
##########################################
# Default Severity for all .NET Code Style rules below
dotnet_analyzer_diagnostic.category-Style.severity = warning
##########################################
# Code Style Rules
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/
##########################################
# "this." and "Me." qualifiers
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0003-ide0009
dotnet_style_qualification_for_event = false
dotnet_style_qualification_for_field = false
dotnet_style_qualification_for_method = false
dotnet_style_qualification_for_property = false
dotnet_diagnostic.IDE0003.severity = warning
dotnet_diagnostic.IDE0009.severity = none
# Language keywords instead of framework type names for type references
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0049
dotnet_style_predefined_type_for_locals_parameters_members = true
dotnet_style_predefined_type_for_member_access = true
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0036#csharp_preferred_modifier_order
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async
csharp_prefer_static_local_function = true
csharp_style_expression_bodied_local_functions = when_on_single_line
dotnet_style_readonly_field = true
dotnet_style_require_accessibility_modifiers = always
# Parentheses preferences
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0047-ide0048#dotnet_style_parentheses_in_arithmetic_binary_operators
dotnet_diagnostic.IDE0047.severity = suggestion
dotnet_diagnostic.IDE0048.severity = none
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary
dotnet_style_parentheses_in_other_binary_operators = never_if_unnecessary
dotnet_style_parentheses_in_other_operators = never_if_unnecessary
# Expression-level preferences
csharp_style_deconstructed_variable_declaration = true
csharp_style_implicit_object_creation_when_type_is_apparent = true
csharp_style_inlined_variable_declaration = true
csharp_style_prefer_index_operator = true
csharp_style_prefer_local_over_anonymous_function = true
csharp_style_prefer_range_operator = true
csharp_style_prefer_simple_default_expression = true
csharp_style_prefer_tuple_swap = true
dotnet_style_namespace_match_folder = true
dotnet_style_collection_initializer = true
dotnet_style_prefer_collection_expression = true
dotnet_style_explicit_tuple_names = true
dotnet_diagnostic.IDE0033.severity = suggestion
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0017#dotnet_style_object_initializer
dotnet_style_object_initializer = true
dotnet_diagnostic.IDE0017.severity = suggestion
dotnet_style_operator_placement_when_wrapping = end_of_line
dotnet_style_prefer_auto_properties = true
dotnet_style_prefer_compound_assignment = true
dotnet_diagnostic.IDE0054.severity = suggestion
dotnet_diagnostic.IDE0074.severity = suggestion
dotnet_style_prefer_conditional_expression_over_assignment = false
dotnet_diagnostic.IDE0045.severity = suggestion
dotnet_style_prefer_conditional_expression_over_return = true
dotnet_diagnostic.IDE0046.severity = suggestion
dotnet_style_prefer_inferred_tuple_names = true
dotnet_style_prefer_inferred_anonymous_type_member_names = true
dotnet_diagnostic.IDE0037.severity = suggestion
dotnet_style_prefer_simplified_boolean_expressions= true
dotnet_style_prefer_simplified_interpolation = true
# Add missing cases to switch statement
dotnet_diagnostic.IDE0010.severity = suggestion
# Use 'System.HashCode.Combine'
dotnet_diagnostic.IDE0070.severity = warning
dotnet_diagnostic.IDE0072.severity = warning
# Convert typeof to nameof
dotnet_diagnostic.IDE0082.severity = warning
csharp_style_prefer_utf8_string_literals = true
# Use collection expression for stackalloc
dotnet_diagnostic.IDE0302.severity = suggestion
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0016#csharp_style_throw_expression
csharp_style_throw_expression = true
dotnet_diagnostic.IDE0016.severity = suggestion
csharp_style_conditional_delegate_call = true
dotnet_style_coalesce_expression = true
dotnet_style_null_propagation = true
dotnet_style_prefer_is_null_check_over_reference_equality_method = true
csharp_style_prefer_null_check_over_type_check = true
# 'var' preferences
csharp_style_var_for_built_in_types = true
csharp_style_var_when_type_is_apparent = true
csharp_style_var_elsewhere = false
# Expression-bodied members
csharp_style_expression_bodied_accessors = when_on_single_line
csharp_style_expression_bodied_constructors = when_on_single_line
csharp_style_expression_bodied_indexers = when_on_single_line
csharp_style_expression_bodied_lambdas = when_on_single_line
chsarp_style_expression_bodied_local_functions = when_on_single_line
csharp_style_expression_bodied_methods = when_on_single_line
csharp_style_expression_bodied_operators = when_on_single_line
csharp_style_expression_bodied_properties = when_on_single_line
csharp_style_pattern_matching_over_as_with_null_check = true
csharp_style_pattern_matching_over_is_with_cast_check = true
csharp_style_prefer_extended_property_pattern = true
csharp_style_prefer_not_pattern = true
csharp_style_prefer_pattern_matching = true
csharp_style_prefer_switch_expression = true
# Code block preferences
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/code-block-preferences
csharp_prefer_braces = when_multiline
dotnet_diagnostic.IDE0011.severity = suggestion
csharp_prefer_simple_using_statement = true
dotnet_diagnostic.IDE0063.severity = suggestion
dotnet_diagnostic.IDE0065.severity = none
# Unnecessary code rules
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0059
csharp_style_unused_value_assignment_preference = discard_variable
dotnet_diagnostic.IDE0059.severity = suggestion
csharp_style_unused_value_expression_statement_preference = discard_variable
dotnet_code_quality_unused_parameters = non_public
dotnet_diagnostic.IDE0060.severity = suggestion
dotnet_remove_unnecessary_suppression_exclusions = all
# https://github.com/dotnet/format/blob/main/docs/Supported-.editorconfig-options.md#removing-unnecessary-imports
# IDE0005: Using directive is unnecessary.
dotnet_diagnostic.IDE0005.severity = warning
# https://github.com/dotnet/roslyn/issues/41640#issuecomment-1314950048
dotnet_diagnostic.CS8019.severity = suggestion
csharp_style_prefer_top_level_statements = false
dotnet_diagnostic.IDE0210.severity = none
csharp_using_directive_placement = outside_namespace
csharp_style_namespace_declarations = file_scoped
csharp_style_prefer_primary_constructors = false
#############################
# .NET Formatting Rules
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0055
#############################
dotnet_diagnostic.IDE0055.severity = suggestion
# https://github.com/dotnet/format/issues/1623#issuecomment-2436483000
dotnet_diagnostic.IDE0130.severity = suggestion
# Organize usings
# 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 = true
# Newline options
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/csharp-formatting-options#new-line-options
# Allman
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_anonymous_types = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_between_query_expression_clauses = true
# Indentation Options
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/csharp-formatting-options#indentation-options
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = false
csharp_indent_labels = flush_left
csharp_indent_switch_labels = true
# Spacing options
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/csharp-formatting-options#spacing-options
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
# Wrap options
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/csharp-formatting-options#wrap-options
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true
#########################
# .NET Naming conventions
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/naming-rules
#########################
# <prefix>.<title>.<propertyName> = <propertyValue>
# <prefix> = dotnet_naming_rule | dotnet_naming_symbols | dotnet_naming_style
# <title> is a descriptive name you choose that associates multiple property settings into a single definition.
# For naming rule (dotnet_naming_rule), specify following properties: symbols, style, severity
# For symbol group (dotnet_naming_symbols), specify following properties: applicable_kinds, applicable_accessibilities, required_modifiers
##########################################
# Styles
##########################################
dotnet_naming_style.async_method_style.capitalization = pascal_case
dotnet_naming_style.async_method_style.required_suffix = Async
dotnet_naming_style.camel_case_style.capitalization = camel_case
dotnet_naming_style.interface_style.capitalization = pascal_case
dotnet_naming_style.interface_style.required_prefix = I
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
dotnet_naming_style.private_field_style.capitalization = camel_case
dotnet_naming_style.private_field_style.required_prefix = _
dotnet_naming_style.private_static_field_style.capitalization = camel_case
dotnet_naming_style.private_static_field_style.required_prefix = s_
##########################################
# Symbol groups
##########################################
dotnet_naming_symbols.async_method_group.applicable_accessibilities = *
dotnet_naming_symbols.async_method_group.applicable_kinds = method
dotnet_naming_symbols.async_method_group.required_modifiers = async
dotnet_naming_symbols.constant_group.applicable_accessibilities = *
dotnet_naming_symbols.constant_group.applicable_kinds = *
dotnet_naming_symbols.constant_group.required_modifiers = const
dotnet_naming_symbols.element_group.applicable_accessibilities = *
dotnet_naming_symbols.element_group.applicable_kinds = namespace, class, enum, struct, delegate, event, method, property, type_parameter
dotnet_naming_symbols.interface_group.applicable_accessibilities = *
dotnet_naming_symbols.interface_group.applicable_kinds = interface
dotnet_naming_symbols.local_var_group.applicable_accessibilities = local
dotnet_naming_symbols.local_var_group.applicable_kinds = local
dotnet_naming_symbols.parameter_group.applicable_accessibilities = *
dotnet_naming_symbols.parameter_group.applicable_kinds = parameter
dotnet_naming_symbols.private_field_group.applicable_accessibilities = private
dotnet_naming_symbols.private_field_group.applicable_kinds = field
dotnet_naming_symbols.private_static_field_group.applicable_accessibilities = private, internal
dotnet_naming_symbols.private_static_field_group.applicable_kinds = field
dotnet_naming_symbols.private_static_field_group.required_modifiers = static, readonly
dotnet_naming_symbols.public_field_group.applicable_accessibilities = public
dotnet_naming_symbols.public_field_group.applicable_kinds = field
dotnet_naming_symbols.public_protected_static_field_group.applicable_accessibilities = public, protected, protected_internal
dotnet_naming_symbols.public_protected_static_field_group.applicable_kinds = field
dotnet_naming_symbols.public_protected_static_field_group.required_modifiers = static
##########################################
# Naming rules
##########################################
# Async methods use 'Async' suffix
dotnet_naming_rule.async_rule.symbols = async_method_group
dotnet_naming_rule.async_rule.style = async_method_style
dotnet_naming_rule.async_rule.severity = warning
# All constants must be PascalCase
dotnet_naming_rule.constant_rule.symbols = constant_group
dotnet_naming_rule.constant_rule.style = pascal_case_style
dotnet_naming_rule.constant_rule.severity = warning
# Interfaces use PascalCase and are prefixed with uppercase 'I'
dotnet_naming_rule.interface_rule.symbols` = interface_group
dotnet_naming_rule.interface_rule.style = interface_style
dotnet_naming_rule.interface_rule.severity = warning
# Local variables must be camelCase
dotnet_naming_rule.local_var_rule.symbols = local_var_group
dotnet_naming_rule.local_var_rule.style = camel_case_style
dotnet_naming_rule.local_var_rule.severity = warning
# Method parameters use camelCase
dotnet_naming_rule.parameter_rule.symbols = parameter_group
dotnet_naming_rule.parameter_rule.style = camel_case_style
dotnet_naming_rule.parameter_rule.severity = warning
# Private fields use camelCase with '_' prefix
dotnet_naming_rule.private_field_rule.symbols = private_field_group
dotnet_naming_rule.private_field_rule.style = private_field_style
dotnet_naming_rule.private_field_rule.severity = warning
# Non-public static fields use camelCase with 's_' prefix
dotnet_naming_rule.private_static_field_rule.symbols = private_static_field_group
dotnet_naming_rule.private_static_field_rule.style = private_static_field_style
dotnet_naming_rule.private_static_field_rule.severity = warning
# Public fields are PascalCase
dotnet_naming_rule.public_field_rule.symbols = public_field_group
dotnet_naming_rule.public_field_rule.style = pascal_case_style
dotnet_naming_rule.public_field_rule.severity = warning
# Public/protected/protected_internal static readonly fields must be PascalCase
dotnet_naming_rule.public_protected_static_readonly_field_rule.symbols = public_protected_static_field_group
dotnet_naming_rule.public_protected_static_readonly_field_rule.style = pascal_case_style
dotnet_naming_rule.public_protected_static_readonly_field_rule.severity = warning
# Other elements use PascalCase
dotnet_naming_rule.element_rule.symbols = element_group
dotnet_naming_rule.element_rule.style = pascal_case_style
dotnet_naming_rule.element_rule.severity = warning
##########################################
# Roslynator Analyzers
# https://github.com/JosefPihrt/Roslynator
##########################################
# RCS0003: Add blank line after using directive list
dotnet_diagnostic.RCS0003.severity = suggestion
# RCS0009: Add blank line between declaration and documentation comment
dotnet_diagnostic.RCS0009.severity = suggestion
# RCS0010: Add blank line between declarations
dotnet_diagnostic.RCS0010.severity = suggestion
# RCS0012: Add blank line between single-line declarations
dotnet_diagnostic.RCS0012.severity = none
# RCS0013: Add blank line between single-line declarations of different kind
dotnet_diagnostic.RCS0013.severity = suggestion
# RCS0015: Add/remove blank line between using directives
roslynator_blank_line_between_using_directives = separate_groups
dotnet_diagnostic.RCS0015.severity = suggestion
# RCS0016: Put attribute list on its own line
dotnet_diagnostic.RCS0016.severity = suggestion
# RCS0020: Format accessor's braces on a single line or multiple lines
roslynator_accessor_braces_style = single_line_when_expression_is_on_single_line
# RCS0021: Format block's braces on a single line or multiple lines
roslynator_block_braces_style = single_line_when_empty
# RCS0024: Add new line after switch label
dotnet_diagnostic.RCS0024.severity = suggestion
# RCS0027: Place new line after/before binary operator
roslynator_binary_operator_new_line = before
# RCS0028: Place new line after/before '?:' operator
roslynator_conditional_operator_new_line = before
# RCS0031: Add new line before enum member
dotnet_diagnostic.RCS0031.severity = suggestion
# RCS0032: Place new line after/before arrow token
roslynator_arrow_token_new_line = after
# RCS0034: Add new line before type parameter constraint
dotnet_diagnostic.RCS0034.severity = suggestion
# RCS0039: Remove new line before base list
dotnet_diagnostic.RCS0039.severity = suggestion
# RCS0041: Remove new line between 'if' keyword and 'else' keyword
dotnet_diagnostic.RCS0041.severity = suggestion
# RCS0042: Put auto-accessors on a single line
dotnet_diagnostic.RCS0042.severity = suggestion
# RCS0046: Use spaces instead of tab
dotnet_diagnostic.RCS0046.severity = suggestion
# RCS0051: Add/remove new line before 'while' in 'do' statement
roslynator_new_line_before_while_in_do_statement = false
# RCS0054: Fix formatting of a call chain
dotnet_diagnostic.RCS0054.severity = suggestion
# RCS0058: Normalize whitespace at the end of a file
roslynator_new_line_at_end_of_file = true
dotnet_diagnostic.RCS0058.severity = suggestion
# RCS0059: Place new line after/before null-conditional operator
roslynator_null_conditional_operator_new_line = before
# RCS0060: Add/remove blank line after file scoped namespace declaration
roslynator_blank_line_after_file_scoped_namespace_declaration = true
# RCS1001: Add braces (when expression spans over multiple lines)
dotnet_diagnostic.RCS1001.severity = suggestion
# RCS1003: Add braces to if-else (when expression spans over multiple lines)
dotnet_diagnostic.RCS1003.severity = suggestion
# RCS1004: Remove braces from if-else
dotnet_diagnostic.RCS1004.severity = suggestion
# RCS1005: Simplify nested using statement
dotnet_diagnostic.RCS1005.severity = suggestion
# RCS1006: Merge 'else' with nested 'if'
dotnet_diagnostic.RCS1006.severity = suggestion
# RCS1013: Use predefined type
dotnet_diagnostic.RCS1013.severity = suggestion
# RCS1014: Use explicitly/implicitly typed array
roslynator_array_creation_type_style = implicit_when_type_is_obvious
# RCS1015: Use nameof operator
dotnet_diagnostic.RCS1015.severity = suggestion
# RCS1031: Remove unnecessary braces
dotnet_diagnostic.RCS1031.severity = suggestion
# RCS1051: Parenthesize condition of conditional expression
roslynator_conditional_operator_condition_parentheses_style = omit_when_condition_is_single_token
# RCS1052: Declare each attribute separately
dotnet_diagnostic.RCS1052.severity = none
# RCS1055: Avoid semicolon at the end of declaration
dotnet_diagnostic.RCS1052.severity = suggestion
# RCS1061: Merge 'if' with nested 'if'
dotnet_diagnostic.RCS1061.severity = suggestion
# RCS1071: Remove redundant base constructor call
dotnet_diagnostic.RCS1071.severity = warning
# RCS1074: Remove redundant constructor
dotnet_diagnostic.RCS1074.severity = suggestion
# RCS1077: Optimize LINQ method call
dotnet_diagnostic.RCS1077.severity = warning
# RCS1078: Use "" or 'string.Empty'
roslynator_empty_string_style = field
# RCS1090: Add/remove 'ConfigureAwait(false)' call
roslynator_configure_await = true
# RCS1091: Remove empty region
dotnet_diagnostic.RCS1091.severity = suggestion
# RCS1097: Remove redundant 'ToString' call
dotnet_diagnostic.RCS1097.severity = warning
# RCS1124: Inline local variable
dotnet_diagnostic.RCS1124.severity = suggestion
# RCS1133: Remove redundant Dispose/Close call
dotnet_diagnostic.RCS1133.severity = suggestion
# RCS1140: Add exception to documentation comment
dotnet_diagnostic.RCS1140.severity = suggestion
# RCS1141: Add 'param' element to documentation comment
dotnet_diagnostic.RCS1141.severity = suggestion
# RCS1142: Add 'typeparam' element to documentation comment
dotnet_diagnostic.RCS1142.severity = suggestion
# RCS1145: Remove redundant 'as' operator
dotnet_diagnostic.RCS1145.severity = warning
# RCS1146: Use conditional access
dotnet_diagnostic.RCS1146.severity = warning
# RCS1158: Static member in generic type should use a type parameter
dotnet_diagnostic.RCS1158.severity = none
# RCS1161: Enum should declare explicit values
dotnet_diagnostic.RCS1161.severity = suggestion
# RCS1164: Unused type parameter
dotnet_diagnostic.RCS1164.severity = none
# https://github.com/JosefPihrt/Roslynator/issues/384
# RCS1165: Unconstrained type parameter checked for null
dotnet_diagnostic.RCS1165.severity = none
# RCS1168: Parameter name differs from base name
dotnet_diagnostic.RCS1168.severity = suggestion
# RCS1182: Remove redundant base interface
dotnet_diagnostic.RCS1182.severity = suggestion
# RCS1186: Use Regex instance instead of static method
dotnet_diagnostic.RCS1186.severity = suggestion
# RCS1198: Avoid unnecessary boxing of value type
dotnet_diagnostic.RCS1198.severity = suggestion
# RCS1207: Use anonymous function or method group
roslynator_use_anonymous_function_or_method_group = method_group
# RCS1208: Reduce 'if' nesting
dotnet_diagnostic.RCS1208.severity = none
# RCS1211: Remove unnecessary 'else'
dotnet_diagnostic.RCS1211.severity = suggestion
# RCS1213: Remove unused member declaration
dotnet_diagnostic.RCS1213.severity = none
# RCS1227: Validate arguments correctly
dotnet_diagnostic.RCS1227.severity = warning
# RCS1231: Make parameter ref read-only
dotnet_diagnostic.RCS1231.severity = suggestion
# RCS1238: Avoid nested ?: operators
dotnet_diagnostic.RCS1238.severity = suggestion
# RCS1241: Implement non-generic counterpart
dotnet_diagnostic.RCS1241.severity = warning
# RCS1244: Simplify 'default' expression
dotnet_diagnostic.RCS1244.severity = suggestion
# RCS1248: Use pattern matching to check for null (or vice versa)
roslynator_null_check_style = pattern_matching
dotnet_diagnostic.RCS1248.severity = suggestion
# RCS1250: Use implicit/explicit object creation
roslynator_object_creation_type_style = implicit_when_type_is_obvious
roslynator_use_var_instead_of_implicit_object_creation = true
# RCS1252: Normalize usage of infinite loop
roslynator_infinite_loop_style = while
dotnet_diagnostic.RCS1252.severity = suggestion
# RCS1255: Simplify argument null check
dotnet_diagnostic.rcs1255.severity = suggestion
# RCS1256: Invalid argument null check
dotnet_diagnostic.rcs1256.severity = suggestion
# RCS1257: Use enum field explicitly
dotnet_diagnostic.rcs1257.severity = warning
# RCS9001: Use pattern matching
dotnet_diagnostic.RCS9001.severity = suggestion
# RR0171: Convert "" to string.Empty
roslynator_refactoring.RR0171.enabled = true
# RR0066: Introduce constructor
roslynator_refactoring.RR0066.enabled = true
##########################################
# .NET Code Quality Rules
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/
##########################################
## Design rules
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/design-warnings
# CA1000: Do not declare static members on generic types
dotnet_code_quality.CA1000.api_surface = all
dotnet_diagnostic.CA1000.severity = none
# CA1002: Do not expose generic lists
dotnet_diagnostic.CA1002.severity = suggestion
# CA1005: Avoid excessive parameters on generic types
dotnet_code_quality.CA1005.api_surface = all
dotnet_diagnostic.CA1005.severity = none
# .NET 7+. None is there by default.
dotnet_code_quality.CA1008.additional_enum_none_names = Default|Never|Off
dotnet_code_quality.CA1008.severity = suggestion
# CA1014: Mark assemblies with CLSCompliantAttribute
# https://github.com/dotnet/roslyn/issues/37876#issuecomment-738042719
dotnet_diagnostic.CA1014.severity = none
# CA1017: Mark assemblies with ComVisibleAttribute
dotnet_diagnostic.CA1017.severity = none
# CA1021: Avoid out parameters
dotnet_diagnostic.CA1021.severity = none
# CA1024: Use properties where appropriate
dotnet_diagnostic.CA1024.severity = suggestion
# CA1028: Enum storage should be Int32
dotnet_diagnostic.CA1028.severity = none
# CA1040: Avoid empty interfaces
dotnet_code_quality.CA1040.api_surface = all
dotnet_diagnostic.CA1040.severity = none
# CA1045: Do not pass types by reference
dotnet_diagnostic.CA1045.severity = none
# CA1046: Do not overload operator equals on reference types
dotnet_diagnostic.CA1046.severity = suggestion
# CA1047: Do not declare protected members in sealed types
dotnet_diagnostic.CA1047.severity = warning
# CA1050: Declare types in namespaces
dotnet_diagnostic.CA1050.severity = error
# CA1052: Static holder types should be Static or NotInheritable
dotnet_diagnostic.CA1050.severity = warning
# https://github.com/dotnet/roslyn-analyzers/issues/3218
# If NRT enabled, gives false positives
dotnet_diagnostic.CA1062.severity = none
# CA1069: Enums should not have duplicate values
dotnet_diagnostic.CA1069.severity = error
## Globalization rules
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/globalization-warnings
# CA1303: Do not pass literals as localized parameters
dotnet_diagnostic.CA1303.severity = none
# CA1310: Specify StringComparison for correctness
dotnet_diagnostic.CA1310.severity = suggestion
# CA1311: Specify a culture or use an invariant version
dotnet_diagnostic.CA1311.severity = warning
## Maintainability rules
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/maintainability-warnings
# CA1501: Avoid excessive inheritance
dotnet_diagnostic.CA1501.severity = suggestion
## Naming rules
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/naming-warnings
# CA1711: Identifiers should not have incorrect suffix
dotnet_code_quality.ca1711.allowed_suffixes = Ex|Flag|Flags|Impl
# CA1712: Do not prefix enum values with type name
dotnet_code_quality.CA1712.severity = warning
# CA1715: Identifiers should have correct prefix
dotnet_code_quality.CA1715.exclude_single_letter_type_parameters = true
# CA1724: Type names should not match namespaces
dotnet_diagnostic.CA1724.severity = none
## Performance rules
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/performance-warnings
# CA1802: Use Literals Where Appropriate
dotnet_code_quality.CA1802.required_modifiers = none
# CA1805: Do not initialize unnecessarily.
dotnet_diagnostic.CA1805.severity = warning
# CA1815: Override equals and operator equals on value types
dotnet_diagnostic.CA1815.severity = warning
# CA1845: Use span-based 'string.Concat'
dotnet_diagnostic.CA1845.severity = warning
# CA1846: Prefer AsSpan over Substring
dotnet_diagnostic.CA1846.severity = warning
# CA1848: Use the LoggerMessage delegates
dotnet_diagnostic.CA1848.severity = none
# CA1849: Call async methods when in an async method
dotnet_diagnostic.CA1849.severity = error
# CA1850: Prefer static HashData method over ComputeHash
dotnet_diagnostic.CA1850.severity = warning
# CA1851: Possible multiple enumerations of IEnumerable collection
dotnet_diagnostic.CA1851.severity = warning
# CA1852: Seal internal types
dotnet_diagnostic.CA1852.severity = error
## Reliability rules
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/reliability-warnings
# CA2000: Dispose objects before losing scope
dotnet_diagnostic.CA2000.severity = warning
# CA2002: Do not lock on objects with weak identity
dotnet_diagnostic.CA2002.severity = error
# CA2007: Do not directly await a Task
dotnet_diagnostic.CA2007.severity = warning
dotnet_code_quality.CA2007.output_kind = DynamicallyLinkedLibrary
# CA2013: Do not use ReferenceEquals with value types
dotnet_diagnostic.CA2013.severity = error
# CA2017: Parameter count mismatch
dotnet_diagnostic.CA2017.severity = warning
# CA2019: ThreadStatic fields should not use inline initialization
dotnet_diagnostic.CA2019.severity = error
## Usage rules
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/usage-warnings
# CA2200: Rethrow to preserve stack details
dotnet_diagnostic.CA2200.severity = warning
# CA2213: Disposable fields should be disposed
dotnet_diagnostic.CA2213.severity = warning
# CA2214: Do not call overridable methods in constructors
dotnet_diagnostic.CA2214.severity = error
# CA2227: Collection properties should be read only
dotnet_diagnostic.CA2227.severity = warning
# CA2241: Provide correct arguments to formatting methods
dotnet_code_quality.CA2241.try_determine_additional_string_formatting_methods_automatically = true
# CA2246: Do not assign a symbol and its member in the same statement
dotnet_diagnostic.CA2246.severity = error
# CA2259: Ensure ThreadStatic is only used with static fields
dotnet_diagnostic.CA2259.severity = error
# CA2260: Implement generic math interfaces correctly
dotnet_diagnostic.CA2260.severity = error