pjcj / Devel--Cover

Code coverage metrics for Perl
http://www.pjcj.net/perl.html
93 stars 87 forks source link

Incorrect handling of "trustme" parameter for Pod::Coverage #301

Closed Olyol95 closed 1 year ago

Olyol95 commented 2 years ago

Pod::Coverage allows you to specify a list of regular expressions used to skip coverage for particular symbols via the trustme parameter.

Whilst it isn't documented in the usage for cover, it appears as though it is possible to pass values for this parameter via the DEVEL_COVER_OPTIONS environment variable, like so:

DEVEL_COVER_OPTIONS='-coverage,pod-trustme-^regex'

The logic that exists to parse and convert the parameter into a regular expression appears to use an incorrect parameter name trust_me, instead of trustme:

https://github.com/pjcj/Devel--Cover/blob/13b925200802bdbd1a2748ea56d590adcb2e4400/lib/Devel/Cover.pm#L1207

https://github.com/pjcj/Devel--Cover/blob/13b925200802bdbd1a2748ea56d590adcb2e4400/lib/Devel/Cover.pm#L1213

I don't think it is currently possible to pass this parameter through to Pod::Coverage because of this.

pjcj commented 1 year ago

Closed with #302