I see from this page - Test Coverage & Execution | SonarQube Docs
that coverage is calculated as follows:
Coverage = (CT + CF + LC)/(2*B + EL)
where
CT = conditions that have been evaluated to ‘true’ at least once
CF = conditions that have been evaluated to ‘false’ at least once
LC = covered lines = lines_to_cover - uncovered_lines
B = total number of conditions
EL = total number of executable lines (lines_to_cover)
Is there a reason beyond simplicity for having a single metric?
Wouldn’t separate targets for line and branch coverage make more sense?
For example I might set a gate with 100% line coverage and 60% branch coverage (given various hidden branches generated by C++ compilers).