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.
@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.
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.
@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!
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)?
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.