Skip to content
Browse files

Perl critic test for author

  • Loading branch information...
1 parent 0e773e9 commit edf670103d2de441a707ef54e4bcd62d5af7ec96 @plu committed Jan 24, 2010
Showing with 54 additions and 0 deletions.
  1. +5 −0 xt/00-critic.t
  2. +49 −0 xt/perlcriticrc
View
5 xt/00-critic.t
@@ -0,0 +1,5 @@
+use Test::More;
+use FindBin;
+eval "use Test::Perl::Critic (-profile => '$FindBin::Bin/perlcriticrc')";
+plan skip_all => "Test::Perl::Critic required for testing" if $@;
+all_critic_ok("$FindBin::Bin/../lib");
View
49 xt/perlcriticrc
@@ -0,0 +1,49 @@
+[Variables::ProtectPrivateVars]
+ severity = 5
+[ValuesAndExpressions::ProhibitMixedBooleanOperators]
+ severity = 5
+[Subroutines::ProtectPrivateSubs]
+ severity = 5
+[Subroutines::ProhibitAmpersandSigils]
+ severity = 5
+[Objects::ProhibitIndirectSyntax]
+ severity = 5
+[NamingConventions::ProhibitAmbiguousNames]
+ forbid = abstract bases close contract last left no record right second set
+ severity = 5
+[NamingConventions::Capitalization]
+ severity = 5
+[Modules::RequireExplicitPackage]
+ severity = 5
+[ControlStructures::ProhibitNegativeExpressionsInUnlessAndUntilConditions]
+ severity = 5
+[ClassHierarchies::ProhibitExplicitISA]
+ severity = 5
+[ClassHierarchies::ProhibitOneArgBless]
+ severity = 5
+[CodeLayout::ProhibitTrailingWhitespace]
+ severity = 5
+[Modules::ProhibitMultiplePackages]
+ severity = 5
+[TestingAndDebugging::ProhibitNoStrict]
+ allow = refs
+[CodeLayout::RequireConsistentNewlines]
+ severity = 5
+[ControlStructures::ProhibitUnreachableCode]
+ severity = 5
+[Miscellanea::ProhibitUselessNoCritic]
+ severity = 5
+[Modules::RequireEndWithOne]
+ severity = 5
+[Subroutines::ProhibitManyArgs]
+ max_arguments = 5
+ severity = 5
+[ValuesAndExpressions::ProhibitLongChainsOfMethodCalls]
+ severity = 5
+[Variables::ProhibitUnusedVariables]
+ severity = 5
+[BuiltinFunctions::ProhibitStringyEval]
+ allow_includes = 1
+
+[-InputOutput::ProhibitTwoArgOpen]
+[-InputOutput::ProhibitBarewordFileHandles]

0 comments on commit edf6701

Please sign in to comment.
Something went wrong with that request. Please try again.