From b3a22d48328db7d0aaab9fbe94918447b2a25867 Mon Sep 17 00:00:00 2001 From: dakkar Date: Thu, 10 Nov 2016 13:51:53 +0000 Subject: don't critic generated files --- dist.ini | 2 -- xt/author/critic.t | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 xt/author/critic.t diff --git a/dist.ini b/dist.ini index 5267dcc..0ba7b75 100644 --- a/dist.ini +++ b/dist.ini @@ -44,8 +44,6 @@ Alien::QREncode = 0 [Test::NoTabs] -[Test::Perl::Critic] - [PodCoverageTests] [PodSyntaxTests] diff --git a/xt/author/critic.t b/xt/author/critic.t new file mode 100644 index 0000000..7f4c40d --- /dev/null +++ b/xt/author/critic.t @@ -0,0 +1,14 @@ +#!perl +use strict; +use warnings; +use Test::More; + +eval 'use Test::Perl::Critic'; +plan skip_all => 'Test::Perl::Critic required to criticise code' if $@; +Test::Perl::Critic->import( -profile => 'perlcritic.rc' ); +require Perl::Critic::Utils; + +my @files = Perl::Critic::Utils::all_perl_files(-e 'blib' ? 'blib' : 'lib'); + +# don't criticise files generated by Inline::Module +all_critic_ok(grep { not m{/Inline\.pm$} } @files); -- cgit v1.2.3