Louis-Philippe Véronneau pushed to branch master at lintian / lintian
Commits:
a7f6e379 by Rafael Laboissière at 2025-09-18T17:06:23+00: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.
I did a first attempt at fixing the issue in MR !619. It did not pass
the Perl::Critic check, because a empty string (`""`) was introduced in
the code. A quote string (`q{}`) is used now.
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 ? q{} : $line)
if length $continued;
$continued = $EMPTY;
View it on GitLab:
https://salsa.debian.org/lintian/lintian/-/commit/a7f6e379fdf5042ce8fdd2a4863ff403cded255a
--
View it on GitLab:
https://salsa.debian.org/lintian/lintian/-/commit/a7f6e379fdf5042ce8fdd2a4863ff403cded255a
You're receiving this email because of your account on salsa.debian.org.