Running distinct scans on a single project and how this affects the LOC licensing


I hope someone could help me with the following question, thanks a lot upfront.

Environment: SonarQube Enterprise Edition Version 9.9 (build 65466) on-premises instance.

We have a large project repository (large in terms of lines of code, around 1.2 million LOC) that we scan using sonar-scanner-msbuild- in 3 distinct SonarQube projects:

  • Project SCA - as the name suggests, this project is just used for producing the Static Code Analysis results
  • Project Unit Tests - here we use code coverage tools to collect code coverage results when we run Unit tests only
  • Project Integration Tests - a separate project for collecting code coverage results for the Integration tests only

But as you can imagine, this effectively means that we scan the same code 3 times and this adds against our LOC license.

Is there a way to tune SonarQube so it doesn’t count the same lines of code x3, and thus help to not hit the upper limit of our existing LOC license?

Hi Marco

Welcome to the community! Before I try and answer can you share why you cannot just have a single project that has analysis results and coverage? Is it so that you can run parallel builds?



Hello Tom,

We don’t want to have all test results coverage data aggregated into a single project, rather we need them separated per type for better visibility/reporting. And yes, this setup allows us to run parallel builds too.

Best wishes