plantain-00 / type-coverage

A CLI tool to check type coverage for typescript code
MIT License
1.26k stars 44 forks source link

Unclear why coverage isn't 100% #53

Closed danielnixon closed 4 years ago

danielnixon commented 4 years ago

Version(if relevant): 2.8.0

Environment(if relevant):

Code(if relevant):

yarn type-coverage --strict --ignore-catch --detail
yarn run v1.22.4
$ type-coverage --strict --detail --ignore-catch
328 / 332 98.79%
The type coverage rate(98.79%) is lower than the target(100%).
error Command failed with exit code 1.

Expected:

Either coverage is 100% OR the failing code is identified in the output (especially with --detail flag).

Actual:

The coverage is reported as 98.79% but no failing code is identified, even with --detail flag.

danielnixon commented 4 years ago

Is it that the lines ignored with // type-coverage:ignore-line are still contributing to the overall percentage?

plantain-00 commented 4 years ago

overall percentage in --strict should work with // type-coverage:ignore-line, I will fix it.

plantain-00 commented 4 years ago

v2.8.1 should fix it.

danielnixon commented 4 years ago

LGTM, thanks @plantain-00 !