We’re currently using Sonarqube Dev Edition. We know this question has been asked in the past but are looking to find a more up to date answer in case things have changed. We are looking to leverage SonarQube for enhanced test coverage analytics. However, we’ve encountered a significant blocker:
Problem Statement
SonarQube currently doesn’t provide an option to disable slow scans, which in some cases take over 4 minutes to complete. This is causing an unacceptable delay in our CI pipelines, especially since our primary interest is in test coverage, which should take only milliseconds to upload.
Our organization performs code analysis independently of Sonar and is primarily focused on aggregating coverage reports. While a 4-minute analysis might seem reasonable, it’s excessive for our needs, given that the analysis doesn’t provide value to us. We’re dealing with codebases consisting of hundreds of thousands of lines of Java code, and our sole concern is with code coverage, not the analysis.
Hope that makes sense. What options do we have here to disable analysis?
I guess you’re from the same organization as the OP?
If you’re comfortable sharing the details of this, we’d love to know who we’re losing out to & why you find their analysis more useful than ours.
While I understand your appreciation for the beauty and functionality of our UI () SonarQube wasn’t built to just show coverage reports.
We truly feel the biggest value SonarQube offers is in the rules. Have you ever tried us head-to-head against your other tool(s)?
Anyway… If you’re determined to do this
Create a Quality Profile for each language with 0 rules and make it the default. The language analyzers will still run, but it should just be milliseconds for each.
Set a duplication exclusion - either through the UI or with the sonar.cpd.exclusions parameter to **/*. This will prevent duplication detection from running.
Other things will still happen. You can’t turn off all the metrics as easily as you can duplications. But turning off these two things should speed your “analysis” considerably.