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

Bug#1028959: lintian: Weird very-long-line-length-in-source-file false positve due no long line in file



Hi Axel,

On 2023-01-15 11:12 +0100, Axel Beckert wrote:

> When running against BackupPC, lintian emits this tag:
>
> X: backuppc source: very-long-line-length-in-source-file 535 > 512 [lib/BackupPC/CGI/GeneralInfo.pm:52]
>
> But there is no such long line in that file:
>
> $ cat -n lib/BackupPC/CGI/GeneralInfo.pm | egrep '^\s*52\s' | wc -c
> 77
> $ cut -c512- lib/BackupPC/CGI/GeneralInfo.pm | egrep -v '^$'
> $ file lib/BackupPC/CGI/GeneralInfo.pm
> lib/BackupPC/CGI/GeneralInfo.pm: Perl5 module source, ASCII text
> $
>
> So "file" also doesn't mention any long line stuff (which it usually
> does, I just don't know its limits).
>
> Line 52 looks like this:
>
>            if ( $Jobs{$host}{type} eq "" && defined($Status{$host}) );
>
> Not yet debugged, so not sure why lintian thinks that this file has any
> long line. According to my statistics the two longes lines in there are
> two lines which each 99 characters.

I have found the explanation:

,----
| $ apt source backuppc
| [...]
| $ debcheckout backuppc
| [...]
| $ file backuppc/lib/BackupPC/CGI/GeneralInfo.pm
| backuppc/lib/BackupPC/CGI/GeneralInfo.pm: Perl5 module source, ASCII text
| $ file backuppc-4.4.0/lib/BackupPC/CGI/GeneralInfo.pm
| backuppc-4.4.0/lib/BackupPC/CGI/GeneralInfo.pm: Perl5 module source, ASCII text, with very long lines (534)
`----

The long line is generated by a Debian patch, and you do not have
patches applied in git.  But lintian is smart enough to check the
_patched_ sources.

Thanks for maintaining lintian!

Cheers,
       Sven


Reply to: