skip($skip, 1) if $skip;
my @diagnostics;
+ my @thankful_diagnostics;
my $indent = ' ';
my $total_known = 0;
$files_with_unknown_issues{$filename} = 1;
} elsif ($problem_count < $known_problems{$canonical}{$message}) {
$diagnostic = output_thanks($filename, $known_problems{$canonical}{$message}, $problem_count, $message);
+ push @thankful_diagnostics, $diagnostic;
}
push @diagnostics, $diagnostic if $diagnostic;
}
next if $known_problems{$canonical}{$message} < 0; # Preserve negs
my $diagnostic = output_thanks($filename, $known_problems{$canonical}{$message}, 0, $message);
push @diagnostics, $diagnostic if $diagnostic;
+ push @thankful_diagnostics, $diagnostic if $diagnostic;
}
my $output = "POD of $filename";
$output .= ", excluding $total_known not shown known potential problems"
if $total_known;
- ok(@diagnostics == 0, $output);
+ if (@diagnostics && @diagnostics == @thankful_diagnostics) {
+ # Output fixed issues as passing to-do tests, so they do not
+ # cause failures, but t/harness still flags them.
+ $output .= " # TODO"
+ }
+ ok(@diagnostics == @thankful_diagnostics, $output);
if (@diagnostics) {
note(join "", @diagnostics,
"See end of this test output for your options on silencing this");