-
Notifications
You must be signed in to change notification settings - Fork 86
/
Copy path.editorconfig
1442 lines (1030 loc) · 49.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
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Learn more about editorconfig here: https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
# Also see: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options
root=true
# All files
[*]
indent_style = space
spelling_languages = en-us
spelling_checkable_types = strings,identifiers,comments
spelling_error_severity = warning
spelling_exclusion_path = .\exclusion.dic
# XML project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
indent_size = 2
# XML config files
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
indent_size = 2
# XAML project files
[*.{xaml}]
indent_size = 2
# JSON files
[*.{json}]
indent_size = 4
# Code files
[*.{cs,csx,vb,vbx}]
indent_size = 4
insert_final_newline = true
charset = utf-8-bom
#
# 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
# Differs from other repos like BaseApp since normal usage here
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_m_camelcase.severity = suggestion
dotnet_naming_rule.private_fields_should_be_m_camelcase.symbols = private_fields
dotnet_naming_rule.private_fields_should_be_m_camelcase.style = m_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.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.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 = namespace
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.m_camelcase.required_prefix = m_
dotnet_naming_style.m_camelcase.required_suffix =
dotnet_naming_style.m_camelcase.word_separator =
dotnet_naming_style.m_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
# C# files
[*.cs]
#Formatting - indentation options
#indent switch case contents.
csharp_indent_case_contents = true
#indent switch labels
csharp_indent_switch_labels = true
#Formatting - new line options
#place catch statements on a new line
csharp_new_line_before_catch = true
#place else statements on a new line
csharp_new_line_before_else = true
#require braces to be on a new line for lambdas, types, methods, properties, and control_blocks (also known as "Allman" style)
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/formatting-rules#new-line-options
# Option values:
# all
# none
# accessors, anonymous_methods, anonymous_types, control_blocks, events, indexers, lambdas, local_functions, methods, object_collection_array_initializers, properties, types
csharp_new_line_before_open_brace = accessors, lambdas, types, methods, properties, control_blocks, object_collection_array_initializers, anonymous_methods, anonymous_types
#Formatting - organize using options
#sort System.* using directives alphabetically, and place them before other usings
dotnet_sort_system_directives_first = true
dotnet_style_prefer_collection_expression = true
csharp_style_namespace_declarations = file_scoped:warning
#Formatting - spacing options
#require NO space between a cast and the value
csharp_space_after_cast = false
#require a space before the colon for bases or interfaces in a type declaration
csharp_space_after_colon_in_inheritance_clause = true
#require a space after a keyword in a control flow statement such as a for loop
csharp_space_after_keywords_in_control_flow_statements = true
#require a space before the colon for bases or interfaces in a type declaration
csharp_space_before_colon_in_inheritance_clause = true
#remove space within empty argument list parentheses
csharp_space_between_method_call_empty_parameter_list_parentheses = false
#remove space between method call name and opening parenthesis
csharp_space_between_method_call_name_and_opening_parenthesis = false
#do not place space characters after the opening parenthesis and before the closing parenthesis of a method call
csharp_space_between_method_call_parameter_list_parentheses = false
#remove space within empty parameter list parentheses for a method declaration
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
#place a space character after the opening parenthesis and before the closing parenthesis of a method declaration parameter list.
csharp_space_between_method_declaration_parameter_list_parentheses = false
#Formatting - wrapping options
#leave code block on single line
csharp_preserve_single_line_blocks = true
#leave statements and member declarations on the same line
csharp_preserve_single_line_statements = true
#Style - expression bodied member options
#prefer block bodies for accessors
csharp_style_expression_bodied_accessors = false:none
#prefer block bodies for constructors
csharp_style_expression_bodied_constructors = false:silent
#prefer block bodies for methods
csharp_style_expression_bodied_methods = false:silent
#prefer expression-bodied members for properties
csharp_style_expression_bodied_properties = true:suggestion
#Style - expression level options
#prefer out variables to be declared before the method call
csharp_style_inlined_variable_declaration = false:suggestion
#prefer the language keyword for member access expressions, instead of the type name, for types that have a keyword to represent them
dotnet_style_predefined_type_for_member_access = true:suggestion
#Style - implicit and explicit types
#prefer var is used to declare variables with built-in system types such as int
csharp_style_var_for_built_in_types = true:suggestion
#prefer var when the type is already mentioned on the right-hand side of a declaration expression
csharp_style_var_when_type_is_apparent = true:suggestion
#Style - language keyword and framework type options
#prefer the language keyword for local variables, method parameters, and class members, instead of the type name, for types that have a keyword to represent them
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
#Style - qualification options
#prefer fields not to be prefaced with this. or Me. in Visual Basic
dotnet_style_qualification_for_field = false:suggestion
#prefer methods not to be prefaced with this. or Me. in Visual Basic
dotnet_style_qualification_for_method = false:suggestion
#prefer properties not to be prefaced with this. or Me. in Visual Basic
dotnet_style_qualification_for_property = false:suggestion
# Avoid 'private ' on members, methods etc.
dotnet_style_require_accessibility_modifiers = omit_if_default:error
# Ensure readonly fields are marked as such
dotnet_style_readonly_field = true:error
# Null-checking preferences
csharp_style_throw_expression = true:error
# CA1034: Nested types should not be visible
dotnet_diagnostic.CA1034.severity = none
# IDE0021: Use block body for constructors
dotnet_diagnostic.IDE0021.severity = silent
# IDE0022: Use block body for methods
dotnet_diagnostic.IDE0022.severity = silent
# IDE0055: Fix formatting
dotnet_diagnostic.IDE0055.severity = error
# CA1822: Mark members as static
dotnet_diagnostic.CA1822.severity = suggestion
# CA1050: Declare types in namespaces
dotnet_diagnostic.CA1050.severity = none
# IDE0052: Remove unread private members
dotnet_diagnostic.IDE0052.severity = warning
# IDE0051: Remove unused private members
dotnet_diagnostic.IDE0051.severity = warning
# IDE0066: Convert switch statement to expression
dotnet_diagnostic.IDE0066.severity = silent
# IDE1006: Naming Styles
dotnet_diagnostic.IDE1006.severity = warning
# CA2211: Non-constant fields should not be visible
dotnet_diagnostic.CA2211.severity = warning
# CA1822: Member does not access instance data and can be marked as static
dotnet_diagnostic.CA1822.severity = warning
# CA1012: Abstract types should not have public constructors
dotnet_diagnostic.CA1012.severity = warning
# CA1044: Properties should not be write only
dotnet_diagnostic.CA1044.severity = warning
# CA1052: Static holder types should be Static or NotInheritable
dotnet_diagnostic.CA1052.severity = warning
# CA1063: Implement IDisposable correctly
dotnet_diagnostic.CA1063.severity = warning
# CA1065: Do not raise exceptions in unexpected locations
dotnet_diagnostic.CA1065.severity = warning
# CA1508: Avoid dead conditional code
dotnet_diagnostic.CA1508.severity = suggestion
# CA1802: Use Literals Where Appropriate
dotnet_diagnostic.CA1802.severity = warning
# CA1813: Avoid unsealed attributes
dotnet_diagnostic.CA1813.severity = warning
# CA1816: Call GC.SuppressFinalize correctly
dotnet_diagnostic.CA1816.severity = warning
# CA1820: Test for empty strings using string length
dotnet_diagnostic.CA1820.severity = warning
# CA1823: Avoid unused private fields
dotnet_diagnostic.CA1823.severity = warning
# CA1834: Use StringBuilder.Append(char) for single character strings
dotnet_diagnostic.CA1834.severity = warning
# CA1851: Possible multiple enumerations of IEnumerable collection
dotnet_diagnostic.CA1851.severity = warning
# CA1852: Type 'XYZ' can be sealed because it has no subtypes in its containing assembly and is not externally visible
dotnet_diagnostic.CA1834.severity = warning
# CA2007: Do not directly await a Task
dotnet_diagnostic.CA2007.severity = silent
# CA2008: Do not create tasks without passing a TaskScheduler
dotnet_diagnostic.CA2008.severity = warning
# CA2208: Instantiate argument exceptions correctly
dotnet_diagnostic.CA2208.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 = warning
# CA2227: Collection properties should be read only
dotnet_diagnostic.CA2227.severity = warning
# IDE0090: Use 'new(...)'
dotnet_diagnostic.IDE0090.severity = warning
# IDE0039: Use local function
dotnet_diagnostic.IDE0039.severity = none
# IDE0044: Add readonly modifier
dotnet_diagnostic.IDE0044.severity = warning
# IDE0005: Remove unnecessary using directives
dotnet_diagnostic.IDE0005.severity = warning
# CA1002: Do not expose generic lists (don't follow suggestion text prefer IReadOnlyList<T>)
dotnet_diagnostic.CA1002.severity = none
# CA1003: Use generic event handler instances (never follow this - it's dumb coupling)
dotnet_diagnostic.CA1003.severity = none
# CA1005: Avoid excessive parameters on generic types (rarely relevant)
dotnet_diagnostic.CA1005.severity = none
# CA1008: Enums should have zero value (not always!)
dotnet_diagnostic.CA1008.severity = none
# CA1014: Mark assemblies with CLSCompliantAttribute
dotnet_diagnostic.CA1014.severity = none
# CA1028: Enum storage should be Int32 (no!)
dotnet_diagnostic.CA1028.severity = none
# CA1030: Use events where appropriate (flags incorrect places)
dotnet_diagnostic.CA1030.severity = none
# CA1031: Do not catch general exception types (in general no, but for externally facing code sometimes fine)
dotnet_diagnostic.CA1031.severity = none
# CA1032: Implement standard exception constructors (not having empty ctor is fine)
dotnet_diagnostic.CA1032.severity = none
# CA1040: Avoid empty interfaces (completely ignore this, empty marker interfaces are fine)
dotnet_diagnostic.CA1040.severity = none
# CA1045: Do not pass types by reference
dotnet_diagnostic.CA1045.severity = none
# CA1060: Move P/Invokes to NativeMethods class (a bit pedantic so not enforced)
dotnet_diagnostic.CA1060.severity = none
# CA1062: Validate arguments of public methods (perhaps relevant in widely used class library but less so at app level)
dotnet_diagnostic.CA1062.severity = none
# CA1305: Specify IFormatProvider (while definitely relevant in some cases also overly pedantic for all)
dotnet_diagnostic.CA1305.severity = none
# CA1308: Normalize strings to uppercase (this will flag weird places and is considered irrelevant)
dotnet_diagnostic.CA1308.severity = none
# CA1501: Avoid excessive inheritance (too pedantic and view models will often violate it)
dotnet_diagnostic.CA1501.severity = none
# CA1506: Avoid excessive class coupling (composition/Autofac code intentionally violates this)
dotnet_diagnostic.CA1506.severity = none
# CA1707: Identifiers should not contain underscores (to define units often identifiers suffixed with `_unit`)
dotnet_diagnostic.CA1707.severity = none
# CA1711: Identifiers should not have incorrect suffix (completely wrong)
dotnet_diagnostic.CA1711.severity = none
# CA1716: Identifiers should not match keywords (flags `Stop` and other irrelevant things)
dotnet_diagnostic.CA1716.severity = none
# CA1724: Type names should not match namespaces (this will flag nested class names and conflicts with any namespace)
dotnet_diagnostic.CA1724.severity = none
# CA1725: Parameter names should match base declaration (this is often pragmatically violated for succinctness)
dotnet_diagnostic.CA1725.severity = none
# CA1805: Do not initialize unnecessarily (we prefer explicitness)
dotnet_diagnostic.CA1805.severity = none
# CA1810: Initialize reference type static fields inline (has false positives)
dotnet_diagnostic.CA1810.severity = none
# CA1814: Prefer jagged arrays over multidimensional (NEVER EVER FOLLOW THIS!)
dotnet_diagnostic.CA1814.severity = none
# CA1815: Override equals and operator equals on value types (relevant but too many cases recommend use record struct)
dotnet_diagnostic.CA1815.severity = none
# CA1819: Properties should not return arrays (lots of settings, tests or similar do this otherwise definitely relevant)
dotnet_diagnostic.CA1819.severity = none
# CA2000: Dispose objects before losing scope (while relevant has too many false positives for our code)
dotnet_diagnostic.CA2000.severity = none
# CA2201: Do not raise reserved exception types (good suggestion but failing build due to this too pedantic)
dotnet_diagnostic.CA2201.severity = none
# CA2217: Do not mark enums with FlagsAttribute (will fail on correctly defined flags enums)
dotnet_diagnostic.CA2217.severity = none
# CA2225: Operator overloads have named alternates (not always necessary)
dotnet_diagnostic.CA2225.severity = none
# CA5394: Do not use insecure randomness (we don't use randomness for security)
dotnet_diagnostic.CA5394.severity = none
# CS1573: Parameter has no matching param tag in the XML comment (but other parameters do)
dotnet_diagnostic.CS1573.severity = none
# IDE0300: Use collection expression for array
dotnet_diagnostic.IDE0300.severity = warning
# IDE0301: Use collection expression for empty
dotnet_diagnostic.IDE0301.severity = warning
#
# Roslynator (https://josefpihrt.github.io/docs/roslynator/configuration/)
#
# Options
roslynator_accessibility_modifiers = implicit
# Applicable to: rcs1018
roslynator_accessor_braces_style = single_line_when_expression_is_on_single_line
# Default: multi_line
# Applicable to: rcs0020
roslynator_array_creation_type_style = implicit
# Applicable to: rcs1014
roslynator_arrow_token_new_line = after
# Applicable to: rcs0032
roslynator_binary_operator_new_line = after
# Applicable to: rcs0027
roslynator_blank_line_after_file_scoped_namespace_declaration = true
# Applicable to: rcs0060
roslynator_blank_line_between_closing_brace_and_switch_section = true
# Applicable to: rcs0014, rcs1036
roslynator_blank_line_between_single_line_accessors = false
# Applicable to: rcs0011
roslynator_blank_line_between_switch_sections = omit
# Applicable to: rcs0061
roslynator_blank_line_between_using_directives = never
# Applicable to: rcs0015
roslynator_block_braces_style = single_line_when_empty
# Default: multi_line
# Applicable to: rcs0021
roslynator_body_style = expression
# Applicable to: rcs1016
roslynator_conditional_operator_condition_parentheses_style = omit_when_condition_is_single_token
# Applicable to: rcs1051
roslynator_conditional_operator_new_line = after
# Applicable to: rcs0028
roslynator_configure_await = false
# Applicable to: rcs1090
roslynator_doc_comment_summary_style = multi_line
# Applicable to: rcs1253
roslynator_empty_string_style = field
# Applicable to: rcs1078
# NOT ACTIVE
#roslynator_enum_flag_value_style = decimal_number
# Applicable to: rcs1254
roslynator_enum_has_flag_style = operator
# Applicable to: rcs1096
roslynator_equals_token_new_line = after
# Applicable to: rcs0052
roslynator_infinite_loop_style = while
# Applicable to: rcs1252
roslynator_max_line_length = 120
# Default: 140
# Applicable to: rcs0056
roslynator_new_line_at_end_of_file = true
# Applicable to: rcs0058
roslynator_new_line_before_while_in_do_statement = false
# Applicable to: rcs0051
roslynator_null_check_style = pattern_matching
# Applicable to: rcs1248
roslynator_null_conditional_operator_new_line = before
# Applicable to: rcs0059
roslynator_object_creation_parentheses_style = omit
# Applicable to: rcs1050
roslynator_object_creation_type_style = implicit
# Applicable to: rcs1250
roslynator_prefix_field_identifier_with_underscore = false
roslynator_tab_length = 4
# Default: 4
# Applicable to: rcs0056
roslynator_trailing_comma_style = omit_when_single_line
# Applicable to: rcs1260
roslynator_unity_code_analysis.enabled = false
# Applicable to: rcs1169, rcs1213
roslynator_use_anonymous_function_or_method_group = method_group
# Applicable to: rcs1207
roslynator_use_block_body_when_declaration_spans_over_multiple_lines = true
# Applicable to: rcs1016
roslynator_use_block_body_when_expression_spans_over_multiple_lines = true
# Applicable to: rcs1016
roslynator_use_collection_expression = true
# Applicable to: rcs1014, rcs1250
roslynator_use_var = always
# Applicable to: rcs1264
roslynator_use_var_instead_of_implicit_object_creation = true
# Applicable to: rcs1250
# Analyzers
# Add blank line after embedded statement
dotnet_diagnostic.rcs0001.severity = none
# Add blank line after #region
dotnet_diagnostic.rcs0002.severity = none
# Add blank line after using directive list
dotnet_diagnostic.rcs0003.severity = warning
# Add blank line before #endregion
dotnet_diagnostic.rcs0005.severity = none
# Add blank line before using directive list
dotnet_diagnostic.rcs0006.severity = none
# Add blank line between accessors
dotnet_diagnostic.rcs0007.severity = none
# Add blank line between closing brace and next statement
dotnet_diagnostic.rcs0008.severity = none
# Add blank line between declaration and documentation comment
dotnet_diagnostic.rcs0009.severity = none
# Add blank line between declarations
dotnet_diagnostic.rcs0010.severity = none
# Add/remove blank line between single-line accessors
dotnet_diagnostic.rcs0011.severity = none
# Options: roslynator_blank_line_between_single_line_accessors
# Add blank line between single-line declarations
dotnet_diagnostic.rcs0012.severity = none
# Add blank line between single-line declarations of different kind
dotnet_diagnostic.rcs0013.severity = none
# Add/remove blank line between using directives
dotnet_diagnostic.rcs0015.severity = none
# Options: roslynator_blank_line_between_using_directives
# Put attribute list on its own line
dotnet_diagnostic.rcs0016.severity = none
# Format accessor's braces on a single line or multiple lines
dotnet_diagnostic.rcs0020.severity = none
# Options: roslynator_accessor_braces_style
# Format block's braces on a single line or multiple lines
dotnet_diagnostic.rcs0021.severity = none
# Options: roslynator_block_braces_style
# Format type declaration's braces
dotnet_diagnostic.rcs0023.severity = none
# Add new line after switch label
dotnet_diagnostic.rcs0024.severity = none
# Put full accessor on its own line
dotnet_diagnostic.rcs0025.severity = none
# Place new line after/before binary operator
dotnet_diagnostic.rcs0027.severity = none
# Options: roslynator_binary_operator_new_line
# Place new line after/before '?:' operator
dotnet_diagnostic.rcs0028.severity = none
# Options: roslynator_conditional_operator_new_line
# Put constructor initializer on its own line
dotnet_diagnostic.rcs0029.severity = none
# Put embedded statement on its own line
dotnet_diagnostic.rcs0030.severity = none
# Put enum member on its own line
dotnet_diagnostic.rcs0031.severity = none
# Place new line after/before arrow token
dotnet_diagnostic.rcs0032.severity = none
# Options: roslynator_arrow_token_new_line
# Put statement on its own line
dotnet_diagnostic.rcs0033.severity = none
# Put type parameter constraint on its own line
dotnet_diagnostic.rcs0034.severity = none
# Remove blank line between single-line declarations of same kind
dotnet_diagnostic.rcs0036.severity = none
# Remove new line before base list
dotnet_diagnostic.rcs0039.severity = none
# Remove new line between 'if' keyword and 'else' keyword
dotnet_diagnostic.rcs0041.severity = none
# Put auto-accessors on a single line
dotnet_diagnostic.rcs0042.severity = none
# Use carriage return + linefeed as new line
dotnet_diagnostic.rcs0044.severity = none
# Use linefeed as new line
dotnet_diagnostic.rcs0045.severity = none
# Use spaces instead of tab
dotnet_diagnostic.rcs0046.severity = warning
# Put initializer on a single line
dotnet_diagnostic.rcs0048.severity = none
# Add blank line after top comment
dotnet_diagnostic.rcs0049.severity = none
# Add blank line before top declaration
dotnet_diagnostic.rcs0050.severity = none
# Add/remove new line before 'while' in 'do' statement
dotnet_diagnostic.rcs0051.severity = none
# Options: roslynator_new_line_before_while_in_do_statement
# Place new line after/before equals token
dotnet_diagnostic.rcs0052.severity = none
# Options: roslynator_equals_token_new_line
# Fix formatting of a list
dotnet_diagnostic.rcs0053.severity = none
# Fix formatting of a call chain
dotnet_diagnostic.rcs0054.severity = none
# Fix formatting of a binary expression chain
dotnet_diagnostic.rcs0055.severity = none
# A line is too long
dotnet_diagnostic.rcs0056.severity = none
# Options: roslynator_max_line_length, roslynator_tab_length
# Normalize whitespace at the beginning of a file
dotnet_diagnostic.rcs0057.severity = none
# Normalize whitespace at the end of a file
dotnet_diagnostic.rcs0058.severity = none
# Options: roslynator_new_line_at_end_of_file
# Place new line after/before null-conditional operator
dotnet_diagnostic.rcs0059.severity = none
# Options: roslynator_null_conditional_operator_new_line
# Add/remove line after file scoped namespace declaration
dotnet_diagnostic.rcs0060.severity = none
# Options: roslynator_blank_line_after_file_scoped_namespace_declaration
# Add/remove blank line between switch sections
dotnet_diagnostic.rcs0061.severity = none
# Options: roslynator_blank_line_between_switch_sections
# Add braces (when expression spans over multiple lines)
dotnet_diagnostic.rcs1001.severity = error
# Remove braces
dotnet_diagnostic.rcs1002.severity = none
# Add braces to if-else (when expression spans over multiple lines)
dotnet_diagnostic.rcs1003.severity = error
# Remove braces from if-else
dotnet_diagnostic.rcs1004.severity = none
# Simplify nested using statement
dotnet_diagnostic.rcs1005.severity = silent
# Merge 'else' with nested 'if'
dotnet_diagnostic.rcs1006.severity = silent
# Add braces
dotnet_diagnostic.rcs1007.severity = none
# Use predefined type
dotnet_diagnostic.rcs1013.severity = none
# Use explicitly/implicitly typed array
dotnet_diagnostic.rcs1014.severity = error
# Options: roslynator_array_creation_type_style, roslynator_use_collection_expression
# Use nameof operator
dotnet_diagnostic.rcs1015.severity = warning
# Use block body or expression body
dotnet_diagnostic.rcs1016.severity = none
# Options: roslynator_body_style, roslynator_use_block_body_when_declaration_spans_over_multiple_lines, roslynator_use_block_body_when_expression_spans_over_multiple_lines
# Add/remove accessibility modifiers
dotnet_diagnostic.rcs1018.severity = none
# Options: roslynator_accessibility_modifiers
# Order modifiers
dotnet_diagnostic.rcs1019.severity = none
# Simplify Nullable<T> to T?
dotnet_diagnostic.rcs1020.severity = error
# Convert lambda expression body to expression body
dotnet_diagnostic.rcs1021.severity = warning
# Remove unnecessary braces in switch section
dotnet_diagnostic.rcs1031.severity = silent
# Remove redundant parentheses
dotnet_diagnostic.rcs1032.severity = warning
# Remove redundant boolean literal
dotnet_diagnostic.rcs1033.severity = error
# Remove redundant 'sealed' modifier
dotnet_diagnostic.rcs1034.severity = silent
# Remove unnecessary blank line
dotnet_diagnostic.rcs1036.severity = error
# Options: roslynator_blank_line_between_closing_brace_and_switch_section
# Remove trailing white-space
dotnet_diagnostic.rcs1037.severity = warning
# Remove argument list from attribute
dotnet_diagnostic.rcs1039.severity = silent
# Remove enum default underlying type
dotnet_diagnostic.rcs1042.severity = silent
# Remove 'partial' modifier from type with a single part
dotnet_diagnostic.rcs1043.severity = silent
# Remove original exception from throw statement
dotnet_diagnostic.rcs1044.severity = warning
# Asynchronous method name should end with 'Async'
dotnet_diagnostic.rcs1046.severity = none
# Non-asynchronous method name should not end with 'Async'
dotnet_diagnostic.rcs1047.severity = error
# Use lambda expression instead of anonymous method
dotnet_diagnostic.rcs1048.severity = error
# Simplify boolean comparison
dotnet_diagnostic.rcs1049.severity = error
# Include/omit parentheses when creating new object
dotnet_diagnostic.rcs1050.severity = none
# Options: roslynator_object_creation_parentheses_style
# Add/remove parentheses from condition in conditional operator
dotnet_diagnostic.rcs1051.severity = none
# Options: roslynator_conditional_operator_condition_parentheses_style
# Declare each attribute separately
dotnet_diagnostic.rcs1052.severity = none
# Unnecessary semicolon at the end of declaration
dotnet_diagnostic.rcs1055.severity = silent
# Avoid usage of using alias directive
dotnet_diagnostic.rcs1056.severity = none
# Use compound assignment
dotnet_diagnostic.rcs1058.severity = error
# Avoid locking on publicly accessible instance
dotnet_diagnostic.rcs1059.severity = warning
# Declare each type in separate file
dotnet_diagnostic.rcs1060.severity = none
# Merge 'if' with nested 'if'
dotnet_diagnostic.rcs1061.severity = silent
# Simplify logical negation
dotnet_diagnostic.rcs1068.severity = error
# Remove unnecessary case label
dotnet_diagnostic.rcs1069.severity = silent
# Remove redundant default switch section
dotnet_diagnostic.rcs1070.severity = silent
# Remove redundant base constructor call
dotnet_diagnostic.rcs1071.severity = silent
# Convert 'if' to 'return' statement
dotnet_diagnostic.rcs1073.severity = error
# Remove redundant constructor
dotnet_diagnostic.rcs1074.severity = silent
# Avoid empty catch clause that catches System.Exception
dotnet_diagnostic.rcs1075.severity = warning
# Optimize LINQ method call
dotnet_diagnostic.rcs1077.severity = error
# Use "" or 'string.Empty'
dotnet_diagnostic.rcs1078.severity = none
# Options: roslynator_empty_string_style
# Throwing of new NotImplementedException
dotnet_diagnostic.rcs1079.severity = none
# Use 'Count/Length' property instead of 'Any' method
dotnet_diagnostic.rcs1080.severity = none
# Split variable declaration
dotnet_diagnostic.rcs1081.severity = none
# Use coalesce expression instead of conditional expression
dotnet_diagnostic.rcs1084.severity = error
# Use auto-implemented property
dotnet_diagnostic.rcs1085.severity = error
# Use --/++ operator instead of assignment
dotnet_diagnostic.rcs1089.severity = error
# Add/remove 'ConfigureAwait(false)' call
dotnet_diagnostic.rcs1090.severity = none
# Options: roslynator_configure_await
# File contains no code
dotnet_diagnostic.rcs1093.severity = error
# Declare using directive on top level
dotnet_diagnostic.rcs1094.severity = none
# Use 'HasFlag' method or bitwise operator
dotnet_diagnostic.rcs1096.severity = none
# Options: roslynator_enum_has_flag_style
# Remove redundant 'ToString' call
dotnet_diagnostic.rcs1097.severity = error
# Constant values should be placed on right side of comparisons
dotnet_diagnostic.rcs1098.severity = error
# Default label should be the last label in a switch section
dotnet_diagnostic.rcs1099.severity = error
# Make class static
dotnet_diagnostic.rcs1102.severity = warning
# Convert 'if' to assignment
dotnet_diagnostic.rcs1103.severity = error
# Simplify conditional expression
dotnet_diagnostic.rcs1104.severity = error
# Unnecessary interpolation
dotnet_diagnostic.rcs1105.severity = error