Hello,
We have Teams plan for 100k LOC. We are facing an issue in SonarCloud regarding how Lines of Code (LOC) are being counted. Previously, when analysis was executed on short-lived branches, the LOC from those branches was not counted toward the organization’s LOC limit. However, recently we observed that LOC is being counted for every branch analysis, including short-lived branches. Because of this change, our organization is quickly reaching the LOC limit even though most of the analyses are from temporary development branches. This behavior is impacting our CI/CD workflow and preventing further analyses due to the LOC restriction. We would like clarification on why this change occurred and whether there is a way to prevent short-lived branch analyses from counting toward the total LOC.
So the issue is like below:
We are on the Teams plan for our organization opplaybook. We are experiencing an issue where analyzing a short-lived branch is being blocked by the LOC limit, which should not happen according to SonarCloud documentation.
Issue:
When running analysis on branch test-sonar (which is correctly classified as a short-lived branch in our project opplaybook_playbookweb-1), we get the following error:
“This analysis will make your organization ‘opplaybook’ to reach the maximum allowed lines limit (having 139196 lines). Please contact the administrator of the organization to resolve this issue.”
What we have done:
- Confirmed
test-sonaris listed under Short-lived branches in project branch settings - Set long-lived branch pattern to
^(main|master)$so onlymainandmasterare long-lived masterbranch has never been analyzed- Even creating a brand new project in the same org hits the same LOC limit error
Expected behavior:
Short-lived branches should not count toward the LOC limit as per SonarCloud documentation.
Questions:
- Why is a short-lived branch triggering the LOC limit?
- Is our org LOC quota being consumed incorrectly?
- How can we resolve this without upgrading our LOC limit?
Please advise.
Thanks