diff --git a/analyzers/rspec/cs/S106.html b/analyzers/rspec/cs/S106.html index bab708117ef..aaab0122b39 100644 --- a/analyzers/rspec/cs/S106.html +++ b/analyzers/rspec/cs/S106.html @@ -49,5 +49,7 @@
Method | Runtime | Mean | -StdDev | -Ratio | +Standard Deviation | .NET 5.0 |
918.7 us |
10.72 us |
- 1.00 |
---|---|---|---|---|---|
SealedType |
.NET 5.0 |
231.2 us |
3.20 us |
- 0.25 |
|
UnsealedType |
.NET 6.0 |
867.9 us |
5.65 us |
- 1.00 |
|
SealedType |
.NET 6.0 |
218.4 us |
0.59 us |
- 0.25 |
|
UnsealedType |
.NET 7.0 |
1,074.5 us |
3.15 us |
- 1.00 |
|
SealedType |
.NET 7.0 |
216.1 us |
1.19 us |
- 0.20 |
The results were generated by running the following snippet with BenchmarkDotNet:
[Params(1_000_000)] diff --git a/analyzers/rspec/cs/S3329.html b/analyzers/rspec/cs/S3329.html index 6b47b578466..c7bd96d4ec3 100644 --- a/analyzers/rspec/cs/S3329.html +++ b/analyzers/rspec/cs/S3329.html @@ -88,11 +88,10 @@Standards
public MyException()
public MyException(string)
public MyException(string, Exception)
protected
or private MyException(SerializationInfo, StreamingContext)
That fourth constructor should be protected
in unsealed classes, and private
in sealed classes.
Not having this full set of constructors can make it difficult to handle exceptions.
--using System; - -namespace MyLibrary +The absence of these constructors can complicate exception handling and limit the information that can be provided when an exception is thrown.
+How to fix it
+Code examples
+Noncompliant code example
++public class MyException : Exception // Noncompliant: several constructors are missing { - public class MyException // Noncompliant: several constructors are missing - { public MyException() { } - } }-Compliant solution
--using System; -using System.Runtime.Serialization; - -namespace MyLibrary +Compliant solution
++public class MyException : Exception { - public class MyException : Exception - { - public MyException() - { - } - - public MyException(string message) - :base(message) - { - } + public MyException() + { + } - public MyException(string message, Exception innerException) - : base(message, innerException) - { - } + public MyException(string message) + : base(message) + { + } - protected MyException(SerializationInfo info, StreamingContext context) - : base(info, context) - { - } - } + public MyException(string message, Exception innerException) + : base(message, innerException) + { + } }+Resources
+Documentation
+
Alternatively IEqualityComparer<T>
provides a safer interface and is used by collections or Equals
could be made
virtual
.
This rule raises an issue when an unsealed, public
or protected
class implements IEquitable<T>
and the
+
This rule raises an issue when an unsealed, public
or protected
class implements IEquatable<T>
and the
Equals
is neither virtual
nor abstract
.
diff --git a/analyzers/rspec/cs/S4423.html b/analyzers/rspec/cs/S4423.html index 172154bf99c..73331b5249e 100644 --- a/analyzers/rspec/cs/S4423.html +++ b/analyzers/rspec/cs/S4423.html @@ -110,6 +110,10 @@Articles & blog posts
Standards
Method | Mean | -StdDev | -Median | +Standard Deviation | StartsWith_String |
30.965 ms |
3.2732 ms |
- 29.932 ms |
---|---|---|---|---|
StartsWith_Char |
7.568 ms |
0.3235 ms |
- 7.534 ms |
|
EndsWith_String |
30.421 ms |
5.1136 ms |
- 28.101 ms |
|
EndsWith_Char |
8.067 ms |
0.7092 ms |
- 7.935 ms |
The results were generated by running the following snippet with BenchmarkDotNet:
private List<string> data; diff --git a/analyzers/rspec/cs/S6612.html b/analyzers/rspec/cs/S6612.html index 8b8a7c40aae..9c6dc557e25 100644 --- a/analyzers/rspec/cs/S6612.html +++ b/analyzers/rspec/cs/S6612.html @@ -32,20 +32,18 @@Documentation
Benchmarks
Method | Runtime | -Median | -StdDev | -Ratio | +Mean | +Standard Deviation | Allocated |
---|---|---|---|---|---|---|---|
Capture |
.NET 7.0 |
- 68.81 ms |
- 4.432 ms |
- 1.00 |
+ 68.52 ms |
+ 4.450 ms |
88000063 B |
Lambda |
.NET 7.0 |
- 40.76 ms |
- 3.724 ms |
- 0.59 |
+ 39.29 ms |
+ 3.712 ms |
50 B |
Capture |
.NET Framework 4.6.2 |
- 75.92 ms |
- 5.239 ms |
- 1.00 |
+ 74.58 ms |
+ 5.199 ms |
88259787 B |
Lambda |
.NET Framework 4.6.2 |
- 41.82 ms |
- 2.730 ms |
- 0.55 |
+ 42.03 ms |
+ 2.752 ms |
- |
The results were generated by running the following snippet with BenchmarkDotNet:
private ConcurrentDictionary<int, string> dict; diff --git a/analyzers/rspec/cs/S6613.html b/analyzers/rspec/cs/S6613.html index 9813e3fcd3f..0344ead75c2 100644 --- a/analyzers/rspec/cs/S6613.html +++ b/analyzers/rspec/cs/S6613.html @@ -52,7 +52,7 @@Benchmarks
Method Runtime Mean -StdDev +Standard Deviation Allocated @@ -87,6 +87,12 @@Benchmarks
+Glossary
+
The results were generated by running the following snippet with BenchmarkDotNet:
private LinkedList<int> data; diff --git a/analyzers/rspec/cs/S6617.html b/analyzers/rspec/cs/S6617.html index 484a8d2998f..162a58ba50f 100644 --- a/analyzers/rspec/cs/S6617.html +++ b/analyzers/rspec/cs/S6617.html @@ -73,7 +73,7 @@Benchmarks
Method Runtime Mean -StdDev +Standard Deviation Allocated @@ -136,6 +136,12 @@Benchmarks
+Glossary
+
The results were generated by running the following snippet with BenchmarkDotNet:
[Params(10_000)] diff --git a/analyzers/rspec/cs/S6618.html b/analyzers/rspec/cs/S6618.html index f9579f16564..9fecd55251e 100644 --- a/analyzers/rspec/cs/S6618.html +++ b/analyzers/rspec/cs/S6618.html @@ -57,7 +57,7 @@Benchmarks
Method Runtime Mean -StdDev +Standard Deviation Allocated @@ -78,6 +78,13 @@Benchmarks
+Glossary
+
The results were generated by running the following snippet with BenchmarkDotNet:
int Value = 42; DateTime Now = DateTime.UtcNow; diff --git a/analyzers/rspec/vbnet/S3329.html b/analyzers/rspec/vbnet/S3329.html index 8b3c6f94fad..1448182e07e 100644 --- a/analyzers/rspec/vbnet/S3329.html +++ b/analyzers/rspec/vbnet/S3329.html @@ -86,11 +86,10 @@Standards
Method | Mean | -StdDev | -Median | +Standard Deviation | StartsWith_String |
30.965 ms |
3.2732 ms |
- 29.932 ms |
---|---|---|---|---|
StartsWith_Char |
7.568 ms |
0.3235 ms |
- 7.534 ms |
|
EndsWith_String |
30.421 ms |
5.1136 ms |
- 28.101 ms |
|
EndsWith_Char |
8.067 ms |
0.7092 ms |
- 7.935 ms |
The results were generated by running the following snippet with BenchmarkDotNet:
private List<string> data; diff --git a/analyzers/rspec/vbnet/S6612.html b/analyzers/rspec/vbnet/S6612.html index 5373e035a41..91c676fa1fb 100644 --- a/analyzers/rspec/vbnet/S6612.html +++ b/analyzers/rspec/vbnet/S6612.html @@ -38,20 +38,18 @@Documentation
Benchmarks
Method | Runtime | -Median | -StdDev | -Ratio | +Mean | +Standard Deviation | Allocated |
---|---|---|---|---|---|---|---|
Capture |
.NET 7.0 |
- 68.81 ms |
- 4.432 ms |
- 1.00 |
+ 68.52 ms |
+ 4.450 ms |
88000063 B |
Lambda |
.NET 7.0 |
- 40.76 ms |
- 3.724 ms |
- 0.59 |
+ 39.29 ms |
+ 3.712 ms |
50 B |
Capture |
.NET Framework 4.6.2 |
- 75.92 ms |
- 5.239 ms |
- 1.00 |
+ 74.58 ms |
+ 5.199 ms |
88259787 B |
Lambda |
.NET Framework 4.6.2 |
- 41.82 ms |
- 2.730 ms |
- 0.55 |
+ 42.03 ms |
+ 2.752 ms |
- |
The results were generated by running the following snippet with BenchmarkDotNet:
private ConcurrentDictionary<int, string> dict; diff --git a/analyzers/rspec/vbnet/S6613.html b/analyzers/rspec/vbnet/S6613.html index b0131cdc670..031f27fbaa7 100644 --- a/analyzers/rspec/vbnet/S6613.html +++ b/analyzers/rspec/vbnet/S6613.html @@ -56,7 +56,7 @@Benchmarks
Method Runtime Mean -StdDev +Standard Deviation Allocated @@ -91,6 +91,12 @@Benchmarks
+Glossary
+
The results were generated by running the following snippet with BenchmarkDotNet:
private LinkedList<int> data; diff --git a/analyzers/rspec/vbnet/S6617.html b/analyzers/rspec/vbnet/S6617.html index 04363ade790..044fef7b610 100644 --- a/analyzers/rspec/vbnet/S6617.html +++ b/analyzers/rspec/vbnet/S6617.html @@ -77,7 +77,7 @@Benchmarks
Method Runtime Mean -StdDev +Standard Deviation Allocated @@ -140,6 +140,12 @@Benchmarks
+Glossary
+
The results were generated by running the following snippet with BenchmarkDotNet:
[Params(10_000)] diff --git a/analyzers/src/SonarAnalyzer.CSharp/sonarpedia.json b/analyzers/src/SonarAnalyzer.CSharp/sonarpedia.json index 9a28355c6a3..0faf6748ced 100644 --- a/analyzers/src/SonarAnalyzer.CSharp/sonarpedia.json +++ b/analyzers/src/SonarAnalyzer.CSharp/sonarpedia.json @@ -3,7 +3,7 @@ "languages": [ "CSH" ], - "latest-update": "2024-01-17T08:18:50.786965700Z", + "latest-update": "2024-01-25T18:02:43.494170100Z", "options": { "no-language-in-filenames": true } diff --git a/analyzers/src/SonarAnalyzer.VisualBasic/sonarpedia.json b/analyzers/src/SonarAnalyzer.VisualBasic/sonarpedia.json index b2aec4a7d4b..bf9244d12eb 100644 --- a/analyzers/src/SonarAnalyzer.VisualBasic/sonarpedia.json +++ b/analyzers/src/SonarAnalyzer.VisualBasic/sonarpedia.json @@ -3,7 +3,7 @@ "languages": [ "VBNET" ], - "latest-update": "2024-01-17T08:21:02.541530700Z", + "latest-update": "2024-01-25T17:07:24.211428900Z", "options": { "no-language-in-filenames": true }