Closed hunterjm closed 6 years ago
@hunterjm thanks for submitting this issue! Are you able to reproduce this with the example projects that are in this repository? I am working on the 2.0 architecture currently and I am getting correct looking coverage for the partial lines (based on my understanding).
Let me know if you can reproduce the issue or give me a way to reproduce it and I will gladly take a look at it :+1: .
@ryanluker - I see the same code in your arch revamp branch. It's this line: https://github.com/ryanluker/vscode-coverage-gutters/blob/117-arch-revamp/src/renderer.ts#L104
The issue is when the LCOV reports 0 hits on path 1 (branched path), but 1 or more on path 0 (default path). It's showing the same issue on Line 32 of the node example. The LCOV file says path 0 was taken and path 1 was not, but the line shows fully covered: https://github.com/ryanluker/vscode-coverage-gutters/blob/117-arch-revamp/example/node/lcov.info#L101
It shouldn't matter which path is reporting 0 hits, if any BRDA for the same line number is reporting no hits, it should be marked as partially covered.
@hunterjm ahh I see now thanks for the extra info, I will fix this in the 2.0 release 😄
@hunterjm did a first pass on this one and I am definitely getting "more" correct results I believe :smile: . I fixed this in the 2.0 branch and added test coverage to watch for this in the future, let me know if the coverage still looks out of wack and I can do some tweaking! https://github.com/ryanluker/vscode-coverage-gutters/pull/126/commits/eefce5dc24340a717b8a5c5727a14d87e2b51756
@hunterjm closing this one for now but I did include eefce5d in the upcoming release (you can also find the .vsix file in the tag release if you want to see it early).
Is there a particular reason Coverage Gutters only marks lines as partially covered when the
else
path, orpath 0
has no hits? Shouldn't it check that all paths for the branch condition have hits and mark it aspartial
if any of them do not?