Repository navigation
docs: add SonarCloud coverage badge - #25
Conversation
6e7dd3e to
5aa9494
Compare
insatomcat
left a comment
There was a problem hiding this comment.
The badge works and reports the right value (100% on main, fed by the CI coverage report). One change requested on the link target, see the inline comment.
| @@ -1,4 +1,5 @@ | |||
| [](https://sonarcloud.io/summary/new_code?id=seapath_python3-setup-ovs) | |||
| [](https://sonarcloud.io/summary/new_code?id=seapath_python3-setup-ovs) | |||
There was a problem hiding this comment.
The badge shows the overall coverage, while the link opens summary/new_code, which reports the coverage of new code only. The two figures can differ, so a reader clicking the badge lands on a number that does not match it.
This badge is meant as evidence for OpenSSF gold, which has two separate criteria: statement coverage >= 90% and branch coverage >= 80%. The Sonar coverage metric merges lines and conditions into a single figure. The coverage measure page breaks it down into line coverage and condition coverage, which is what the two criteria need:
| [](https://sonarcloud.io/summary/new_code?id=seapath_python3-setup-ovs) | |
| [](https://sonarcloud.io/component_measures?id=seapath_python3-setup-ovs&metric=coverage&view=list) |
There was a problem hiding this comment.
Updated the coverage badge to link to the overall coverage measures page in bdb51bb. Thanks for the suggestion!
Signed-off-by: Eloi Bail <eloi.bail@savoirfairelinux.com>
5aa9494 to
bdb51bb
Compare
|
insatomcat
left a comment
There was a problem hiding this comment.
Thanks, the link now points to the coverage measures page. LGTM.



Summary
Validation
git diff --check origin/main...HEAD