sonar-dotnet
sonar-dotnet copied to clipboard
Code analyzer for C# and VB.NET projects
Improve CI performance. We do not use `netstandard2.0` builds and we do not ship them. So we don't need to wait for them to be build and analyzed.
Fixes #5981 In this PR: - Filescope namespace support was added to the shimlayer - Fixed the FN (no issues were raised when in filescoper namespace) - Fixed UT where...
### Description S3261 should raise an issue when a file scoped namespace is empty. ### Repro steps ```csharp namespace Tests.Diagnostics; // FN using System; using System.Diagnostics; ``` ### Related information...
### Description No issue is raised when property check is done through a pattern. ### Repro steps ```csharp using System; using System.Linq; var r = new R(); if (r is...
### Description S5443 does not raised an issue in case the publicly writable directory path is assembled with the help of a constant interpolated string. ### Repro steps ```csharp const...
### Description When the strings to be checked are in a file scoped namespace, no issues are raised. ### Repro steps ```csharp using System; using System.Data.SqlClient; using Linq = System.Linq;...
### Description No issue is raised when attribute is placed on a lambda ### Repro steps ```csharp public void Bar(IEnumerable collection) { _ = collection.Select([OnSerialized] (x) => x + 1);...
Fix CodeFix S3217: Using directives are not moved to the closest namespace when this is file scoped.
### Description S3261 code fix should move the imports to the closest namespace. This does not happen when the namespace is file scoped. ### Repro steps Before codefix ```csharp global...