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

[Git][lintian/lintian][master] Correctly parse the paragraphs in watch file with format v5



Title: GitLab

Nilesh Patra pushed to branch master at lintian / lintian

Commits:

  • 43b7d3c8
    by Rafael Laboissière at 2025-09-16T21:56:30-03:00
    Correctly parse the paragraphs in watch file with format v5
    
    In the previous code, each parsed paragraph began with a newline
    ("\n"). Therefore, the check for "/^version […]/ at the beginning
    fails and the initial paragraph starting with "Version:" is considered
    to be a source paragraph. This may result in false positives for
    debian-watch-not-mangling-version, for instance.
    
    In the code changed by this commit, the parsed paragraphs end with a
    newline, instead.
    
    Closes: #1115463
    

1 changed file:

Changes:

  • lib/Lintian/Check/Debian/Watch.pm
    ... ... @@ -160,12 +160,12 @@ sub source {
    160 160
                 }
    
    161 161
             }else {
    
    162 162
                 if (length $line) {
    
    163
    -                $continued .= "\n".$line;
    
    163
    +                $continued .= $line."\n";
    
    164 164
                     next if @lines;
    
    165 165
                 }
    
    166 166
             }
    
    167 167
     
    
    168
    -        $line = $continued . ($standard>=$CURRENT_WATCH_VERSION? "\n":$line)
    
    168
    +        $line = $continued . ($standard>=$CURRENT_WATCH_VERSION? "":$line)
    
    169 169
               if length $continued;
    
    170 170
     
    
    171 171
             $continued = $EMPTY;
    


  • Reply to: