[lintian] 02/02: Don't match quoted "FIXME" variants as they are almost always deliberate. Thanks to Adrian Bunk for the report. (Closes: #870199)
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository lintian.
commit cbd623115c66e77a65cb022b5c46e78736761721
Author: Chris Lamb <lamby@debian.org>
Date: Thu Aug 24 17:27:34 2017 +0100
Don't match quoted "FIXME" variants as they are almost always deliberate. Thanks to Adrian Bunk for the report. (Closes: #870199)
---
checks/cruft.pm | 2 +-
debian/changelog | 4 +++-
t/tests/cruft-fixme-placeholders/debian/debian/control.in | 4 ++++
t/tests/cruft-fixme-placeholders/tags | 1 +
4 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/checks/cruft.pm b/checks/cruft.pm
index 0ab581f..58c2191 100644
--- a/checks/cruft.pm
+++ b/checks/cruft.pm
@@ -712,7 +712,7 @@ sub find_cruft {
&& $entry->is_open_ok) {
my $fd = $entry->open;
while (my $line = <$fd>) {
- next unless $line =~ m/(FIX_?ME)/;
+ next unless $line =~ m/(?<!")(FIX_?ME)(?!")/;
tag 'file-contains-fixme-placeholder', "$name:$. $1";
}
}
diff --git a/debian/changelog b/debian/changelog
index ace31fb..e7cbe8d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -20,7 +20,7 @@ lintian (2.5.53) UNRELEASED; urgency=medium
- Match all violating years in a line, not just the first (eg.
"2000-2107").
- Expand testsuite.
- * checks/cruft.desc:
+ * checks/cruft.{pm,desc}:
+ [CL] Downgrade severity of file-contains-fixme-placeholder
tag from "important" (ie. "E:") to "wishlist" (ie. "I:").
Thanks to Gregor Herrmann for the suggestion.
@@ -29,6 +29,8 @@ lintian (2.5.53) UNRELEASED; urgency=medium
description. (Closes: #871767)
+ [CL] Don't check copyright_hints file for FIXME placeholders.
(Closes: #872843)
+ + [CL] Don't match quoted "FIXME" variants as they are almost always
+ deliberate. Thanks to Adrian Bunk for the report. (Closes: #870199)
* checks/debhelper.pm:
+ [CL] Prevent a false positive of
missing-build-dependency-for-dh_-command that can be exposed by
diff --git a/t/tests/cruft-fixme-placeholders/debian/debian/control.in b/t/tests/cruft-fixme-placeholders/debian/debian/control.in
index cc523ba..5fbc116 100644
--- a/t/tests/cruft-fixme-placeholders/debian/debian/control.in
+++ b/t/tests/cruft-fixme-placeholders/debian/debian/control.in
@@ -15,3 +15,7 @@ Description: {$description}
be an empty package.
.
FIXME: This line should be detected by Lintian.
+ .
+ This line should not be detected as it only the quoted "FIXME" form.
+ .
+ FIXME: This mixed "FIXME" line should be detected though.
diff --git a/t/tests/cruft-fixme-placeholders/tags b/t/tests/cruft-fixme-placeholders/tags
index d8fece5..58b6708 100644
--- a/t/tests/cruft-fixme-placeholders/tags
+++ b/t/tests/cruft-fixme-placeholders/tags
@@ -1,5 +1,6 @@
I: cruft-fixme-placeholders source: file-contains-fixme-placeholder debian/README.source:4 FIXME
I: cruft-fixme-placeholders source: file-contains-fixme-placeholder debian/README.source:5 FIX_ME
I: cruft-fixme-placeholders source: file-contains-fixme-placeholder debian/control:17 FIXME
+I: cruft-fixme-placeholders source: file-contains-fixme-placeholder debian/control:21 FIXME
I: cruft-fixme-placeholders source: file-contains-fixme-placeholder debian/copyright:8 FIXME
I: cruft-fixme-placeholders source: file-contains-fixme-placeholder debian/rules:4 FIXME
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: