Scanner for MSBuild: analysis of non .Net files

Dear All,

I am trying to analyse .Net project with SonarScanner for MSBuild(4.3.1) with SonarQube 6.2(sonarC# plugin 5.5.1.522)

Source code has other types of files too like .sql, .js. etc. But SonarScanner for MSbuild is only analyzing the .cs files(c sharp code).

Is this normal behaviour of SonarScanner for MSBuild. How can I analyse all files in project ?

command I used:

SonarQube.Scanner.MSBuild.exe begin /k:SomeKey /n:SomeName
msbuild /t:Rebuild file.csproj
SonarQube.Scanner.MSBuild.exe end

Hi @Shreedhar_Dhanawade,

The scanner for msbuild only analyze files that are referenced by msbuild projects so yes this is the normal behavior. Currently, the only way is to add your files to some project (e.g. a csproj).

We have a separate ticket (here) to improve the scanner to allow analysis of loose files.

Cheers,
Amaury