Clarification on line counting against license


I am trying to understand the accumulation of the lines of code to better be able to determine how many lines I need on renewing my license. I currently have a developer’s license set for 250K LOC. I have four projects. Two have never been analyzed and show 0 lines of code. Tow have been analyzed and show 31K and 3.5K lines of code. I would think that this means I have analyzed 35K LOC and that the System tab would show that but it shows 61K instead.

  1. How is the total computed? I know it takes the largest branch from each project but, for example, will the total decrease if the size of the largest branch decreases?
  2. If I delete a project, does it adjust the total SLOC count downwards or does it stay the same? If I subsequently add a new project, does its SLOC get added to the previous (pre-deletion) total? Our SonarQube SME left and I am trying to learn how to use sonarqube but I am afraid my attempts to learn with demo projects may count against me when I try to run it against a real project.

Yes, if the size of your largest branch decreases, the total will decrease.

If you delete a project, the lines of code that project took up will be wiped away.

At any given time, the Lines of Code (with respect to your license) represents the total of the largest branch of each project on your instance. If a project disappears, poof, those lines go away.

If you’re suspicious about how Lines of Code are being counted on your instance, I would encourage you to check the global Administration > Projects > Management to make sure you’re seeing all projects, not just the ones you specifically have Browse access on.

And, it should be noted that your version of SonarQube is EOL. You should upgrade to a supported version ASAP.

Thanks for the explanation. It really helps. I will look into upgrading my version