Line coverage calculation seems incorrect?

Hello all,

The line coverage (percentage) reported by SonarQube seems off:

MicrosoftTeams-image

SonarQube says the Line Coverage is 90.9%, but (25,125 - 1,119) / 25,125 * 100% = 95.5%.

Apparently, SonarQube uses a different formula, but I haven’t been able to find it. The docs only specify the formula for Coverage (Test Coverage & Execution | SonarQube Docs).

This is with SonarQube 9.2, community edition.

Regards, Frank

Hello,

Should I report this as a bug?

Thanks, Frank

Hello all,
Is there anybody from the SonarQube team that can give us insight in how the branch and line coverage percentage is calculated? What is the formula for this? I cannot find this in the documentation.

Thank you in advance,
Sebastiaan