typewiz icon indicating copy to clipboard operation
typewiz copied to clipboard

coverage stat tabulates uses rather than declarations

Open starpit opened this issue 6 years ago • 3 comments

the coverage utility is quite helpful. i notice that it increments the penalty for every use of an any variable. maybe this is working as designed, but i think it would be more helpful to penalize any variables once per declaration, rather than once per use?

my thinking is that the magnitude of the fix is proportional to the number of declarations that need to be typed, rather than the number of such uses?

starpit avatar Apr 22 '19 00:04 starpit

Good call! Are you working on a PR?

urish avatar Apr 23 '19 19:04 urish

yes. i also am working on adding a coverage report. the report will break typecov down by declarations versus parameters versus returns

i'm thinking of dropping identifiers altogether, as focusing on these is probably misleading; this will also increase the scalability of the tool, at least as far as the coverage report is concerned: e.g. in our code base (https://github.com/IBM/kui) there is a roughly 10x difference in magnitude between decls and identifiers.

starpit avatar Apr 24 '19 00:04 starpit

This sounds lovely, I'm looking forward to it. Once we have it, #94 will also make a lot more sense

urish avatar Apr 24 '19 07:04 urish