From d1b3026822063aaee49dab9550eb95af8f79ab7f Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Wed, 7 Mar 2018 19:27:32 +0000 Subject: [PATCH] Bug 20357: Correct POD Coverage checking for zero sub case Currently, bug 19929 fails QA Test tools, but it makes no sense. TEST PLAN --------- 1) in kohaclone branch apply 19929 2) Run the following commands: kshell /home/vagrant/qa-test-tools/koha-qa.pl -v 2 -c 1 -- This will fail with POD coverage messages. exit 3) apply this patch to qa-test-tools 4) re do step 2 -- POD coverage messages will be cleared up. --- QohA/Report.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/QohA/Report.pm b/QohA/Report.pm index 148d956..8b66ca0 100644 --- a/QohA/Report.pm +++ b/QohA/Report.pm @@ -72,6 +72,8 @@ sub to_string { @diff = grep {not $subs_before{$_}} @{ $after->{subs} }; if ( @diff ) { @diff = map {"POD is missing for $_"} @diff; + } elsif ( scalar @{ $after->{subs} } == 0 ) { + # This is perfectly okay. } elsif ( $before->{rating} > $after->{rating} ) { # Not sure we can reach this @diff = ('POD coverage was greater before, try perl -MPod::Coverage=PackageName -e666'); -- 2.1.4