Add support for rendering "uncovered" lines as red.
See original GitHub issueI’m currently integrating go coverage with lcov and this extension and it’s pretty dope.
Go coverage is slightly different to other coverage systems and only marks “start statements” as covered instead of the “entire statement”
My code coverage (istanbul) UI renders this as a HTML page
Notice how there are some lines that have no hits, like method signatures ( but also, not in screenshot, interface and struct declrations also have ‘no coverage’ because they are declerations.
It would be really nice if detail.hit === 0
( aka this statement is not covered ) that we somehow mark that line as “red” or some other color theme in vs code.
This would mean having two renderLines
array, one for “covered” and one for “uncovered” and then setting decorations for both types of coverage information.
I find that scanning through a file for “red lines” is a lot easier then scanning through a file for “not highlighted” lines because a lot of the “not highlighted” lines look like this :
Everything in that screenshot is actually covered but it takes some visual processing to double check that.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:7 (4 by maintainers)
Need to cover some edge cases and create unit tests but I think I have a workable first version:
@Raynos just released 0.3.0 to the marketplace, let me know what you think of the uncovered lines 😄 . Going to close this issue in the meantime.