Hi. We are using sonarqube server Enterprise Edition Version 8.9.6 (build 50800). And for .NET projects scan we are using dotnet-socarscanner of latest version 5.4.1
dotnet tool update --global dotnet-sonarscanner
Tool 'dotnet-sonarscanner' was reinstalled with the latest stable version (version '5.4.1').
The problem is we are getting C#10 feature bugs and code smells, like “Move ‘Test’ into a named namespace.” for file scope C#10 namespaces.
What could be a problem here?
Does scanner 5.4.1 support C#10 features?
Does server 8.9.6 supports the scanner report?
To my knowledge, only SonarQube 9.2 and above supports C# 10. It was explicitly added in the 9.2 release notes under the Language Updates section - SonarQube 9.2 - CloudFormation & Terraform; Python Lambda analysis | SonarQube
I will allow somebody more official than me to confirm but I don’t believe C# 10 is supported by SonarQube 8.9.
@KrylixZA is right. We only started adding C#10 support after the LTS. And new language features aren’t backported; only bug fixes. So if you really need this, you’ll want to upgrade.