Difference in number of projects in Billing Vs Projects

Template for a good new topic, formatted with Markdown:

  • ALM used ( Bitbucket Cloud)
  • CI system used (Bitbucket Cloud)
  • Languages of the repository : Node/Typescript

Please contact the administrator of the organization to resolve this issue.```

We are facing the above error on one of our projects in sonar cloud, and while trying to debug what was causing it we saw a discrepancy in the number of projects being shown in Billing. In the " Distribution of private lines per project" popup, it shows 57 projects whereas we have a total of 67 projects in the organization. Is there a qualifying criteria for projects showing up in Billing? Does it matter if the analysis was being run on the dev branch which is not the main branch for the repository?

Also the popup disappeared once the loc limit was near to getting met.

Hello @Ayesha_Noor

You can see how we count total lines of code in our documentation here: https://docs.sonarsource.com/sonarcloud/administering-sonarcloud/managing-subscription/subscription-plans/#loc-based-pricing

“It shows 57 projects instead of 67” => Could it be that your organization has 10 public projects? We don’t take into account public projects when calculating your lines of code used.

“Does it matter if the analysis was being run on the dev branch, which is not the main branch for the repository?” => SonarCloud counts the lines of code found on the largest long-lived branch of the project. So if your dev branch is bigger than your main branch and is a long-lived branch, Sonar will count dev for LOC. Otherwise, dev doesn’t count, and main does.

Hope this answers your questions.

Best