-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.editorconfig
More file actions
807 lines (581 loc) · 26.6 KB
/
Copy path.editorconfig
File metadata and controls
807 lines (581 loc) · 26.6 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
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
; Top-most http://editorconfig.org/ file
root = true
[*]
insert_final_newline = true
indent_style = space
charset = utf-8
trim_trailing_whitespace = true
max_line_length = 180
[*.cs]
indent_size = 4
[*.{xml,config,*proj,nuspec,props,resx,targets,yml,tasks}]
indent_size = 2
# Xml config files
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
indent_size = 2
[*.json]
indent_size = 2
[*.{ps1,psm1}]
indent_size = 4
[*.sh]
indent_size = 4
[*.{cs,vb}]
[external/sdl2-cs/src/**]
generated_code = true
dotnet_analyzer_diagnostic.severity = none
dotnet_diagnostic.CA5392.severity = none
[src/SDL2.Core/SDL2.cs]
generated_code = true
dotnet_analyzer_diagnostic.severity = none
dotnet_diagnostic.CA5392.severity = none
# Roslynator Configuration
#dotnet_analyzer_diagnostic.category-roslynator.severity = error
#roslynator_analyzers.enabled_by_default = true
#roslynator_refactorings.enabled = true
#roslynator_compiler_diagnostic_fixes.enabled = true
#dotnet_analyzer_diagnostic.category-style.severity = error
# CA1865-CA1867: Use 'string.Method(char)' instead of 'string.Method(string)' for string with single char
dotnet_diagnostic.CA1865.severity = error
dotnet_diagnostic.CA1866.severity = error
dotnet_diagnostic.CA1867.severity = error
# CA1008: Enums should have zero value
dotnet_diagnostic.CA1008.severity = error
# CA1869: Cache and reuse 'JsonSerializerOptions' instances
dotnet_diagnostic.CA1869.severity = error
# For variables
dotnet_naming_symbols.local_symbol.applicable_kinds = parameter, local
dotnet_naming_style.local_style.capitalization = camel_case
dotnet_naming_rule.variables_are_camel_case.severity = error
dotnet_naming_rule.variables_are_camel_case.symbols = local_symbol
dotnet_naming_rule.variables_are_camel_case.style = local_style
# Sort using and Import directives with System.* appearing first
dotnet_separate_import_directive_groups = false
dotnet_sort_system_directives_first = true
dotnet_style_require_accessibility_modifiers = always:error
dotnet_style_readonly_field = true:error
# CA1851: Possible multiple enumerations of IEnumerable collection
dotnet_diagnostic.CA1851.severity = error
# IDE0057: Use range operator
dotnet_diagnostic.IDE0057.severity = error
# IDE0071: Simplify interpolation
dotnet_diagnostic.IDE0071.severity = error
# IDE0075: Simplify conditional expression
dotnet_diagnostic.IDE0075.severity = error
# IDE0250: Struct can be made 'readonly' (IDE0250)
dotnet_diagnostic.IDE0250.severity = error
# IDE0002: Simplify member access
dotnet_diagnostic.IDE0002.severity = error
# IDE0003: this and Me preferences
dotnet_diagnostic.IDE0003.severity = error
# IDE0007: 'var' preferences
dotnet_diagnostic.IDE0007.severity = error
# IDE0001: Simplify name
dotnet_diagnostic.IDE0001.severity = error
# IDE0036: Order modifiers
dotnet_diagnostic.IDE0036.severity = error
# IDE0004: Remove unnecessary cast
dotnet_diagnostic.IDE0004.severity = error
# IDE0110: Remove unnecessary discard
dotnet_diagnostic.IDE0110.severity = error
# IDE0080: Remove unnecessary suppression operator
dotnet_diagnostic.IDE0080.severity = error
# IDE0082: Convert typeof to nameof
dotnet_diagnostic.IDE0082.severity = error
# IDE0100: Remove unnecessary equality operator
dotnet_diagnostic.IDE0100.severity = error
# IDE0052: Remove unread private member
dotnet_diagnostic.IDE0052.severity = error
# IDE0056: Use index operator
dotnet_diagnostic.IDE0056.severity = error
# IDE0018: Inline variable declaration
dotnet_diagnostic.IDE0018.severity = error
# IDE0090: Simplify new expression
dotnet_diagnostic.IDE0090.severity = error
# IDE0044: Make field readonly
dotnet_diagnostic.IDE0044.severity = error
# IDE0034: Simplify 'default' expression
dotnet_diagnostic.IDE0034.severity = error
# IDE0035: Remove unreachable code
dotnet_diagnostic.IDE0035.severity = error
# CA1842: Do not use 'WhenAll' with a single task
dotnet_diagnostic.CA1842.severity = error
# CA1843: Do not use 'WaitAll' with a single task
dotnet_diagnostic.CA1843.severity = error
# CA2200: Rethrow to preserve stack details
dotnet_diagnostic.CA2200.severity = error
# IDE0005: Remove unnecessary usings
dotnet_diagnostic.IDE0005.severity = error
# IDE0055: All formatting rules
dotnet_diagnostic.IDE0055.severity = error
# IDE0051: Remove unused private members
dotnet_diagnostic.IDE0051.severity = error
# IDE0060: Remove unused parameter
dotnet_code_quality_unused_parameters = all
dotnet_diagnostic.IDE0060.severity = error
# CA1847: Use string.Contains(char) instead of string.Contains(string) with single characters
dotnet_diagnostic.CA1847.severity = error
# CA1853: CA1853: Unnecessary call to 'Dictionary.ContainsKey(key)'
dotnet_diagnostic.CA1853.severity = error
# CA1850: Prefer static HashData method over ComputeHash
dotnet_diagnostic.CA1850.severity = error
# CA1849: Call async methods when in an async method
dotnet_diagnostic.CA1849.severity = error
# CA1813: Avoid unsealed attributes
dotnet_diagnostic.CA1813.severity = error
# CA1806: Do not ignore method results
dotnet_diagnostic.CA1806.severity = error
# CA1852: Seal internal types
dotnet_diagnostic.CA1852.severity = error
# CA1854: Prefer the IDictionary.TryGetValue(TKey, out TValue) method
dotnet_diagnostic.CA1854.severity = error
# IDE0017: Use object initializers
dotnet_diagnostic.IDE0017.severity = error
# IDE0019: Use pattern matching to avoid 'as' followed by a 'null' check
dotnet_diagnostic.IDE0019.severity = error
# IDE0028: Use collection initializers
dotnet_diagnostic.IDE0028.severity = error
# IDE0270: Null check can be simplified
dotnet_diagnostic.IDE0270.severity = error
# IDE0029: Use coalesce expression (non-nullable types)
dotnet_diagnostic.IDE0029.severity = error
# IDE0030: Use coalesce expression (nullable types)
dotnet_diagnostic.IDE0030.severity = error
# IDE0031: Use null propagation
dotnet_diagnostic.IDE0031.severity = error
# IDE0033: Use explicitly provided tuple name
dotnet_diagnostic.IDE0033.severity = error
# IDE0072: Add missing cases to switch expression
dotnet_diagnostic.IDE0072.severity = error
# IDE0180: Use tuple to swap values
dotnet_diagnostic.IDE0180.severity = error
# Avoid "this." and "Me." if not necessary
dotnet_style_qualification_for_field = false:error
dotnet_style_qualification_for_property = false:error
dotnet_style_qualification_for_method = false:error
dotnet_style_qualification_for_event = 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:error
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:error
dotnet_style_parentheses_in_other_operators = always_for_clarity:error
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:error
# 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
# Newline settings
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_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
# Do not enforce single-line braces inside initializers
resharper_wrap_object_and_collection_initializer_style = chop_always
# Space preferences
csharp_max_attribute_length_for_same_line = 80
# 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
# Brace settings
csharp_prefer_braces = true # Prefer curly braces even for one line of code
# CA1018: Mark attributes with AttributeUsageAttribute
dotnet_diagnostic.CA1018.severity = error
# CA1047: Do not declare protected member in sealed type
dotnet_diagnostic.CA1047.severity = error
# CA1507: Use nameof to express symbol names
dotnet_diagnostic.CA1507.severity = error
# CA1510: Use ArgumentNullException throw helper
dotnet_diagnostic.CA1510.severity = error
# CA1511: Use ArgumentException throw helper
dotnet_diagnostic.CA1511.severity = error
# CA1826: Do not use Enumerable methods on indexable collections. Instead use the collection directly
dotnet_diagnostic.CA1826.severity = error
# CA1512: Use ArgumentOutOfRangeException throw helper
dotnet_diagnostic.CA1512.severity = error
# CA1513: Use ObjectDisposedException throw helper
dotnet_diagnostic.CA1513.severity = error
# CA1725: Parameter names should match base declaration
dotnet_diagnostic.CA1725.severity = error
# CA1727: Use PascalCase for named placeholders
dotnet_diagnostic.CA1727.severity = error
# CA1802: Use literals where appropriate
dotnet_diagnostic.CA1802.severity = error
# CA2208: Instantiate argument exceptions correctly
dotnet_diagnostic.CA2208.severity = error
# CA1805: Do not initialize unnecessarily
dotnet_diagnostic.CA1805.severity = error
# CA1810: Do not initialize unnecessarily
dotnet_diagnostic.CA1810.severity = error
# CA1811: Avoid uncalled private code
dotnet_diagnostic.CA1812.severity = error
# CA2201: Do not raise reserved exception types
dotnet_diagnostic.CA2201.severity = error
# CA1821: Remove empty Finalizers
dotnet_diagnostic.CA1821.severity = error
# CA1822: Make member static
dotnet_diagnostic.CA1822.severity = error
dotnet_code_quality.CA1822.api_surface = private, internal
# CA1823: Avoid unused private fields
dotnet_diagnostic.CA1823.severity = error
# CA1825: Avoid zero-length array allocations
dotnet_diagnostic.CA1825.severity = error
# CA1827: Do not use Count() or LongCount() when Any() can be used
dotnet_diagnostic.CA1827.severity = error
# CA1828: Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used
dotnet_diagnostic.CA1828.severity = error
# CA1829: Use Length/Count property instead of Count() when available
dotnet_diagnostic.CA1829.severity = error
# CA1830: Prefer strongly-typed Append and Insert method overloads on StringBuilder
dotnet_diagnostic.CA1830.severity = error
# CA1831: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
# CA1832: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
# CA1833: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
dotnet_diagnostic.CA1831.severity = error
dotnet_diagnostic.CA1832.severity = error
dotnet_diagnostic.CA1833.severity = error
# CA1834: Consider using 'StringBuilder.Append(char)' when applicable
dotnet_diagnostic.CA1834.severity = error
# CA1835: Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'
dotnet_diagnostic.CA1835.severity = error
# CA1836: Prefer IsEmpty over Count
dotnet_diagnostic.CA1836.severity = error
# CA1837: Use 'Environment.ProcessId'
dotnet_diagnostic.CA1837.severity = error
# CA1838: Avoid 'StringBuilder' parameters for P/Invokes
dotnet_diagnostic.CA1838.severity = error
# CA1839: Use 'Environment.ProcessPath'
dotnet_diagnostic.CA1839.severity = error
# CA1840: Use 'Environment.CurrentManagedThreadId'
dotnet_diagnostic.CA1840.severity = error
# CA1841: Prefer Dictionary.Contains methods
dotnet_diagnostic.CA1841.severity = error
# CA1844: Provide memory-based overrides of async methods when subclassing 'Stream'
dotnet_diagnostic.CA1844.severity = error
# CA1845: Use span-based 'string.Concat'
dotnet_diagnostic.CA1845.severity = error
# CA1846: Prefer AsSpan over Substring
dotnet_diagnostic.CA1846.severity = error
# CA1855: Prefer 'Clear' over 'Fill'
dotnet_diagnostic.CA1855.severity = error
# CA1858: Use 'StartsWith' instead of 'IndexOf'
dotnet_diagnostic.CA1858.severity = error
# CA2007: Do not directly await a Task
dotnet_diagnostic.CA2007.severity = suggestion
# CA2008: Do not create tasks without passing a TaskScheduler
dotnet_diagnostic.CA2008.severity = error
# CA2009: Do not call ToImmutableCollection on an ImmutableCollection value
dotnet_diagnostic.CA2009.severity = error
# CA2011: Avoid infinite recursion
dotnet_diagnostic.CA2011.severity = error
# CA2012: Use ValueTask correctly
dotnet_diagnostic.CA2012.severity = error
# CA2013: Do not use ReferenceEquals with value types
dotnet_diagnostic.CA2013.severity = error
# CA2014: Do not use stackalloc in loops.
dotnet_diagnostic.CA2014.severity = error
# CA2016: Forward the 'CancellationToken' parameter to methods that take one
dotnet_diagnostic.CA2016.severity = error
# CA2245: Do not assign a property to itself
dotnet_diagnostic.CA2245.severity = error
# CA2246: Assigning symbol and its member in the same statement
dotnet_diagnostic.CA2246.severity = error
# CA2249: Use string.Contains instead of string.IndexOf to improve readability.
dotnet_diagnostic.CA2249.severity = error
# CA1848: Use the LoggerMessage delegates
dotnet_diagnostic.CA1848.severity = none
# IDE0011: Curly braces to surround blocks of code
dotnet_diagnostic.IDE0011.severity = error
# IDE0020: Use pattern matching to avoid is check followed by a cast (with variable)
dotnet_diagnostic.IDE0020.severity = error
# IDE0038: Use pattern matching to avoid is check followed by a cast (without variable)
dotnet_diagnostic.IDE0038.severity = error
# IDE0059: Unnecessary assignment to a value
dotnet_diagnostic.IDE0059.severity = error
# IDE0062: Make local function static
dotnet_diagnostic.IDE0062.severity = error
# IDE0161: Convert to file-scoped namespace
dotnet_diagnostic.IDE0161.severity = error
# IDE0200: Lambda expression can be removed
dotnet_diagnostic.IDE0200.severity = error
# IDE0043: Format string contains invalid placeholder
dotnet_diagnostic.IDE0043.severity = error
# IDE0066: Use switch expression
dotnet_diagnostic.IDE0066.severity = error
# IDE0078: Use pattern matching
dotnet_diagnostic.IDE0078.severity = error
# IDE0083: Use pattern matching (not operator)
dotnet_diagnostic.IDE0083.severity = error
# IDE2000: Disallow multiple blank lines
dotnet_style_allow_multiple_blank_lines_experimental = false
dotnet_diagnostic.IDE2000.severity = error
# 'using' directive preferences
csharp_using_directive_placement = outside_namespace:error
# CA1304: Specify CultureInfo
# Help link: https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304
dotnet_diagnostic.CA1304.severity = error
# CA1305: Specify IFormatProvider
# Help link: https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305
dotnet_diagnostic.CA1305.severity = error
# CA1307: Specify StringComparison for clarity
# Help link: https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307
dotnet_diagnostic.CA1307.severity = error
# CA1309: Use ordinal string comparison
# Help link: https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1309
dotnet_diagnostic.CA1309.severity = error
# CA1310: Specify StringComparison for correctness
# Help link: https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1310
dotnet_diagnostic.CA1310.severity = error
# CA1311: Specify a culture or use an invariant version
# Help link: https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1311
dotnet_diagnostic.CA1311.severity = error
# CA1820: Test for empty strings using string length
# Help link: https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1820
dotnet_diagnostic.CA1820.severity = error
# CA2251: Use 'string.Equals'
# Help link: https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2251
dotnet_diagnostic.CA2251.severity = error
# CA1069: Enums should not have duplicate values
dotnet_diagnostic.CA1069.severity = error
# CA1068: CancellationToken parameters must come last
dotnet_diagnostic.CA1068.severity = error
# CA1063: Implement IDisposable correctly
dotnet_diagnostic.CA1063.severity = error
# CA2100: Review SQL queries for security vulnerabilities
dotnet_diagnostic.CA2100.severity = error
# CA3001: Review code for SQL injection vulnerabilities
dotnet_diagnostic.CA3001.severity = error
# CA3002: Review code for XSS vulnerabilities
dotnet_diagnostic.CA3002.severity = error
# CA3007: Review code for open redirect vulnerabilities
dotnet_diagnostic.CA3007.severity = error
# CA2215: Dispose methods should call base class dispose
dotnet_diagnostic.CA2215.severity = error
# CA2213: Disposable fields should be disposed
dotnet_diagnostic.CA2213.severity = error
# CA1801: Review unused parameters
dotnet_diagnostic.CA1801.severity = error
# CA1860: Avoid using 'Enumerable.Any()' extension method
dotnet_diagnostic.CA1860.severity = error
# CA1861: Avoid constant arrays as arguments
dotnet_diagnostic.CA1861.severity = error
# CA1500: Variable names should not match field names
dotnet_diagnostic.CA1500.severity = error
# CA1864: Prefer the 'IDictionary.TryAdd(TKey, TValue)' method
dotnet_diagnostic.CA1864.severity = error
# CA2250: Use ThrowIfCancellationRequested
dotnet_diagnostic.CA2250.severity = error
# CA2248: Provide correct enum argument to Enum.HasFlag
dotnet_diagnostic.CA2248.severity = error
# CA2244: Do not duplicate indexed element initializations
dotnet_diagnostic.CA2244.severity = error
# CA5394: Do not use insecure randomness
dotnet_diagnostic.CA5394.severity = error
# CA1064: Exceptions should be public
dotnet_diagnostic.CA1064.severity = error
# CA1032: Implement standard exception constructors
dotnet_diagnostic.CA1032.severity = error
# CA1027: Mark enums with FlagsAttribute
dotnet_diagnostic.CA1027.severity = error
# CA2217: Do not mark enums with FlagsAttribute
dotnet_diagnostic.CA2217.severity = error
# Use 'nameof' (IDE0280)
dotnet_diagnostic.IDE0280.severity = error
# CA1707: Identifiers should not contain underscores
dotnet_diagnostic.CA1707.severity = error
# CA1859: Use concrete types when possible for improved performance
dotnet_diagnostic.CA1859.severity = error
# CA1862: Use the 'StringComparison' method overloads to perform case-insensitive string comparisons
dotnet_diagnostic.CA1862.severity = error
# CA1868: Unnecessary call to 'Contains' for sets
dotnet_diagnostic.CA1868.severity = error
# CA1870: Use a cached 'SearchValues' instance
dotnet_diagnostic.CA1870.severity = error
# CA1031: CA1031: Do not catch general exception types
dotnet_diagnostic.CA1031.severity = none
# Member can be made 'readonly' (IDE0251)
dotnet_diagnostic.IDE0251.severity = error
# Nullable directive is redundant (IDE0240)
dotnet_diagnostic.IDE0240.severity = error
# Nullable directive is unnecessary (IDE0241)
dotnet_diagnostic.IDE0241.severity = error
#CA1819: Properties should not return arrays
dotnet_diagnostic.CA1819.severity = error
#IDE0120: Simplify LINQ expression (IDE0120)
dotnet_diagnostic.IDE0120.severity = error
#IDE0065: 'using' directive placement (IDE0065)
dotnet_diagnostic.IDE0065.severity = error
[*.cs]
# force file scoped namespaces
csharp_style_namespace_declarations = file_scoped:error
# CA1012: Abstract types should not have public constructors
dotnet_diagnostic.CA1012.severity = error
# dotnet_diagnostic.IDE1006.severity
dotnet_diagnostic.IDE1006.severity = error
# dotnet_diagnostic.IDE0160.severity
dotnet_diagnostic.IDE0160.severity = error
# dotnet_diagnostic.IDE0130.severity
dotnet_diagnostic.IDE0130.severity = error
# CA1062: Validate arguments of public methods
dotnet_diagnostic.CA1062.severity = suggestion
# CA1308: In method 'urlToLower', replace the call to 'ToLowerInvariant' with 'ToUpperInvariant' (CA1308)
dotnet_diagnostic.CA1308.severity = suggestion
# CA1040: Avoid empty interfaces
dotnet_diagnostic.CA1040.severity = suggestion
# S2479: Replace the control character at position 7 by its escape sequence
dotnet_diagnostic.S2479.severity = suggestion
# CA1056: Change the type of property 'Url' from 'string' to 'System.Uri'
dotnet_diagnostic.CA1056.severity = suggestion
# CA1054: Change the type of parameter of the method to allow a Uri to be passed as a 'System.Uri' object
dotnet_diagnostic.CA1054.severity = suggestion
# CA1055: Change the return type of method from 'string' to 'System.Uri'
dotnet_diagnostic.CA1055.severity = suggestion
# S4457: Split this method into two, one handling parameters check and the other handling the asynchronous code.
dotnet_diagnostic.S4457.severity = suggestion
# AsyncFixer01: Unnecessary async/await usage
dotnet_diagnostic.AsyncFixer01.severity = suggestion
# AsyncFixer02: Long-running or blocking operations inside an async method
dotnet_diagnostic.AsyncFixer02.severity = error
# VSTHRD103: Call async methods when in an async method
dotnet_diagnostic.VSTHRD103.severity = error
# AsyncFixer03: Fire & forget async void methods
dotnet_diagnostic.AsyncFixer03.severity = error
# VSTHRD100: Avoid async void methods
dotnet_diagnostic.VSTHRD100.severity = error
# VSTHRD101: Avoid unsupported async delegates
dotnet_diagnostic.VSTHRD101.severity = error
# VSTHRD107: Await Task within using expression
dotnet_diagnostic.VSTHRD107.severity = error
# AsyncFixer04: Fire & forget async call inside a using block
dotnet_diagnostic.AsyncFixer04.severity = error
# VSTHRD110: Observe result of async calls
dotnet_diagnostic.VSTHRD110.severity = error
# VSTHRD002: Avoid problematic synchronous waits
dotnet_diagnostic.VSTHRD002.severity = error
# AsyncifyInvocation: Use Task Async
dotnet_diagnostic.AsyncifyInvocation.severity = error
# AsyncifyVariable: Use Task Async
dotnet_diagnostic.AsyncifyVariable.severity = error
# VSTHRD111: Use ConfigureAwait(bool)
dotnet_diagnostic.VSTHRD111.severity = error
# VSTHRD114: Avoid returning a null Task
dotnet_diagnostic.VSTHRD114.severity = error
# VSTHRD200: Use "Async" suffix for async methods
dotnet_diagnostic.VSTHRD200.severity = suggestion
#AsyncFixer05: Downcasting from a nested task to an outer task.
dotnet_diagnostic.AsyncFixer05.severity = error
#CA1819: Properties should not return arrays
dotnet_diagnostic.CA1819.severity = suggestion
# Sonar --------------------------------------------------
# S125: Sections of code should not be commented out
dotnet_diagnostic.S125.severity = suggestion
# S2094: Classes should not be empty
dotnet_diagnostic.S2094.severity = suggestion
# Unnecessary bit operations should not be performed
dotnet_diagnostic.S2437.severity = warning
# MA -----------------------------------------------------
MA0051.maximum_lines_per_method = 80
MA0051.maximum_statements_per_method = 60
MA0011.exclude_tostring_methods = true
# MA0004 : Use Task.ConfigureAwait(false) if the current SynchronizationContext is not needed
dotnet_diagnostic.MA0004.severity = none
# MA0006: Use string. Equals instead of Equals operator
dotnet_diagnostic.MA0006.severity = suggestion
dotnet_diagnostic.MA0089.severity = error
# MA0080: Use a cancellation token using .WithCancellation()
dotnet_diagnostic.MA0080.severity = error
# MA0022: Return Task.FromResult instead of returning null
dotnet_diagnostic.MA0022.severity = error
# MA0045: Do not use blocking call (make method async)
dotnet_diagnostic.MA0045.severity = error
# MA0026 : Complete the task
# MA0028 - Optimize StringBuilder usage
dotnet_diagnostic.MA0028.severity = error
# MA0029 - Combine LINQ methods
dotnet_diagnostic.MA0029.severity = error
# MA0044 - Remove useless ToString call
dotnet_diagnostic.MA0044.severity = error
# MA0052 - Replace constant Enum.ToString with nameof
dotnet_diagnostic.MA0052.severity = error
# MA0063 - Use Where before OrderBy
dotnet_diagnostic.MA0063.severity = error
# MA0078 - Use 'Cast' instead of 'Select' to cast
dotnet_diagnostic.MA0078.severity = error
# MA0105 - Use the lambda parameters instead of using a closure
dotnet_diagnostic.MA0105.severity = error
# MA0106 - Avoid closure by using an overload with the 'factoryArgument' parameter
dotnet_diagnostic.MA0106.severity = error
# MA0110 - Use the Regex source generator
dotnet_diagnostic.MA0110.severity = error
#MA0053 - Sealed Class
dotnet_diagnostic.MA0053.severity = error
MA0053.public_class_should_be_sealed = true
MA0053.class_with_virtual_member_should_be_sealed = true
MA0053.exceptions_should_be_sealed = true
#MA0067 - Use Guid.Empty
dotnet_diagnostic.MA0067.severity = error
# MA0102 - Make member readonly
dotnet_diagnostic.MA0102.severity = error
# MA0111 - Use string.Create instead of FormattableString
dotnet_diagnostic.MA0111.severity = error
# MA0152 - Use Unwrap instead of using await twice
dotnet_diagnostic.MA0152.severity = error
# MA0048 - File name must match type name
dotnet_diagnostic.MA0048.severity = suggestion
# MA0053 - Make class sealed
dotnet_diagnostic.MA0053.severity = none
dotnet_diagnostic.RCS1214.severity = error
# Code Metric
dotnet_diagnostic.CA1501.severity = error
dotnet_diagnostic.CA1502.severity = error
dotnet_diagnostic.CA1505.severity = error
#dotnet_diagnostic.CA1506.severity = error
dotnet_diagnostic.CA1507.severity = error
#CA1508: Avoid dead conditional code
dotnet_diagnostic.CA1508.severity = error
#CA1514: Avoid redundant length argument
dotnet_diagnostic.CA1514.severity = error
#CA1509: Override equals and operator equals on value types
dotnet_diagnostic.CA1815.severity = none
#CA1027: Mark enums with FlagsAttribute
dotnet_diagnostic.CA1027.severity = none
#CA1716: Identifiers should not match keywords
dotnet_diagnostic.CA1716.severity = none
# S6602: Find" method should be used instead of the "FirstOrDefault" extension method.
dotnet_diagnostic.S6602.severity = none
# S3925: Update this implementation of 'ISerializable' to conform to the recommended serialization pattern
dotnet_diagnostic.S3925.severity = none
# CS1591: Missing XML comment for publicly visible type or member
dotnet_diagnostic.CS1591.severity = none
# VSTHRD111: Add .ConfigureAwait(bool) to your await expression
dotnet_diagnostic.VSTHRD111.severity = none