SQ Enterprise Edition Version 8.5 (build 37579)
The issue is that there’s some overlap in covered files.
So far so good. Nothing unexpected.
For the vast majority of JS files, SonarQube seems to list the maximum value from lcov_a and lcov_B for a particular file (using the previous example, it would have been 81%). But for a small subset of JS files, SonarQube reports a value that’s somewhere in-between the lcov_A and lcov_B values for the file. How exactly is this being calculated? Is it a bug?
I would find either of the following scenarios to be acceptable:
A) the max coverage value for a given JS file is used (whichever LCOV reports the highest value for that particular file gets used)
B) the lcovs are merged by SQ, which could potentially result in something that’s higher than both values (e.g., perhaps it considers lines 5-10 as covered by lcov_A and lines 15-25 by lcov_B, which means the merged lcov has a higher percentage than either of original LCOVs on their own).
But what I was NOT expecting is a value somewhere in-between. It’s not an average either. What is it? It doesn’t seem to occur on every file either. I don’t have a concrete example to share just yet. I’m hoping that perhaps someone else may have encountered this issue as well.
Thanks in advance to anyone willing to assist!