]> iEval git - apache2-authen-passphrase.git/commitdiff
Add perlcritic test
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 13 Jun 2015 11:34:17 +0000 (14:34 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 13 Jun 2015 11:34:17 +0000 (14:34 +0300)
MANIFEST
t/perlcritic.t [new file with mode: 0644]
t/perlcriticrc [new file with mode: 0644]

index fe6f2077df961ba09cbec9d729395abadc0c489c..0a82f350802fb0597d9cecccb3ea02ee355cef95 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -4,4 +4,6 @@ MANIFEST
 README
 aap-passwd
 t/Apache2-Authen-Passphrase.t
+t/perlcritic.t
+t/perlcriticrc
 lib/Apache2/Authen/Passphrase.pm
diff --git a/t/perlcritic.t b/t/perlcritic.t
new file mode 100644 (file)
index 0000000..51bad9d
--- /dev/null
@@ -0,0 +1,10 @@
+#!/usr/bin/perl
+use v5.14;
+use warnings;
+
+use Test::More;
+
+BEGIN { plan skip_all => '$ENV{RELEASE_TESTING} is false' unless $ENV{RELEASE_TESTING} }
+use Test::Perl::Critic -profile => 't/perlcriticrc';
+
+all_critic_ok
diff --git a/t/perlcriticrc b/t/perlcriticrc
new file mode 100644 (file)
index 0000000..5815f07
--- /dev/null
@@ -0,0 +1,36 @@
+severity = 1
+
+[-BuiltinFunctions::ProhibitComplexMappings]
+[-CodeLayout::RequireTidyCode]
+[-ControlStructures::ProhibitPostfixControls]
+[-ControlStructures::ProhibitUnlessBlocks]
+[-Documentation::PodSpelling]
+[-Documentation::RequirePodLinksIncludeText]
+[-InputOutput::RequireBracedFileHandleWithPrint]
+[-Modules::ProhibitAutomaticExportation]
+[-References::ProhibitDoubleSigils]
+[-RegularExpressions::ProhibitEnumeratedClasses]
+[-RegularExpressions::RequireLineBoundaryMatching]
+[-Subroutines::RequireFinalReturn]
+[-ValuesAndExpressions::ProhibitConstantPragma]
+[-ValuesAndExpressions::ProhibitEmptyQuotes]
+[-ValuesAndExpressions::ProhibitLeadingZeros]
+[-ValuesAndExpressions::ProhibitMagicNumbers]
+[-ValuesAndExpressions::ProhibitNoisyQuotes]
+[-Variables::ProhibitLocalVars]
+[-Variables::ProhibitPackageVars]
+[-Variables::ProhibitPunctuationVars]
+
+[BuiltinFunctions::ProhibitStringyEval]
+allow_includes = 1
+
+[RegularExpressions::RequireExtendedFormatting]
+minimum_regex_length_to_complain_about = 20
+
+[Documentation::RequirePodSections]
+lib_sections = NAME | SYNOPSIS | DESCRIPTION | AUTHOR | COPYRIGHT AND LICENSE
+script_sections = NAME | SYNOPSIS | DESCRIPTION | AUTHOR | COPYRIGHT AND LICENSE
+
+[Subroutines::RequireArgUnpacking]
+short_subroutine_statements = 5
+allow_subscripts = 1
This page took 0.022182 seconds and 4 git commands to generate.