ryanluker / vscode-coverage-gutters

Display test coverage generated by lcov and xml - works with many languages
https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters
MIT License
460 stars 88 forks source link

Missing partial coverage on multi branch single line code block #108

Closed stoffeastrom closed 6 years ago

stoffeastrom commented 6 years ago

screen shot 2017-11-14 at 15 11 09

Looking at coveralls screen shot 2017-11-14 at 15 12 39

Should it display partial coverage or full for this use case?

ryanluker commented 6 years ago

@stoffeastrom good find, I will take a look and see if I can make a failing test for this and then add the fix it to the 1.3.1 release!

ryanluker commented 6 years ago

But yes it should show partial as one of the AND branches seems to not have been hit (if I read the screenshot correctly)

villelahdenvuo commented 6 years ago

I have also never seen any partial coverage highlights, don't know why.

ryanluker commented 6 years ago

@villelahdenvuo can you see the partial coverage in the example project if you run that? if you are using xml based coverage files there isnt partial support yet as the xml parse module, I am using, doesnt have the functionality present.

ryanluker commented 6 years ago

@stoffeastrom looked into this issue and added some more advanced test cases to better mimic real world code examples, I think this issue stems from the fact that there is an unexplored else path that is causing the partial coverage in your original picture. You can see below that when I open the coverage report you can see that there is an E icon (represents an else path not traveled). going to close this one for now as imo the missing else shouldnt make a partial coverage indicator. screenshot from 2018-01-05 11-53-46