Uncoverable statements in Perl


Perl’s Devel::Cover module (which is used by codecov to gather coverage data) allows you to add the comment #uncoverable statement above or to the right of statements which would be impossible or impractical to test. For example, branches of code which only run on obscure operating systems, and branches of code that recover from rare filesystem errors.

This seems to be being ignored by codecov sometimes, and I’m having some of those lines show up red.

An example:


I suspect it’s caused by this line in the codecov reporting module:

I think it probably should be returning a number (1.00? 100%?) instead of returning nothing.