We have SQ running on our mixed Objective-C and Swift project.
In one of the latest reports we noticed an inconsistency in the Code Coverage metrics (see screenshot)
Given the official Coverage calculation expression Coverage = (CT + CF + LC)/(2 * B + EL) we should get a coverage of (0+0+3426-484)/(2 * 0+3426)*100%=85.9% but in the report we see only 77.2%.
Although the coverage per each file individually seems to be consistent.
Environment
SonarQube Developer Edition - Version 7.9.6 (build 41879)
First, your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:
Regarding your actual question, I can see where your Line Coverage value might seem off, but your math for total coverage indicates that you have no conditions at all in your code. So no ifs or elses, no while or do... while, no for loops… no boolean tests at all, and I find that hard to believe.
Anyway, if you still have questions after upgrade, feel free to come back to us.