Maximum allowed lines limit reached, but total LoC for all repos is at 50%


We are using Azure DevOps and we’re publishing the code analysis results to SonarCloud for 9 repositories that we have. These repositories all contain .NET Core / Standard, except for one which also has TypeScript next to .NET

We have a paid plan (100k LoC), and since a few days ago we started getting this error
##[error][SQ] Task failed with status FAILED, Error message: This analysis will make your organization ‘’ to reach the maximum allowed lines limit.

I saw on this forum some suggestions to switch to integration with MSBuild, but we already do that.

. We also don’t have any private projects that are being analysed.

I don’t expect to see this error, because if I sum up all the lines of code I see in the Projects section of SonarCloud, it adds up to around 50k LoC, so we’re well below our 100k LoC limit.

Can you please help out diagnosing why this is happening?


Is there anyone from SonarCloud to assist here?
What’s the actual way to reach SonarCloud support? I also sent an email but heard nothing from them…

Hi Matija,

Do you have any additional branches per project under analysis? For licensing purposes I believe it’s the largest branch in each project that’s counted. (There are people who only analyze branches, never master.)


Nope, only one branch (master).

Hi Matija, have you checked the detail of counted lines of code on the Billing page? You need to click on the following link:

Also, when you say that you started getting the error, I guess this happens only on 1 project, not on every private project. Can you confirm?


I just checked and we have 51,209 private lines of code analyzed over 9 projects.
And oddly enough, I enabled the analysis and now it works.

I have no idea what changed, I didn’t change anything in the configuration, if the problem reoccurs I’ll come back to this thread. At least now I know where to check the total number of LoC, thanks Fabrice!

1 Like