Clarification on error message about maximum allowed lines limit


Upon adding a quite large project to our organization, we got the following error message:

This analysis will make your organization '<snip>' to reach the maximum allowed lines limit (having 2127581 lines).

It is unclear to me if the number of lines mentionned (2127581) is the number of lines in this added project, or the number of lines that the organization as a whole would reach if the analysis would be integrated.
Side note: it could be a good idea to include more numbers in the message to make it clearer, like

This analysis (having xxx lines) will make your organization '<snip>' to reach the maximum allowed lines limit (yyy lines, for zzz allowed).

As the project is mixing a lot of technologies, and uses embedded copies of libraries code, it is quite hard for us to figure out is we should tune analysis exclusions for the project, or if this is actually a consistent number of lines for the project.

I think the code producing this error is not open source, or I missed it, so I am unable to check this by myself.

The analysis id is AYBqiYrMux-I6QpYqzEd if needed.

Thanks for your help on the matter.

Hey @Greybird

I agree it’s not super clear. What it wants to say is that after the analysis is finished, your organization would have 2127581 lines total, which is over the limit.

We actually made a change in SonarQube ([SONAR-13798] Show NCLOC of the analysis when it's over the license's limit - SonarSource) to help users debug this. And, the changes didn’t make their way to SonarCloud. I think it would be helpful and I’ll make the case internally if you think it would have been helpful in this scenario.

In the meantime, you might find that setting DEBUG level-logs in your analysis will help you figure out what files are being indexed (and what needs excluded). This can be done by appending -X to the sonar-scanner command, (or mvn sonar:sonar), or otherwise setting sonar.verbose=true as an analysis parameter.

Thanks a lot for the quick answer and the info about how to help diagnose the analsis

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