|
1 | 1 | [*.cs]
|
2 | 2 |
|
| 3 | +#### Sonar rules #### |
| 4 | + |
| 5 | +# S1264: A "while" loop should be used instead of a "for" loop |
| 6 | +# https://rules.sonarsource.com/csharp/RSPEC-1264 |
| 7 | +dotnet_diagnostic.S1264.severity = none |
| 8 | + |
| 9 | +# S1450: Private fields only used as local variables in methods should become local variables |
| 10 | +# https://rules.sonarsource.com/csharp/RSPEC-1450 |
| 11 | +# |
| 12 | +# TODO: Re-enable when the following issue is resolved: |
| 13 | +# https://github.com/SonarSource/sonar-dotnet/issues/8239 |
| 14 | +dotnet_diagnostic.S1450.severity = none |
| 15 | + |
| 16 | +# S2372: Exceptions should not be thrown from property getters |
| 17 | +# https://rules.sonarsource.com/csharp/RSPEC-2372/ |
| 18 | +dotnet_diagnostic.S2372.severity = none |
| 19 | + |
| 20 | +# S2583: Conditionally executed code should be reachable |
| 21 | +# https://rules.sonarsource.com/csharp/RSPEC-2583/ |
| 22 | +# |
| 23 | +# TODO: Re-enable when the following issue is resolved: |
| 24 | +# https://github.com/SonarSource/sonar-dotnet/issues/8264 |
| 25 | +dotnet_diagnostic.S2583.severity = none |
| 26 | + |
| 27 | +# S2589: Boolean expressions should not be gratuitous |
| 28 | +# https://rules.sonarsource.com/csharp/RSPEC-2589/ |
| 29 | +# |
| 30 | +# TODO: Re-enable when the following issue is resolved: |
| 31 | +# https://github.com/SonarSource/sonar-dotnet/issues/8262 |
| 32 | +dotnet_diagnostic.S2589.severity = none |
| 33 | + |
| 34 | +dotnet_diagnostic.S2372.severity = none |
| 35 | + |
3 | 36 | #### SYSLIB diagnostics ####
|
4 | 37 |
|
5 | 38 | # SYSLIB1045: Use 'GeneratedRegexAttribute' to generate the regular expression implementation at compile-time
|
6 | 39 | #
|
7 | 40 | # TODO: Remove this when https://github.com/sshnet/SSH.NET/issues/1131 is implemented.
|
8 | 41 | dotnet_diagnostic.SYSLIB1045.severity = none
|
9 | 42 |
|
10 |
| -### StyleCop Analyzers rules ### |
| 43 | +#### StyleCop Analyzers rules #### |
| 44 | + |
| 45 | +# SA1123: Do not place regions within elements |
| 46 | +# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1123.md |
| 47 | +dotnet_diagnostic.SA1123.severity = none |
| 48 | + |
| 49 | +# SA1124: Do not use regions |
| 50 | +# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1124.md |
| 51 | +dotnet_diagnostic.SA1124.severity = none |
11 | 52 |
|
12 | 53 | # SA1202: Elements must be ordered by access
|
13 | 54 | # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1202.md
|
14 | 55 | dotnet_diagnostic.SA1202.severity = none
|
15 | 56 |
|
| 57 | +# SA1204: Static elements must appear before instance elements |
| 58 | +# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1204.md |
| 59 | +dotnet_diagnostic.SA1204.severity = none |
| 60 | + |
| 61 | +# SA1310: Field names must not contain underscore |
| 62 | +# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1310.md |
| 63 | +#dotnet_diagnostic.SA1310.severity = none |
| 64 | + |
| 65 | +# SA1312: Variable names should begin with lower-case letter |
| 66 | +# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1312.md |
| 67 | +dotnet_diagnostic.SA1312.severity = none |
| 68 | + |
| 69 | +# SA1636: File header copyright text should match |
| 70 | +# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1636.md |
| 71 | +dotnet_diagnostic.SA1636.severity = none |
| 72 | + |
| 73 | +# SA1643: Destructor summary documentation must begin with standard text |
| 74 | +# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1643.md |
| 75 | +dotnet_diagnostic.SA1643.severity = none |
| 76 | + |
16 | 77 | #### Meziantou.Analyzer rules ####
|
17 | 78 |
|
| 79 | +# MA0001: StringComparison is missing |
| 80 | +# https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0001.md |
| 81 | +dotnet_diagnostic.MA0001.severity = none |
| 82 | + |
| 83 | +# MA0011: IFormatProvider is missing |
| 84 | +# https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0011.md |
| 85 | +# |
| 86 | +# TODO: Remove exclusion when issues are fixed |
| 87 | +dotnet_diagnostic.MA0011.severity = none |
| 88 | + |
| 89 | +# MA0015: Specify the parameter name in ArgumentException |
| 90 | +# https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0015.md |
| 91 | +# |
| 92 | +# TODO: Remove exclusion when issues are fixed |
| 93 | +dotnet_diagnostic.MA0015.severity = none |
| 94 | + |
| 95 | +# MA0050: Validate arguments correctly in iterator methods |
| 96 | +# https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0050.md |
| 97 | +# |
| 98 | +# TODO: Re-enable when https://github.com/meziantou/Meziantou.Analyzer/issues/617 is fixed |
| 99 | +dotnet_diagnostic.MA0050.severity = none |
| 100 | + |
18 | 101 | # MA0053: Make class sealed
|
19 | 102 | # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0053.md
|
20 | 103 | MA0053.public_class_should_be_sealed = false
|
21 | 104 |
|
| 105 | +# MA0055: Do not use finalizer |
| 106 | +# https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0055.md |
| 107 | +# |
| 108 | +# TODO: Remove exclusion when issues are fixed |
| 109 | +dotnet_diagnostic.MA0055.severity = none |
| 110 | + |
| 111 | +# MA0110: Use the Regex source generator |
| 112 | +# https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0110.md |
| 113 | +dotnet_diagnostic.MA0110.severity = none |
| 114 | + |
22 | 115 | #### .NET Compiler Platform analysers rules ####
|
23 | 116 |
|
24 | 117 | # CA1030: Use events where appropriate
|
25 | 118 | # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1030
|
26 |
| -dotnet_diagnostic.CA10310.severity = none |
| 119 | +dotnet_diagnostic.CA1030.severity = none |
27 | 120 |
|
28 | 121 | # CA1031: Do not catch general exception types
|
29 | 122 | # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1031
|
30 | 123 | dotnet_diagnostic.CA1031.severity = none
|
31 | 124 |
|
| 125 | +# CA1062: Validate arguments of public methods |
| 126 | +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1062 |
| 127 | +# |
| 128 | +# TODO: Remove exclusion when issues are fixed |
| 129 | +dotnet_diagnostic.CA1062.severity = none |
| 130 | + |
| 131 | +# CA1307: Specify StringComparison for clarity |
| 132 | +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1307 |
| 133 | +dotnet_diagnostic.CA1307.severity = none |
| 134 | + |
| 135 | +# CA1716: Identifiers should not match keywords |
| 136 | +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1716 |
| 137 | +dotnet_diagnostic.CA1716.severity = none |
| 138 | + |
| 139 | +# CA1822: Mark members as static |
| 140 | +# https://learn.microsoft.com/en-US/dotnet/fundamentals/code-analysis/quality-rules/ca1822 |
| 141 | +dotnet_code_quality.CA1822.api_surface = private,internal |
| 142 | + |
32 | 143 | # CA2213: Disposable fields should be disposed
|
33 | 144 | # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2213
|
34 | 145 | dotnet_diagnostic.CA2213.severity = none
|
35 | 146 |
|
| 147 | +# CA3075: Insecure DTD Processing |
| 148 | +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca3075 |
| 149 | +dotnet_diagnostic.CA3075.severity = none |
| 150 | + |
36 | 151 | # IDE0004: Types that own disposable fields should be disposable
|
37 | 152 | # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0004
|
38 | 153 | dotnet_diagnostic.IDE0004.severity = none
|
39 | 154 |
|
40 | 155 | # IDE0048: Add parentheses for clarity
|
41 | 156 | # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0047
|
42 | 157 | dotnet_diagnostic.IDE0048.severity = none
|
| 158 | + |
| 159 | +# IDE0305: Collection initialization can be simplified |
| 160 | +# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0305 |
| 161 | +dotnet_diagnostic.IDE0305.severity = none |
0 commit comments