Hi,
Your branch snapshot (from 4:54 p.m.) shows 100% coverage on 1 line. Your develop/main snapshot (from 8:48 p.m. - presumably post-merge) shows 43% coverage on 14 lines. So I think this is not about the merging of that one branch but possibly of several - or at least of one more.
Several years ago we introduced a control to not apply QG conditions on Coverage (overall Coverage?) when there are fewer than 20 new lines. AFAIK, this is still in force. It would explain why a PR could pass with low coverage on just a few lines, but then cumulatively multiple merged PRs could push the Project over the QG threshold.
Your next question is why you would be seeing a failed QG on 14 “New Lines to cover”. Here we come to the differences among (Docs reference):
- Lines - carriage returns
- Lines of code - “Number of physical lines that contain at least one character which is neither a whitespace nor a tabulation nor part of a comment.”
- Lines to cover - [We don’t actually have a definition of this, but I believe it’s a subset of Lines of Code which omits, e.g. includes, comments &etc.]
If you check your Measures page, you’ll probably see that while you only have 14 New Lines to cover, you have more than 20 New Lines.
And yes, some of this could certainly be improved. Feel free to watch and vote for the related tickets:
-
SONAR-10231 - refine metrics used by Quality Gate fudge factor
-
SONAR-10485 - Provide a way to configure the Quality Gate fudge factor
HTH,
Ann