[lintian] 01/04: c/source-cpy: Remove (now) redundant File::Find
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit b34ae968d7b23ee07b4104c7b25793b62ff0676c
Author: Niels Thykier <niels@thykier.net>
Date: Sat Sep 27 18:22:00 2014 +0200
c/source-cpy: Remove (now) redundant File::Find
All the files located by File::Find are now included in the list
returned by sorted_index.
Signed-off-by: Niels Thykier <niels@thykier.net>
---
checks/source-copyright.pm | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/checks/source-copyright.pm b/checks/source-copyright.pm
index c6b567c..f3c42a4 100644
--- a/checks/source-copyright.pm
+++ b/checks/source-copyright.pm
@@ -24,8 +24,6 @@ use strict;
use warnings;
use autodie;
-use File::Find qw();
-
use List::MoreUtils qw(any);
use Text::Levenshtein qw(distance);
@@ -508,20 +506,7 @@ sub wildcard_to_regex {
sub get_all_files {
my ($info) = @_;
- # files with a trailing slash are directories
- my @all_files = grep { not m,/$, } $info->sorted_index;
- my $debfiles_root = $info->debfiles;
- File::Find::find({
- wanted => sub {
- return unless -f $_;
- my $dir = $File::Find::dir;
- $dir =~ s,^\Q$debfiles_root\E(?:(?=/)|$),debian,;
- push @all_files, "$dir/$_";
- },
- },
- $debfiles_root
- );
- return @all_files;
+ return grep { $_->is_file } $info->sorted_index;
}
1;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: