Lines of code limit and branches

Must-share information (formatted with Markdown):

  • SonarQube version 6.7.6 Enterprise Edition, 5 million lines of code
  • Trying to analyze the code

Recently, we purchased SonarQube EE with 5 million lines of code limit. During the negotiations with SonarQube representatives, we were told that we don’t need to worry about LOCs across our branches counting multiple times. Just the size of the largest branch found on the project. However, after the analysis of three different branches of the same code base, we started seeing “You have reached your lines of code limit. Please contact SonarSource to increase the threshold.” message.

I feel that we are doing something wrong. How to tell SonarQube that project A, B, and C are branches?

Thank you,
Armenak

When reading project A,B and C … i guess you don’t use the sonar.branch.name property !?
Using the same projectKey property with sonar.branch.name will create different branches for the same
Sonarqube project. Then the largest branch counts for the LOC.
see https://docs.sonarqube.org/latest/branches/overview/

Creating different projects for every branch was the old way before the branching feature was introduced.
Also, you should update to the latest LTS version = 7.9.3, because 6.7.6 is EOL already.

1 Like

Thank you, Gilbert!