urbit / urbit-key-generation

Key derivation and HD wallet generation functions for Urbit
MIT License
15 stars 8 forks source link

Ignore impossible lines in coverage. #31

Closed jtobin closed 5 years ago

jtobin commented 5 years ago

The two throws ignored in this commit should never be reachable; if they were, they would indicate the presence of a serious bug. So if we want 100% Coverage™, I believe we need to ignore them.

jtobin commented 5 years ago

I'll leave this up for a bit before merging it in, just in case anyone has any comments on the merits of this practice.

joemfb commented 5 years ago

I think it's fine. 100% coverage can be a bit of a false idol -- it doesn't mean what it sounds like it should. But it sure makes the reports pretty ...

Fang- commented 5 years ago

Agree it's fine. It's like saying "we acknowledge this exists, and have test-covered it with our minds and souls".

We should probably make it mandatory to explain in a comment why that line is unreachable though. The explanation from your earlier email will suffice.

jtobin commented 5 years ago

@Fang- Yeah, good point. Basically a proof of sorts that the code can't be reached. Will add.