Login
My suspicions were correct! The number of violations
authorJeffrey Ryan Thalhammer <jeff@imaginative-software.com>
Sat, 2 Jun 2007 04:30:21 +0000 (04:30 +0000)
committerJeffrey Ryan Thalhammer <jeff@imaginative-software.com>
Sat, 2 Jun 2007 04:30:21 +0000 (04:30 +0000)
found during 15_statistics.t changed because I had
removed my installation of Perl::Tidy.  Therefore,
the test case found one less violation than I had
expected.

So now, we always do the test without the
RequireTidyCode policy, so it will always
generate the same number of violations.

t/15_statistics.t

index d7adc8d..eab3bdc 100644 (file)
@@ -51,7 +51,9 @@ END_PERL
 
 #-----------------------------------------------------------------------------
 
-my $critic = Perl::Critic->new( -severity => 1 );
+# User may not have Perl::Tidy installed...
+my $profile = { '-CodeLayout::RequireTidyCode' => {} };
+my $critic = Perl::Critic->new( -severity => 1, -profile => $profile );
 my @violations = $critic->critique( \$code );
 
 #print @violations;