sonar-dotnet icon indicating copy to clipboard operation
sonar-dotnet copied to clipboard

Code analyzer for C# and VB.NET projects

Results 507 sonar-dotnet issues
Sort by recently updated
recently updated
newest added

`ThrowsOrReturnsNull ` iterates the whole tree couple of times - there might be a way to optimize it. Additionally as mentioned in a comment int the method "For simplicity this...

Type: Cleanup

### Description In case a tracked property is set to a safe value in a global statement after the object initialization, the tracker will fail to track it. ### Repro...

Type: False Positive
Area: C#

### Description S4057 does not raise and issue in case it is part of an AnonymousObjectMemberDeclarator. ### Repro steps ``` var a = new { MyTable1 = new DataTable {...

Type: False Negative
Area: C#

Originally proposed by community https://community.sonarsource.com/t/67647/2 ### Background The extension methods defined in LoggerExtensions have overloads that expect combinations of `Exception`, `EventId` (and `LogLevel`) as their first parameters and `string message`...

Type: New Feature
Area: VB.NET
Area: C#

### Description Rule S2187, is raising a false positive when Test methods are declared in nested types ### Repro steps ``` [TestFixture] public class A // Noncompliant, FP - In...

Type: False Positive
Area: C#

### Description The error message for S3353 is insufficient. ### Repro steps In a project with C# 9 or below, add this code ```CS public class Test { public void...

Type: Improvement
Area: C#

### Description Null pointers should not be dereferenced FP ![image](https://user-images.githubusercontent.com/38876598/66739877-02abb280-ee72-11e9-91cf-932668eff9ae.png) `IsStringLiteral` does a null-check inside and returns false if null This would need cross-procedural analysis to make it work. ###...

False Positive

Rule S4057 is [querying ](https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/src/SonarAnalyzer.CSharp/Rules/SetLocaleForDataTypes.cs#L68) the semantic model for every object creation node, while the rule is interested only in two specific types of objects. Maybe it's better to do...

Type: Improvement
Type: Performance