How to Skip Code Coverage if we are not using Unit testing

Hi Team,

We are using SonarQube Enterprise Edition Version 9.9. In one of the Projects we are not using the Unit testing so the Code Coverage is showing 0 which is ok but the issue we are facing is SonarQube Project is also failing due to this.

Is their any way we can skip the coverage without editing the quality gate.


You can choose to not calculate coverage at all by adding a wide coverage exclusion for this project(sonar.coverage.exclusions=**/*).

1 Like

So, I’m curious, will this really result in it thinking they have 100% code coverage, or rather 0%?

It will result in coverage not being calculated at all. As far as SonarQube is concerned, there will be no lines that could be covered by tests (and you can’t divide by 0! :D)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.