Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Being able to eyeball that and see where key parts of logic are not tested is extremely helpful and tends to get lost in these discussions.

I've been saying for years code coverage broadly is fine, we're just presenting the metric in a screwed up way that makes people focus on the wrong thing. It should be absolute value and flipped, presented similar to linting: instead of percent of covered lines, it should be raw count of uncovered lines.

Not only does this help you focus on "this code has no tests" instead of "number go up", it removes the painful edge case where refactoring covered code to be shorter makes the percent-based metric worse.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: