LOC counted out of project file scanned

Hi,

we have a Sonar Developer Edition Version 10.2.1 (build 78527) - SonarScanner 5.0.1.3006 with a license of 1 milion of LOC.

We have 9 different C/C++ projects to process.
We started with the first 2 projects.

For a configuration mistake [1] while we was configuring sonar-project.properties file for processing the first project (“procDef.vcxproj”) following the instruction on your documentation (Narrowing the focus with an analysis scope) we set the sonar.projectBaseDir property to the root of all the projects but we forgot to set the sonar.sources property since we think that the scan have to be executed only on the files listed into the build-wrapper-dump.json file who was generated by the build-wrapper command executed previously.

The result is that sonar-scanner processed the project which contains less that 3k LOC but count 519K LOC including the file of other project and not contained into build-wrapper-dump.json.

With the second project we have configured correctly the properties into sonar-project.properties and it counts eand processed correctly 435K LOC.

This is a problem since all our projects counts in total about 950K LOC and now for the mistake at [1] we have a license almost finished. But the first scan has counted LOC in path that are not part of the scanned project.
image

Could you please help us to resolve this mistake?

Thank you for your support.
A.

Hey there.

You will just need to submit an analysis of the first project without the configuration error. The license utilization does not consider any analyses prior to the latest one (but make sure you’ve reanalyzed all branches, since the last analysis of the largest branch is the one counting).

1 Like

Hi Colin,

we’ve solved our problem simply rescanning the wrong project as you suggested us.
thanks for your support!

Best regards,
A.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.