deno icon indicating copy to clipboard operation
deno copied to clipboard

fix(coverage): Exclude comment lines from coverage reports

Open usualoma opened this issue 1 year ago • 4 comments

fixes #25938

I think comments should be excluded from line coverage.

current result

html-report-unpached

patched result

html-report-pached

usualoma avatar Sep 30 '24 03:09 usualoma

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 30 '24 03:09 CLAassistant

Thanks for the PR @usualoma, it looks good at first glance. We're a bit swamped with Deno 2.0 release ATM, so it might have a couple weeks before we merge it. Thanks!

bartlomieju avatar Oct 01 '24 23:10 bartlomieju

Note to self: compare how other tools like nyc or istanbul do that. Are the comment lines excluded from the total line count or are they always counted as covered.

bartlomieju avatar Oct 01 '24 23:10 bartlomieju

Tested istanbul (via jest). The comment lines seem excluded from total line count.

Screenshot 2024-10-28 at 19 39 18

kt3k avatar Oct 28 '24 10:10 kt3k