[lintian] 01/01: Drop README.source from files to check against the file-contains-trailing-whitespace tag as it can include quotes from upstream that would be ideally left intact.
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository lintian.
commit 04c9e1aa602d1d2bca56ae9158cac924ff4966b6
Author: Chris Lamb <lamby@debian.org>
Date: Sat Oct 28 08:53:56 2017 +0100
Drop README.source from files to check against the file-contains-trailing-whitespace tag as it can include quotes from upstream that would be ideally left intact.
---
checks/cruft.pm | 2 +-
debian/changelog | 3 +++
.../debian/debian/README.source | 2 +-
.../debian/debian/changelog.in | 7 +++++++
t/tests/cruft-file-contains-trailing-whitespace/tags | 2 +-
5 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/checks/cruft.pm b/checks/cruft.pm
index e11f0f2..45ccd7f 100644
--- a/checks/cruft.pm
+++ b/checks/cruft.pm
@@ -326,7 +326,7 @@ our @EOL_TERMINATORS_FILES = qw(control changelog);
# List of files to check for a trailing whitespace characters relative
# to the debian/ source directory
-our @TRAILING_WHITESPACE_FILES = qw(control rules changelog README.source);
+our @TRAILING_WHITESPACE_FILES = qw(control rules changelog);
sub run {
my (undef, undef, $info, $proc) = @_;
diff --git a/debian/changelog b/debian/changelog
index a08ac84..41403a6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,9 @@ lintian (2.5.57) UNRELEASED; urgency=medium
report. (Closes: #879977)
* checks/cruft.desc:
+ [CL] Add example on how to remove trailing whitespace with sed.
+ + [CL] Drop README.source from files to check against the
+ file-contains-trailing-whitespace tag as it can include quotes
+ from upstream that would be ideally left intact.
-- Chris Lamb <lamby@debian.org> Fri, 27 Oct 2017 20:00:29 +0100
diff --git a/t/tests/cruft-file-contains-trailing-whitespace/debian/debian/README.source b/t/tests/cruft-file-contains-trailing-whitespace/debian/debian/README.source
index 93caf69..e794b14 100644
--- a/t/tests/cruft-file-contains-trailing-whitespace/debian/debian/README.source
+++ b/t/tests/cruft-file-contains-trailing-whitespace/debian/debian/README.source
@@ -2,4 +2,4 @@ cruft-file-contains-trailing-whitespace for Debian
--------------------------------------------------
This line does not contain any trailing whitespace.
-This line contains a trailing whitespace character.
+This line contains a trailing whitespace character but is still a false-positive as we ignore README.source.
diff --git a/t/tests/cruft-file-contains-trailing-whitespace/debian/debian/changelog.in b/t/tests/cruft-file-contains-trailing-whitespace/debian/debian/changelog.in
new file mode 100644
index 0000000..0bfcd08
--- /dev/null
+++ b/t/tests/cruft-file-contains-trailing-whitespace/debian/debian/changelog.in
@@ -0,0 +1,7 @@
+{$source} ({$version}) {$distribution}; urgency=low
+
+ * This line contains trailing whitespace.
+ * This line does not contais trailing whitespace.
+ * Suppress "should close ITP bug" messages. (Closes: #123456)
+
+ -- {$author} {$date}
diff --git a/t/tests/cruft-file-contains-trailing-whitespace/tags b/t/tests/cruft-file-contains-trailing-whitespace/tags
index fb99aef..a8a20ae 100644
--- a/t/tests/cruft-file-contains-trailing-whitespace/tags
+++ b/t/tests/cruft-file-contains-trailing-whitespace/tags
@@ -1 +1 @@
-P: cruft-file-contains-trailing-whitespace source: file-contains-trailing-whitespace debian/README.source (line 5)
+P: cruft-file-contains-trailing-whitespace source: file-contains-trailing-whitespace debian/changelog (line 3)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: