Sonarqube coverage metric is blank rather than 0

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    Sonarqube 8.9
    Scanner = Sonar Scanner 4.6

Hi why is coverage metric shown blank inn dashboard rather than 0 ?
can i force to 0 ? because we have set quality gate for coverage must passed some value, but when it’a blank it pass the gates

Hi,

That’s usually the difference between “no data” (blank) and “no coverage” (0). But I just ran a test analysis with no coverage reports and got 0s. What languages are we talking about?

 
Ann

Hi Ann,

We are using Java, i thinks it’s because we do exclude with sonar.coverage.exclusions for all.
so it shown blank but not “no coverage” (0)

Hi,

Okay that both makes sense and sounds familiar. If you’ve excluded everything from coverage calculation then you’re obviously not interested in coverage & there’s no point in even showing a 0.

 
Ann