- sonarqube 10.5.0.89998, sonar-scanner 6.0.0.443 and SonarLint extension in Intellij CE
- Downloaded sonarqube via homebrew
- My question is can we get only test coverage via jacoco and not do static analysis as it takes time(ignore all issues in all files) in sonarqube ?
- Currently i have made a multi-module gradle project with java and added the required plugin and sonar properties in build.gradle(root) file
Have you tried configuring a quality profile that would exclude every possible rule?
Thankyou for the reply. However applying a quality profile with no rules to a project is not possible and because of this it would still run static code analysis.
Yes, it does run the analysis, but the time required to complete it should be significantly less than with all rules turned on.
Thanks for the reply Lexy. I am testing it now how much a time difference there does. So is there no way to just plug in test coverage report in sonarqube where it doesn’t involve running a sonarqube analysis since my major concern is test coverage?
Alas, I haven’t found such a way, nor this is supported by SonarSource.
Thanks Lexy. Have you benchmarked on a project to see how much of a time difference there is between applying quality profile with one rule vs all rules? If yes, please also specify the project if its open source.
@uhhharsh just ran a benchmark.
Unfortunately, we use SonarQube on a closed-source product, so I can’t share the details.
It’s a C# / TypeScript / JavaScript / HTML one.
The difference is quite substantial, however.
With our default set of rules:
total: 12m 15s
build: 2m 42s
test: 3m 42s
sonar: 3m 59s
With 0 rules:
total: 10m 2s
build: 1m 30s
test: 4m 4s
sonar: 2m 25s
Note: SonarQube does not allow you to assign empty profiles to projects, so I had to assign a profile and then remove the rules.