Hi, i’m trying to understand how do you calculate the metrics for PRs, and especially code coverage. I always assumed for git, all measures are based on the changed lines (based on the blame info).
Right now I have a failing PR which only changed 4 lines in 2 files:
However it seems like in SonarCloud this PR added 291 new lines to cover (582 lines in total):
Looking at one of the files (the other is much smaller), it seems like all of the lines are calculated for the code coverage - not just the 4 changed lines:
I did validate the scan actually noticed this is a git repo just to make sure the blame info is there:
So my question is - how do you calculate the metrics in general and the coverage metric in particular for PRs? shouldn’t it only take into account the actual line/s changed? or is it only working on the file level?