C#
C# analysis is available in all editions of SonarQube.
Last updated
Was this helpful?
C# analysis is available in all editions of SonarQube.
Discover and update the C#-specific Analysis parameters in: Administration > Configuration > General Settings > Languages > C#.
To analyze tool-generated code (e.g. WCF code generated by SvcUtil.exe, protobuf code generated by protoc, Swagger client code generated by NSwag) for a specific C# project, enable the "Analyze generated code" setting inside Project settings > General Settings > Languages > C#. By default, tool-generated code files are skipped from the analysis.
The detection of generated code is based on file name, special comments and attributes. The currently recognized values are in GeneratedCodeRecognizer.cs.
To analyze C# code, you need to use the Introduction version 4.x or newer.
Files to be excluded should be set in the project configuration. Excluded files are still going to be analyzed during the compilation and the results will be filtered according to the exclusion settings.
As an alternative, an .editorconfig file can be used to disable the analysis for a specific rule on a file or directory. This can solve performance problems on large files.
[Path/File.cs]
dotnet_diagnostic.Sxxx.severity = noneExternal analyzer reports (NUnit, MSTest, xUnit)
External analyzer reports (See "Notes on external .NET issues")
.NET test coverage (Visual Studio Code Coverage, dotCover, OpenCover, Coverlet, Altcover, VSTest)
Last updated
Was this helpful?
Was this helpful?

