SonarCloud not scanning all the code / lines

Please see image above, basically for whatever reason those few highlighted folders don’t show as having any code scanner or counted toward the code count. They all have files that should be scanned. All the settings are out of the box default, scanned via Azure DevOps pipeline on any commit / PR. We put in an exception for a packages folder, but this issue existed before that exception also.

I suggest you check how the scanner is classifying those projects (see this wiki page).

If the projects are being classified correctly, please share the verbose logs for the end step.

To get this in Azure DevOps you should add the sonar.verbose to the Prepare step e.g.:

- task: SonarCloudPrepare@1

      extraProperties: |

Not finding a specific “end” step, I put in the verbose logging, just need a hint which part of logs you are looking for now.


SonarCloudAnalyze – but did you already check to see if the projects are being classified correctly?

I was checking the logs for any references of
“generated metadata as test”
“indexed as test”

and nothing came up, only things like this came up which looked normal. ClientApp/.eslintrc.js’ generated metadata with charset ‘UTF-8’

I saw some of these warnings in the logs, if I already have scanner setup to run as standalone scanner, with manual inputs, how can I make sure the JS stuff I setup to scan can be scanned along with the .net stuff?

WARN: Your project contains VB.NET 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
WARN: Incremental PR analysis: Could not determine common base path, cache will not be computed. Consider setting ‘sonar.projectBaseDir’ property.

Ah, well that would be the real problem. You will need to configure your pipeline to use the .NET Scanner (see the docs on Analyzing a .NET Solution with the Azure DevOps tasks).

And, to make sure the other stuff (JS) is included, refer to the Scanner for .NET docs on Analyzing languages other than C# and VB!