Scanner only scan one directory

  • sonar-scanner-cli-4.4.0.2170-windows
  • sonarqube-Community-8.4.0.35506
  • poc for old code

Sonar-scanner.properties

  • sonar.sources=.
  • sonar.exclusions=src/VSdoc/

I also tried

  • sonar.exclusions=src/VSdoc/**/*

The only folder that are scanned is “VSdoc”

Hi,

Welcome to the community!

There’s not a lot to go on here.

Could you provide your code-formatted (``` on the line before and on the line after) analysis logs, as well as your project structure?

 
Ann

I found out, almost by accident, that the default sonarscanner does not scan C# code.
After using the msbuild version it works fine.
Though I´m not to happy with the lack of documentation. :roll_eyes:

Hi,

I’m glad you worked through this.

Regarding the docs, I guess you mean the Scanner CLI docs should have mentioned using the Scanner for MSBuild for C#?

 
Ann

Hi Ann
I searched quite a lot and found that others had the same challenges as I had. Yes, the scanner documentation found on https://docs.sonarqube.org/latest/analysis/scan/sonarscanner/ should clearly state that scanning C# can only be done with the Scanner for MsBuild.

Hi,

I understand what you’re saying. Would you mind sharing what you remember of your journey to get to the Scanner CLI docs?

Also, I guess this wasn’t sufficient?

Or maybe just not prominent enough?

 
Ann