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

[lintian] 01/01: checks/rules.pm: Allow rules-not-should-not-use data-based tags to capture variables and include them in the emitted tag.



This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository lintian.

commit 598a4d64c2cc5716f99939e454a6f3bac45276dd
Author: Chris Lamb <lamby@debian.org>
Date:   Sat Jan 13 11:59:30 2018 +0530

    checks/rules.pm: Allow rules-not-should-not-use data-based tags to capture variables and include them in the emitted tag.
---
 checks/rules.pm  | 6 +++++-
 debian/changelog | 3 +++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/checks/rules.pm b/checks/rules.pm
index 6d8483a..4b3086a 100644
--- a/checks/rules.pm
+++ b/checks/rules.pm
@@ -230,7 +230,11 @@ sub run {
         foreach my $bad_construct ($BAD_CONSTRUCT_IN_RULES->all) {
             my $badregex = $BAD_CONSTRUCT_IN_RULES->value($bad_construct);
             if ($line =~ m/$badregex/) {
-                tag $bad_construct, "line $.";
+                if (defined($+{info})) {
+                    tag $bad_construct, $+{info}, "(line $.)";
+                } else {
+                    tag $bad_construct, "line $.";
+                }
             }
         }
 
diff --git a/debian/changelog b/debian/changelog
index f987b6b..f859e79 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,9 @@ lintian (2.5.69) UNRELEASED; urgency=medium
       new-package-should-not-package-python2-module tag.
     + [CL] Include the offending package name when warning about
       new-package-should-not-package-python2-module.
+  * checks/rules.pm:
+    + [CL] Allow rules-not-should-not-use data-based tags to capture
+      variables and include them in the emitted tag.
   * checks/source-copyright.{desc,pm}:
     + [CL] Warn about insecure "Format:" URIs that reference debian.org.
       Based on a patch by Nicolas Braud-Santoni.  (Closes: #886930)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: