@@ -89,6 +89,19 @@ dotnet_diagnostic.S1481.severity = none
89
89
# This is a duplicate of IDE0059.
90
90
dotnet_diagnostic.S1854.severity = none
91
91
92
+ # S1944: Invalid casts should be avoided
93
+ # https://rules.sonarsource.com/csharp/RSPEC-1944/
94
+ #
95
+ # Disabled due to build performance impact.
96
+ dotnet_diagnostic.S1944.severity = none
97
+
98
+ # S2053: Hashes should include an unpredictable salt
99
+ # https://rules.sonarsource.com/csharp/RSPEC-2053/
100
+ #
101
+ # Disabled due to build performance impact /
102
+ # We need to specify the salt.
103
+ dotnet_diagnostic.S2053.severity = none
104
+
92
105
# S2259: Null pointers should not be dereferenced
93
106
# https://rules.sonarsource.com/csharp/RSPEC-2259
94
107
#
@@ -116,8 +129,9 @@ dotnet_diagnostic.S2551.severity = none
116
129
# S2583: Conditionally executed code should be reachable
117
130
# https://rules.sonarsource.com/csharp/RSPEC-2583
118
131
#
132
+ # Disabled due to build performance impact /
119
133
# This rule produces false errors in, for example, for loops.
120
- # dotnet_diagnostic.S2583.severity = none
134
+ dotnet_diagnostic.S2583.severity = none
121
135
122
136
# S2699: Tests should include assertions
123
137
# https://rules.sonarsource.com/csharp/RSPEC-2699
@@ -131,6 +145,12 @@ dotnet_diagnostic.S2551.severity = none
131
145
# }
132
146
dotnet_diagnostic.S2699.severity = none
133
147
148
+ # S2930: "IDisposables" should be disposed
149
+ # https://rules.sonarsource.com/csharp/RSPEC-2930/
150
+ #
151
+ # Duplicate of CA2000.
152
+ dotnet_diagnostic.S2930.severity = none
153
+
134
154
# S2933: Fields that are only assigned in the constructor should be "readonly"
135
155
# https://rules.sonarsource.com/csharp/RSPEC-2933
136
156
#
@@ -155,6 +175,10 @@ dotnet_diagnostic.S3218.severity = none
155
175
# LINQ is the root of all evil :p
156
176
dotnet_diagnostic.S3267.severity = none
157
177
178
+ # S3329: Cipher Block Chaining IVs should be unpredictable
179
+ # https://rules.sonarsource.com/csharp/RSPEC-3329/
180
+ dotnet_diagnostic.S3329.severity = none
181
+
158
182
# S3376: Attribute, EventArgs, and Exception type names should end with the type being extended
159
183
# https://rules.sonarsource.com/csharp/RSPEC-3376
160
184
#
@@ -174,12 +198,36 @@ dotnet_diagnostic.S3442.severity = none
174
198
# This is a duplicate of MA0087.
175
199
dotnet_diagnostic.S3450.severity = none
176
200
201
+ # S3459: Unassigned members should be removed
202
+ # https://rules.sonarsource.com/csharp/RSPEC-3459/
203
+ #
204
+ # Duplicate of IDE0051/IDE0052
205
+ dotnet_diagnostic.S3459.severity = none
206
+
207
+ # S3626: Jump statements should not be redundant
208
+ # https://rules.sonarsource.com/csharp/RSPEC-3626/
209
+ #
210
+ # Disabled due to build performance impact.
211
+ dotnet_diagnostic.S3626.severity = none
212
+
213
+ # S3655: Empty nullable value should not be accessed
214
+ # https://rules.sonarsource.com/csharp/RSPEC-3655/
215
+ #
216
+ # Disabled due to build performance impact.
217
+ dotnet_diagnostic.S3655.severity = none
218
+
177
219
# S3871: Exception types should be "public"
178
220
# https://rules.sonarsource.com/csharp/RSPEC-3871
179
221
#
180
222
# This is a duplicate of CA1064.
181
223
dotnet_diagnostic.S3871.severity = none
182
224
225
+ # S3900: Arguments of public methods should be validated against null
226
+ # https://rules.sonarsource.com/csharp/RSPEC-3900/
227
+ #
228
+ # This is a duplicate of CA1062.
229
+ dotnet_diagnostic.S3900.severity = none
230
+
183
231
# S3903: Types should be defined in named namespaces
184
232
# https://rules.sonarsource.com/csharp/RSPEC-3903
185
233
#
@@ -198,6 +246,12 @@ dotnet_diagnostic.S3925.severity = none
198
246
# This is a duplicate of MA0015.
199
247
dotnet_diagnostic.S3928.severity = none
200
248
249
+ # S3949: Calculations should not overflow
250
+ # https://rules.sonarsource.com/csharp/RSPEC-3949/
251
+ #
252
+ # Disabled due to build performance impact.
253
+ dotnet_diagnostic.S3949.severity = none
254
+
201
255
# S3998: Threads should not lock on objects with weak identity
202
256
# https://rules.sonarsource.com/csharp/RSPEC-3998
203
257
#
@@ -210,6 +264,16 @@ dotnet_diagnostic.S3998.severity = none
210
264
# This is a duplicate of MA0062.
211
265
dotnet_diagnostic.S4070.severity = none
212
266
267
+ # S4158: Empty collections should not be accessed or iterated
268
+ # https://rules.sonarsource.com/csharp/RSPEC-4158/
269
+ #
270
+ # Disabled due to build performance impact.
271
+ dotnet_diagnostic.S4158.severity = none
272
+
273
+ # S4423: Weak SSL/TLS protocols should not be used
274
+ # https://rules.sonarsource.com/csharp/RSPEC-4423/
275
+ dotnet_diagnostic.S4423.severity = none
276
+
213
277
# S4456: Parameter validation in yielding methods should be wrapped
214
278
# https://rules.sonarsource.com/csharp/RSPEC-4456
215
279
#
@@ -228,6 +292,26 @@ dotnet_diagnostic.S4487.severity = none
228
292
# This is a partial duplicate of MA0067, and we do not want to report the use of 'default' for a Guid as error.
229
293
dotnet_diagnostic.S4581.severity = none
230
294
295
+ # S4830: Server certificates should be verified during SSL/TLS connections
296
+ # https://rules.sonarsource.com/csharp/RSPEC-4830/
297
+ dotnet_diagnostic.S4830.severity = none
298
+
299
+ # S5542: Encryption algorithms should be used with secure mode and padding scheme
300
+ # https://rules.sonarsource.com/csharp/RSPEC-5542/
301
+ dotnet_diagnostic.S5542.severity = none
302
+
303
+ # S5547: Cipher algorithms should be robust
304
+ # https://rules.sonarsource.com/csharp/RSPEC-5547/
305
+ dotnet_diagnostic.S5547.severity = none
306
+
307
+ # S5659: JWT should be signed and verified with strong cipher algorithms
308
+ # https://rules.sonarsource.com/csharp/RSPEC-5659/
309
+ dotnet_diagnostic.S5659.severity = none
310
+
311
+ # S5773: Types allowed to be deserialized should be restricted
312
+ # https://rules.sonarsource.com/csharp/RSPEC-5773/
313
+ dotnet_diagnostic.S4581.severity = none
314
+
231
315
# ### StyleCop rules ####
232
316
233
317
# SA1003: Symbols must be spaced correctly
@@ -262,6 +346,12 @@ dotnet_diagnostic.SA1101.severity = none
262
346
# callsForType.Count);
263
347
dotnet_diagnostic.SA1116.severity = none
264
348
349
+ # SA1121: Use built-in type alias
350
+ # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1121.md
351
+ #
352
+ # Duplicate of IDE0049.
353
+ dotnet_diagnostic.SA1121.severity = none
354
+
265
355
# SA1200: Using directives must be placed correctly
266
356
#
267
357
# This is already verified by the .NET compiler platform analyzers (csharp_using_directive_placement option and IDE0065 rule).
@@ -293,6 +383,11 @@ dotnet_diagnostic.SA1413.severity = none
293
383
# This is a duplicate of IDE0011.
294
384
dotnet_diagnostic.SA1503.severity = none
295
385
386
+ # SA1512: Single-line comments should not be followed by a blank line
387
+ #
388
+ # Blank lines can improve readability.
389
+ dotnet_diagnostic.SA1512.severity = none
390
+
296
391
# SA1516: Elements must be separated by blank line
297
392
#
298
393
# When enabled, a diagnostic is produced for properties with both a get and set accessor.
@@ -551,9 +646,7 @@ dotnet_diagnostic.CA1510.severity = none
551
646
#
552
647
# This is a duplicate of S927, but contains at least one bug:
553
648
# https://github.com/dotnet/roslyn-analyzers/issues/6461
554
- #
555
- # Since we do not enable any of the Sonar rules by default, we'll leave CA1725 enabled.
556
- dotnet_diagnostic.CA1725.severity = error
649
+ dotnet_diagnostic.CA1725.severity = none
557
650
558
651
# CA1825: Avoid zero-length array allocations
559
652
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1825
@@ -594,12 +687,26 @@ dotnet_diagnostic.CA2208.severity = none
594
687
# We use ECB mode as the basis for other modes (e.g. CTR)
595
688
dotnet_diagnostic.CA5358.severity = none
596
689
690
+ # CA5389: Do not add archive item's path to the target file system path
691
+ # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5389
692
+ dotnet_diagnostic.CA5389.severity = none
693
+
694
+ # CA5390: Do not hard-code encryption key
695
+ # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5390
696
+ dotnet_diagnostic.CA5390.severity = none
697
+
597
698
# CA5401: Do not use CreateEncryptor with non-default IV
598
- # https://learn.microsoft.com/en-gb/dotnet/fundamentals/code-analysis/quality-rules/ca5401
599
- #
600
- # We need to specify the IV.
699
+ # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5401
601
700
dotnet_diagnostic.CA5401.severity = none
602
701
702
+ # CA5402: Use CreateEncryptor with the default IV
703
+ # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5402
704
+ dotnet_diagnostic.CA5402.severity = none
705
+
706
+ # CA5403: Do not hard-code certificate
707
+ # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5403
708
+ dotnet_diagnostic.CA5403.severity = none
709
+
603
710
# ### Roslyn IDE analyser rules ####
604
711
605
712
# IDE0028: Simplify collection initialization; and
0 commit comments