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

Bug#1013875: lintian: false-postive for experimental-to-unstable-without-comment



Control: tags -1 patch

Changelog entries like the following also trigger this issue which they didn't before:

  * Move from experimental to unstable.

Previously the regex was:

/\bto\s+['"‘“]?(?:unstable|sid)['"’”]?\b/im

Now it's:

m{ \b to \s+ ['"\N{LEFT SINGLE QUOTATION MARK}\N{LEFT DOUBLE QUOTATION MARK}]? (?:unstable|sid) ['"\N{RIGHT SINGLE QUOTATION MARK}\N{RIGHT DOUBLE QUOTATION MARK}]? \b }im;

Removing the whitespace from the regex fixes the issue for me.

Patch is attached.

Kind Regards,

Bas

--
 GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1
From a7689327abc7ef2aa6c2c2902cd27db67507c4ba Mon Sep 17 00:00:00 2001
From: Bas Couwenberg <sebastic@xs4all.nl>
Date: Sat, 9 Jul 2022 21:22:03 +0200
Subject: Fix experimental-to-unstable-without-comment false positives.
 (closes: #1013875)

---
 lib/Lintian/Check/Debian/Changelog.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Lintian/Check/Debian/Changelog.pm b/lib/Lintian/Check/Debian/Changelog.pm
index 45b4d54ff..dbceca7e6 100644
--- a/lib/Lintian/Check/Debian/Changelog.pm
+++ b/lib/Lintian/Check/Debian/Changelog.pm
@@ -692,7 +692,7 @@ sub binary {
               if $latest_dist eq 'unstable'
               && $previous_dist eq 'experimental'
               && $latest_entry->Changes
-              !~ m{ \b to \s+ ['"\N{LEFT SINGLE QUOTATION MARK}\N{LEFT DOUBLE QUOTATION MARK}]? (?:unstable|sid) ['"\N{RIGHT SINGLE QUOTATION MARK}\N{RIGHT DOUBLE QUOTATION MARK}]? \b }im;
+              !~ m{\bto\s+['"\N{LEFT SINGLE QUOTATION MARK}\N{LEFT DOUBLE QUOTATION MARK}]?(?:unstable|sid)['"\N{RIGHT SINGLE QUOTATION MARK}\N{RIGHT DOUBLE QUOTATION MARK}]?\b}im;
 
             my $changes = $group->changes;
             if ($changes) {
-- 
2.30.2


Reply to: