I have a line of code limit error, but lines in error less than lines in plan

Hello,

Our team uses SonarQube with Azure DevOps. We get the following error with SonarQube on our build:

##[error]Task failed with status FAILED, Error message: This analysis will make your organization ‘’ to reach the maximum allowed lines limit (having 2658887 lines).

This is usually pretty straightforward- the message suggests we went over our line limit. We’ve had this happen to us before. In this case, the problem is that our line limit should be 300k:

I’ve searched for this issue, but everything I found references an instance where the lines analyzed truly exceeds the limit. What can I do to resolve the issue? I’ve removed lines from analysis but so far I’m still getting the error.

Hi,

Welcome to the community!

You’re not over your line limit yet. The message is telling you that if that particular analysis were processed, you would be. So to keep from basically locking you out, the analysis report is discarded rather than being processed.

At a guess, something in the relevant project changed to

  • add libraries
  • add generated files
  • update configuration to analyze previously ignored files

so that suddenly analysis is finding a lot more lines than it should.

Unfortunately there aren’t a lot of tools to help you figure this out except to set sonar.verbose=true in your analysis parameters and check your analysis log for the files being indexed.

 
HTH,
Ann

Thanks, with verbose on I was able to find a folder that was being analyzed that was out of scope. I didn’t catch it earlier because I read the error message “having 2658887 lines” as having six figures (i.e. 265.8k lines) instead of seven figures (i.e. 2.6M lines).

I appreciate the response, thank you for your help.

1 Like