sonar-dotnet
sonar-dotnet copied to clipboard
Code analyzer for C# and VB.NET projects
See: [RSPEC-2289](https://jira.sonarsource.com/browse/RSPEC-2289), and #365 ---------------- # Description The Obsolete attribute can be applied with or without arguments, but marking something Obsolete without including advice as to why it's obsolete or...
### Description [S2930](https://rules.sonarsource.com/csharp/RSPEC-2930) doesn't recognize Dispose() and DisposeAsync() calls made in DisposeAsync() method, resulting in false-positives:  Issue is similar to #3324 ### Repro steps Analyze following code: ```csharp namespace...
### Description Rule S3220 raises an issue even though the method that is overloaded is not accessible at the invocation. The issue was reported by community: https://community.sonarsource.com/t/false-positive-s3220-method-calls-should-not-resolve-ambiguously-to-overloads-with-params-checks-private-constructors/58681 ### Repro steps...
S4057 is processing all the object creations in a source file. For each object creation, the rule is [querying ](https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/src/SonarAnalyzer.CSharp/Rules/SetLocaleForDataTypes.cs#L67) the semantic model. Based on the fact that the rule...
See: [community.sonarsource.com](https://community.sonarsource.com/t/regex-evaluation-should-have-a-time-out-specified/40971), And RSPEC PR: https://github.com/SonarSource/rspec/pull/1188 # Description When using `System.Text.RegularExpressions` to process untrusted input, [pass a timeout](https://docs.microsoft.com/en-us/dotnet/standard/base-types/best-practices). A malicious user can provide input to RegularExpressions causing a [Denial-of-Service attack](https://www.us-cert.gov/ncas/tips/ST04-015)....
Moved logic to a base class, and added VB.NET tests.
### Description When writing a method that uses `yield return` to (intentionally) yield an infinite-length sequence, SonarSource reported this warning: ``` S2190: Add a way to break out of this...
OpenCover (https://github.com/OpenCover/opencover) has been archived. We should use `coverlet` instead (this is what we use in other repos). Related work in this repo or others: - https://github.com/SonarSource/sonar-dotnet/pull/5602 - https://github.com/SonarSource/sonar-dotnet/pull/5658 -...
This snippet ``` public class SomeException : Exception { } ``` produces >S3925 Update this implementation of 'ISerializable' to conform to the recommended serialization pattern. There are 9 different things...