Issues with xyz task put your organization over limit, but we're nowhere near the limits

We’ve been getting messages about one particular private project’s “main” (develop) branch having analysis issues for over 2 weeks. There are only about 1K new lines of code since the last success on August 9. We’re not near our payment limit at all. Can someone look into the issue?

Background task:        AZGP1A_qcUjvLIw7lXTk
Submission time:        2024-08-26T17:55:25+0000
Failure time:   2024-08-26T17:55:28+0000

Error message:  This analysis will make your organization XXXXXX to reach the maximum allowed lines limit (having 604253 lines). 

Note: Short-lived branches are scanning successfully, just not the long-lived branch.

There’s actually another example in our other organization too that started with this analysis on the 12th:

Background task:        AZFHVhX4YtkFBkV9ReX_
Submission time:        2024-08-12T16:05:09+0000
Failure time:   2024-08-12T16:05:14+0000

Hi,

Can you share a bit more about the projects in question? Specifically, what are the primary languages and how (which which scanners) do you analyze?

 
Ann

@ganncamp They seem to primarily be .NET projects being analyzed externally from SonarCloud (within CircleCI for us). One is a library, another is a service written in .NET.

Hi,

Thanks for that. It’s probably what I suspected (feared).

I’ll bet you recently upgraded your SonarScanner for .NET installs on your build agents. Amiright?

Version 8.0.* comes with multi-language analysis on by default. So you’re likely picking up a whole lot of files or large files that you weren’t before. You can turn it off by adding /d:sonar.scanner.scanAll=false to the begin step.

 
HTH,
Ann

@ganncamp Yes, I just started digging and saw the warning about that. Yes we’re using v8.0.1 of the scanner and multi-language analysis is on. I can work with our DevSecOps team to get that turned off by default perhaps. Thanks for the info!

1 Like

I wonder if this is because it is scanning the /TestResults folder that has a bunch of .html and .xml files from automated testing + code-coverage analysis & including this in the LOC calculations @ganncamp ?

Would it be possible to simply tell the scanner to exclude this folder in some fashion (without losing code-coverage analysis)?

Hi,

I would think /TestResults would be excluded by default as an output…?

Yes, that should work. Keep in mind that:

SonarScanner for .NET can’t filter the excluded files/folders from the analysis, which happens during the build. The sonar.exclusions property is only used to filter issues sent to SonarCloud during the end step.

The exclusion will be applied where it count, license-wise: on the server. But you’ll still have to wait on the CI side for those files to be worked through.

 
HTH,
Ann