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:
- lib/Lintian/Check/Debian/Watch.pm
Changes:
=====================================
lib/Lintian/Check/Debian/Watch.pm
=====================================
@@ -160,12 +160,12 @@ sub source {
}
}else {
if (length $line) {
- $continued .= "\n".$line;
+ $continued .= $line."\n";
next if @lines;
}
}
- $line = $continued . ($standard>=$CURRENT_WATCH_VERSION? "\n":$line)
+ $line = $continued . ($standard>=$CURRENT_WATCH_VERSION? "":$line)
if length $continued;
$continued = $EMPTY;
View it on GitLab:
https://salsa.debian.org/lintian/lintian/-/commit/43b7d3c82b4d7396835bf3c31a58222c199ff3d5
--
View it on GitLab:
https://salsa.debian.org/lintian/lintian/-/commit/43b7d3c82b4d7396835bf3c31a58222c199ff3d5
You're receiving this email because of your account on salsa.debian.org.