Closed guppy0130 closed 10 months ago
Is your feature request related to a problem? Please describe.
I open a file with 200 LoC, 1 line uncovered. I expect the summary to not say "100% Coverage," since there's a line missing.
It currently does say 100% though, because $\frac{199}{200} * 100=99.5$, and that rounds to $100$.
Describe the solution you'd like
If there's interest/folks are okay with it, I think this line:
https://github.com/ryanluker/vscode-coverage-gutters/blob/7b40ddc682dd3d841bf0f14170854ec037992dab/src/coverage-system/coverageservice.ts#L178
should be changed from Math.round to Math.floor. I'll file a PR for this later today, but wanted to raise the issue too for visibility
Math.round
Math.floor
Describe alternatives you've considered
Additional context
N/A
@guppy0130 Thanks for the ticket and the PR! Logic + math looks good to me, I will take at a look at the PR today.
Is your feature request related to a problem? Please describe.
I open a file with 200 LoC, 1 line uncovered. I expect the summary to not say "100% Coverage," since there's a line missing.
It currently does say 100% though, because $\frac{199}{200} * 100=99.5$, and that rounds to $100$.
Describe the solution you'd like
If there's interest/folks are okay with it, I think this line:
https://github.com/ryanluker/vscode-coverage-gutters/blob/7b40ddc682dd3d841bf0f14170854ec037992dab/src/coverage-system/coverageservice.ts#L178
should be changed from
Math.round
toMath.floor
. I'll file a PR for this later today, but wanted to raise the issue too for visibilityDescribe alternatives you've considered
Additional context
N/A