Sonar - 983,206 lines currently analyzed (License Manager)

Versions used (SonarQube, Scanner, Plugin, and any relevant extension)
SonarQube Scanner
Java 1.8.0_275 Private Build (64-bit)

Sonarqube (Developer Edition) deployed in Kubernetes cluster, we have two instances one for Prod and another for DEV.

Prod - One Million lines of code limit.

On Dec-01-2020 (Not exactly) we noticed that sonar scanner analyzed 983,206 lines of code but there are 37 projects in total and When I sum up all projects lines of code - A total: 207,237 lines of code was actually analyzed but under license manager it shows us 983,206 and also we are not able to scan anything more than 120K lines of code (that’s because we are hitting limit).


Question - Which project it is scanned or analyzed?

Please help us to troubleshoot which project it is consumed all the lines of code? We wanted to scan a priority project at the earliest because of the limit we couldn’t process further.


Hi Ram.
What counts towards the license’s limit is the larges branch (in number of lines of code) of each project.
When summing up all the projects, are you using the largest branches of each project?

Hi @dmeneses

Thank you for your response :slight_smile:

Can you define the largest branch?

I am assuming either “master” or the branch which has the latest or greatest changes, in that case, yes it is from the largest branch.

However, when it is analyzed thousands of lines, it should appear under “Projects --> Code” (This is from the online example: In my case I have counted from the code it is being analyzed and as I mentioned earlier it is around 200K plus.

Or Sonar doesn’t show up all those lines?


By ‘largest branch’ I mean the branch that has the highest number of lines of source code. It could happen that a branch other than the ‘main branch’ (that appears by default in the project’s dashboard) contains more lines of code than the main branch.

@dmeneses, If it scanned or analyzed my assumption that it will show on Sonar Projects Dashboard if this is true then I couldn’t find and that should be a bug and want to reuse the 700K plus lines. Please help me with this.

Did you check the other branches of each project?


I have deleted the suspicious project (example) after that I am able to see all my unknown 700K plus lines of code (Under LicenseManager).

When I open the project (Sonar UI) the project didn’t scanned anything (It shows as below) but was utilizing all my lines of code.

Ok, thanks for the update. I’m glad you found the cause of the problem.
Looks like that project ‘example’ was corrupted in the DB.