This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make sure there's no superfluous Maintainer.pl entries
authorFlorian Ragwitz <rafl@debian.org>
Thu, 7 Jul 2011 13:44:45 +0000 (15:44 +0200)
committerFlorian Ragwitz <rafl@debian.org>
Thu, 7 Jul 2011 13:55:03 +0000 (15:55 +0200)
Porting/Maintainers.pm

index f1016b4..c98413a 100644 (file)
@@ -314,8 +314,9 @@ sub show_results {
                            : sub { /\.(?:[chty]|p[lm]|xs)\z/msx },
                        @Files
                    );
-               } else { 
+               } else {
                    duplicated_maintainers();
+                   superfluous_maintainers();
                }
     } elsif (@Files) {
        my $ModuleByFile = files_to_modules(@Files);
@@ -391,6 +392,23 @@ sub missing_maintainers {
     find sub { warn_maintainer($File::Find::name) if $check->() }, @dir if @dir;
 }
 
+sub superfluous_maintainers {
+    maintainers_files();
+    for my $f (keys %files) {
+       if ($TapOutput) {
+           if ($MANIFEST{$f}) {
+               print "ok ".++$TestCounter." - Maintained file $f appears in MANIFEST\n";
+           } else {
+               print "not ok ".++$TestCounter." - File $f has has a maintainer but is not in MANIFEST\n";
+           }
+       } else {
+           if (!$MANIFEST{$f}) {
+               warn "File $f has has a maintainer but is not in MANIFEST\n";
+           }
+       }
+    }
+}
+
 sub finish_tap_output {
     print "1..".$TestCounter."\n"; 
 }