Perl-Critic / Test-Perl-Critic

Run Perl::Critic as a unit test
http://perlcritic.com
Other
9 stars 7 forks source link

wishlist: Option to allow excluding some files #17

Closed perlancar closed 4 years ago

perlancar commented 4 years ago

Perhaps something like:

all_critic_ok({exclude_filename_pattern => qr/FOO/});
all_critic_ok({exclude_path_pattern => qr(lib/Bencher/ScenarioR/)}, "lib", "other-lib");

I generate source code in some of my distributions, and these source code can be unwieldy or large that they choke perlcritic. It'd be nice if Test::Perl::Critic provides a way to do this. Of course, I could also generate the filtered list of files myself before passing it to all_critic_ok() I guess.

perlancar commented 4 years ago

I guess this is better implemented at the Dist::Zilla::Plugin::Test::Perl::Critic level instead of Test::Perl:;:Critic. Closing this issue.

See: https://rt.cpan.org/Ticket/Display.html?id=107950