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

[lintian] 02/02: Allow trailing tabs in debian/rules files; they are very common in Makefiles.



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

lamby pushed a commit to branch master
in repository lintian.

commit 61eef5b213d61680cfd211c8e6dfce4d5f50eaf9
Author: Chris Lamb <lamby@debian.org>
Date:   Wed Nov 1 12:37:19 2017 +0100

    Allow trailing tabs in debian/rules files; they are very common in Makefiles.
---
 checks/cruft.pm                                                     | 2 +-
 debian/changelog                                                    | 2 ++
 t/tests/cruft-file-contains-trailing-whitespace/debian/debian/rules | 6 ++++++
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/checks/cruft.pm b/checks/cruft.pm
index ae5a52f..7524103 100644
--- a/checks/cruft.pm
+++ b/checks/cruft.pm
@@ -329,7 +329,7 @@ our @EOL_TERMINATORS_FILES = qw(control changelog);
 our @TRAILING_WHITESPACE_FILES = (
     ['debian/changelog'        => qr,\s+\n$,],
     ['debian/control'          => qr,\s+\n$,],
-    ['debian/rules'            => qr,\s+\n$,],
+    ['debian/rules'            => qr,[ ]+\n$,], # Allow trailing tabs in Make
 );
 
 sub run {
diff --git a/debian/changelog b/debian/changelog
index d8bae89..4576a65 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,8 @@ lintian (2.5.58) UNRELEASED; urgency=medium
   * checks/cruft.pm
     + [CL] Rewrite file-contains-trailing-whitespace tag to be hash from
       filename to the regex we should match.
+    + [CL] Allow trailing tabs in debian/rules files; they are very common
+      in Makefiles.
   * checks/fields.desc:
     + [SL] Update of the documentation for the change introduced in 2.5.53:
       Transitional packages should now be "oldlibs/optional" rather
diff --git a/t/tests/cruft-file-contains-trailing-whitespace/debian/debian/rules b/t/tests/cruft-file-contains-trailing-whitespace/debian/debian/rules
new file mode 100755
index 0000000..f72af4b
--- /dev/null
+++ b/t/tests/cruft-file-contains-trailing-whitespace/debian/debian/rules
@@ -0,0 +1,6 @@
+#!/usr/bin/make -f
+
+%:
+	dh $@
+	# The line contains a trailing tab (false-positive)
+	

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


Reply to: