# Lines of code limit and branches

**URL:** <https://community.sonarsource.com/t/lines-of-code-limit-and-branches/23601>\
**Category:** SonarQube Server / Community Build\
**Created:** [April 23, 2020, 10:42pm UTC](https://community.sonarsource.com/t/lines-of-code-limit-and-branches/23601 "2020-04-23T22:42:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![armenak](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/armenak/32/12299_2.png) [@armenak](https://community.sonarsource.com/u/armenak)\
**Post date:** [April 23, 2020, 10:42pm UTC](https://community.sonarsource.com/t/lines-of-code-limit-and-branches/23601/1 "2020-04-23T22:42:19Z")

</div>

Must-share information (formatted with [Markdown](https://commonmark.org/help/)):

- 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

---

<div class="post-metadata">

**Author:** ![anon67236913](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@anon67236913](https://community.sonarsource.com/u/anon67236913)\
**Post date:** [April 24, 2020, 6:20am UTC](https://community.sonarsource.com/t/lines-of-code-limit-and-branches/23601/2 "2020-04-24T06:20:37Z")

</div>

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/](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.

---

<div class="post-metadata">

**Author:** ![armenak](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/armenak/32/12299_2.png) [@armenak](https://community.sonarsource.com/u/armenak)\
**Post date:** [April 24, 2020, 9:31pm UTC](https://community.sonarsource.com/t/lines-of-code-limit-and-branches/23601/3 "2020-04-24T21:31:04Z")

</div>

Thank you, Gilbert!
