Login
Cleaned up trailing whitespace. Fixed typo in name of hash key
authorJeffrey Ryan Thalhammer <jeff@imaginative-software.com>
Sun, 26 Oct 2008 20:38:22 +0000 (20:38 +0000)
committerJeffrey Ryan Thalhammer <jeff@imaginative-software.com>
Sun, 26 Oct 2008 20:38:22 +0000 (20:38 +0000)
lib/Perl/Critic.pm
lib/Perl/Critic/Config.pm
lib/Perl/Critic/Document.pm
lib/Perl/Critic/OptionsProcessor.pm

index 7555800..545c120 100644 (file)
@@ -163,7 +163,7 @@ sub _gather_violations {
         my @warnings = $doc->useless_no_critic_warnings(@violations);
         for (@warnings) { warn "$_\n"; }
     }
-    
+
     # Accumulate statistics
     $self->statistics->accumulate( $doc, \@violations );
 
index a03ab8a..12ba79d 100644 (file)
@@ -101,7 +101,7 @@ sub _init {
           boolean_to_number(dor( $args{'-criticism-fatal'}, $options_processor->criticism_fatal() ) );
           
         $self->{_warn_about_useless_no_critic} =
-            boolean_to_number(dor( $args{'-warn-about-useless-no-critc'},
+            boolean_to_number(dor( $args{'-warn-about-useless-no-critic'},
                  $options_processor->warn_about_useless_no_critic() ) );
     }
 
index 99842c6..e86b1c4 100644 (file)
@@ -186,24 +186,23 @@ sub is_line_disabled {
 
 sub useless_no_critic_warnings {
     my ($self, @violations) = @_;
-    
-    
+
     my %violation_lines = ();
     for my $violation (@violations) {
         my $line = $violation->location()->[0];
         my $policy_name = $violation->policy();
         $violation_lines{$policy_name}->{$line} = 1;
     }
-    
-    
+
+
     my @warnings = ();
     my $file = $self->filename() || 'UNKNOWN';
-    
+
     my %disabled_lines = %{ $self->{_disabled_lines} };
     for my $line (keys %disabled_lines) {
         my %disabled_policies = %{ $disabled_lines{$line} };
         for my $policy_name (keys %disabled_policies) {
-            
+
             if ($policy_name eq 'ALL' && not exists $violation_lines{$line}) {
                 push @warnings, qq{Useless disabling of all Policies in file "$file" at line $line.};
             }
@@ -212,7 +211,7 @@ sub useless_no_critic_warnings {
             }
         }
     }
-    
+
     return @warnings;
 }
 
@@ -356,8 +355,7 @@ sub _disable_other_lines {
       SIB:
         while ( my $esib = $end->next_sibling() ) {
             $end = $esib; # keep track of last sibling encountered in this scope
-            last SIB
-                if $esib->isa('PPI::Token::Comment') && $esib =~ $use_critic;
+            last SIB if $esib->isa('PPI::Token::Comment') && $esib =~ $use_critic;
         }
 
         # We either found an end or hit the end of the scope.
index d6f0978..b133bca 100644 (file)
@@ -54,7 +54,7 @@ sub _init {
     $self->{_top}             = dor(delete $args{top},                $FALSE);
     $self->{_verbose}         = dor(delete $args{verbose},            $DEFAULT_VERBOSITY);
     $self->{_criticism_fatal} = dor(delete $args{'criticism-fatal'},  $FALSE);
-    $self->{_warn_about_useless_no_critic} = 
+    $self->{_warn_about_useless_no_critic} =
         dor(delete $args{'warn_about_useless_no_critic'}, $FALSE);
     $self->{_pager}           = dor(delete $args{pager},              $EMPTY);