[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#844274: wildcard-matches-nothing-in-dep5-copyright should not be raised for deleted files



tags 844274 + patch
retitle 844274 wildcard-matches-nothing-in-dep5-copyright should not be raised for deleted files
thanks

Niels Thykier wrote:

> You would have to use the "src-orig-index" and the related API.  Mind
> you, it has never been used before so it is completely untested.

I fixed src-orig-index for source-includes-file-in-files-excluded, so this
should just be:

  --- a/checks/source-copyright.pm
  +++ b/checks/source-copyright.pm
  @@ -287,7 +287,8 @@ sub _parse_dep5 {
       }
   
       my (@commas_in_files, %file_para_coverage);
  -    my %file_coverage = map { $_ => 0 } get_all_files($info);
  +    my %file_coverage
  +      = map { $_ => 0 } grep { $_->is_file } $info->sorted_orig_index;
       my $i = 0;
       my $current_line = 0;

(The rest of source-copyright should probably be checked for other uses
of sorted_index that should be sorted_orig_index.)


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-


Reply to: