summaryrefslogtreecommitdiff
path: root/xt/author/critic.t
diff options
context:
space:
mode:
Diffstat (limited to 'xt/author/critic.t')
-rw-r--r--xt/author/critic.t14
1 files changed, 14 insertions, 0 deletions
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);