[lintian] 01/02: Ignore commented-out lines to avoid false-positives where the maintainer references the old location. (Closes: #806237)
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository lintian.
commit 6b16b02d41c4df215cde6423cc57e36e7f88aff7
Author: Chris Lamb <lamby@debian.org>
Date: Sun Dec 24 18:51:09 2017 +0000
Ignore commented-out lines to avoid false-positives where the maintainer references the old location. (Closes: #806237)
---
checks/obsolete-sites.pm | 3 +++
debian/changelog | 3 +++
t/tests/obsolete-sites/debian/debian/watch | 4 ++++
3 files changed, 10 insertions(+)
diff --git a/checks/obsolete-sites.pm b/checks/obsolete-sites.pm
index 4316ef7..2d408db 100644
--- a/checks/obsolete-sites.pm
+++ b/checks/obsolete-sites.pm
@@ -61,6 +61,9 @@ sub search_for_obsolete_sites {
my $dcontents = $dfile->file_contents;
+ # Strip comments
+ $dcontents =~ s/^\s*#.*$//gm;
+
foreach my $site ($OBSOLETE_SITES->all) {
if ($dcontents
=~ m((\w+://(?:[\w.]*\.)?\Q$site\E[/:][^\s\"<>\$]*))i) {
diff --git a/debian/changelog b/debian/changelog
index 3055ec7..5d1f02c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,9 @@ lintian (2.5.66) UNRELEASED; urgency=medium
* checks/init.d.{pm,desc}:
+ [CL] Don't emit init.d-script-needs-depends-on-lsb-base if the
package ships a Systemd service file. (Closes: #864999)
+ * checks/obsolete-sites.pm:
+ + [CL] Ignore commented-out lines to avoid false-positives where the
+ maintainer references the old location. (Closes: #806237)
* checks/pe.{pm,desc}:
+ [CL] Check for Microsoft Windows Portable Executable (PE) files that
are missing security hardening features. Thanks to Petter
diff --git a/t/tests/obsolete-sites/debian/debian/watch b/t/tests/obsolete-sites/debian/debian/watch
index a8d6050..6bfdfb1 100644
--- a/t/tests/obsolete-sites/debian/debian/watch
+++ b/t/tests/obsolete-sites/debian/debian/watch
@@ -1,3 +1,7 @@
version=3
http://gitorious.org/foo/foo/file-(.*)\.tar\.gz
+
+# False positives:
+#
+# http://code.google.com/p/wps-bully/
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: