This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
podcheck.t: Deal properly with -1 counts
authorKarl Williamson <public@khwilliamson.com>
Fri, 20 May 2011 03:31:35 +0000 (21:31 -0600)
committerKarl Williamson <public@khwilliamson.com>
Fri, 20 May 2011 14:49:19 +0000 (08:49 -0600)
These counts are for things like perltoc which are compendiums of other
pods, and so contain any errors in those other pods, which should be
output with the offending pod and not perltoc.  By setting the counts of
errors to a negative in the db, the message for perltoc is suppressed.
But a message was getting improperly output with perltoc when the
original pod got fixed.

t/porting/podcheck.t

index 999bcb1..f8f7c72 100644 (file)
@@ -1401,6 +1401,7 @@ foreach my $filename (@files) {
         foreach my $message ( sort keys %{$known_problems{$filename}}) {
             next if $problems{$filename}{$message};
             next if ! $known_problems{$filename}{$message};
+            next if $known_problems{$filename}{$message} < 0; # Preserve negs
             my $diagnostic = output_thanks($filename, $known_problems{$filename}{$message}, 0, $message);
             push @diagnostics, $diagnostic if $diagnostic;
         }