Billing / Lines of Code cached?

Using Bitbucket Cloud + Pipelines.

We had gone over the 100k lines limit of the €10 plan so we deleted one of the projects from SonarCloud.

The UI now shows we have about 20k lines spare capacity

but when we run an analysis, the output fails with
"errorMessage": "This analysis will make your organization '<orgname>' to reach the maximum allowed lines limit (having 101299 lines). \nPlease contact the administrator of the organization to resolve this issue.", "status": "FAILED", "branch": "main", "branchType": "LONG",
and then the quality gate fails because it can’t fetch the result.

The analysis is on the main branch and adds about 40 lines. Is there something being cached?

I’ve tried deleting the project we are analysing and re-importing it, but the re-import fails due to the same error

Now the billing screen has even fewer lines on it: 49,193

The project size was 35k lines before. No config has changed. sonar-project.properties is limiting sonar.src to /src folder. Error message now says having 101500 lines.

It’s like something the analysis uses to check line count hasn’t reset once the projects have been deleted. It’d be helpful if the sonar output in the Bitbucket Pipe said how many lines it is analysing; it only says file count as far as I can see.

Hello @David_Harper ,

The amount of lines of code used for billing is taken from the largest branch in your project on SonarCloud, but that should not be the problem here since you already recreated the project.

What languages does your project consist of?

As a quick solution to get started again, you could check for large XML/SQL files within your project and exclude them from the analysis.

Thanks @Martin_Bednorz .

Let me have a go. I think it is confusing me why Pull Request branches are building, but main isn’t but maybe even after deleting 19k lines from another project it has still blown through the limit when re-analysing.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.