I’m using SonarQube Community Edition (9.9.3.79811), I have project with C# sharp code along with .htm, .js, .css .I am using the CLI mode using sonarscanner for scanning the code.I am unable to scan all the C# project files along with .htm, .js, and .css files together. However, I can scan the C# project files and the .htm, .js, and .css files separately.
Could you please provide guidance on how to resolve this issue?
To analyze the C# code, you must use SonarScanner for .NET. If you use the latest version of the scanner, it will automatically pick up your HTML, CSS &etc. However, you may need to adjust the recognized suffixes for HTML, since it doesn’t look like .htm is one of them. You’ll find it under Languages at either the global or project admin levels.
Could you provide more info, how this can be done. I have the same issue. There is a project with multiple type of code files C#, JavaScript, TypeScript, HTML, CSS, etc,. I am using the CLI mode with SonarQube Community Edition(v25.4)
It is skipping the C# files stating:
INFO: Sensor C# [csharp] WARN: Your project contains C# files which cannot be analyzed with the scanner you are using. To analyze C# or VB.NET, you must use the SonarScanner for .NET 5.x or higher, see https://redirect.sonarsource.com/doc/install-configure-scanner-msbuild.html INFO: Sensor C# [csharp] (done) | time=0ms
I downloaded the .NET Core 3.1+ and tried analysing with it