diff options
author | David Mitchell <davem@iabyn.com> | 2009-05-17 15:46:46 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2009-05-17 15:46:46 +0100 |
commit | bfca551dce91bcb5e8e2595f9262614ca1bd4e7e (patch) | |
tree | 3714b77490090877172ba8e731fed4abdf00f578 /Porting/Maintainers.pm | |
parent | de044c3605bd12a0b679b024ec9c16b44093c54b (diff) | |
download | perl-bfca551dce91bcb5e8e2595f9262614ca1bd4e7e.tar.gz |
add --checkmani option to Porting/Maintainers
This will only report unclaimed files if they are listed in the MANIFEST
(but it checks all files, not just *.[chty] etc)
Diffstat (limited to 'Porting/Maintainers.pm')
-rw-r--r-- | Porting/Maintainers.pm | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Porting/Maintainers.pm b/Porting/Maintainers.pm index 7929352e68..aa6ef9efab 100644 --- a/Porting/Maintainers.pm +++ b/Porting/Maintainers.pm @@ -92,6 +92,8 @@ $0: Usage: $0 [[--maintainer M --module M --files]|[--check] [commit] | [file .. with a file checks if it has a maintainer with a dir checks all files have a maintainer otherwise checks for multiple maintainers +--checkmani like --check, but only reports on unclaimed files if they + are in MANIFEST --opened list all modules of modified files Matching is case-ignoring regexp, author matching is both by the short id and by the full name and email. A "module" may @@ -105,6 +107,7 @@ my $Maintainer; my $Module; my $Files; my $Check; +my $Checkmani; my $Opened; sub process_options { @@ -115,6 +118,7 @@ sub process_options { 'module=s' => \$Module, 'files' => \$Files, 'check' => \$Check, + 'checkmani' => \$Checkmani, 'opened' => \$Opened, ); @@ -249,9 +253,14 @@ sub show_results { } } } - } elsif ($Check) { + } elsif ($Check or $Checkmani) { if( @Files ) { - missing_maintainers( qr{\.(?:[chty]|p[lm]|xs)\z}msx, @Files) + missing_maintainers( + $Checkmani + ? sub { -f $_ and exists $MANIFEST{$File::Find::name} } + : sub { /\.(?:[chty]|p[lm]|xs)\z/msx }, + @Files + ); } else { duplicated_maintainers(); @@ -309,7 +318,7 @@ sub missing_maintainers { for my $d (@path) { if( -d $d ) { push @dir, $d } else { warn_maintainer($d) } } - find sub { warn_maintainer($File::Find::name) if /$check/; }, @dir + find sub { warn_maintainer($File::Find::name) if $check->() }, @dir if @dir; } |