Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1451569

[PATCH] checkpatch: check signoff when reading stdin

From Allen Hubbe <allenbh@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] checkpatch: check signoff when reading stdin
Date 2016-07-28 01:10 +0200
Message-ID <rZG7D-62u-29@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Before, signoff was not checked if the filename is '-', indicating
reading the patch from stdin.  This causes commands such as below not to
warn about a missing signoff.

  git show --pretty=email | scripts/checkpatch.pl -

As a workaround, the command could be modified to refer to stdin by a
name other than '-'.  The workaround is not an elegant solution, because
elsewhere checkpatch uses the fact that filename equals '-' is special
for stdin, such as setting '$vname' to 'Your patch'.

  git show --pretty=email | scripts/checkpatch.pl /dev/stdin

This change causes checkpatch to check for a missing signoff line, even
if the filename is '-', as in the first variation of the command.

Signed-off-by: Allen Hubbe <allenbh@gmail.com>
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 4904ced676d4..83acbac10705 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -6045,7 +6045,7 @@ sub process {
 		ERROR("NOT_UNIFIED_DIFF",
 		      "Does not appear to be a unified-diff format patch\n");
 	}
-	if ($is_patch && $filename ne '-' && $chk_signoff && $signoff == 0) {
+	if ($is_patch && $chk_signoff && $signoff == 0) {
 		ERROR("MISSING_SIGN_OFF",
 		      "Missing Signed-off-by: line(s)\n");
 	}
-- 
2.9.1

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] checkpatch: check signoff when reading stdin Allen Hubbe <allenbh@gmail.com> - 2016-07-28 01:10 +0200
  Re: [PATCH] checkpatch: check signoff when reading stdin Joe Perches <joe@perches.com> - 2016-07-28 02:50 +0200
    Re: [PATCH] checkpatch: check signoff when reading stdin Allen Hubbe <allenbh@gmail.com> - 2016-07-29 16:50 +0200
      Re: [PATCH] checkpatch: check signoff when reading stdin Joe Perches <joe@perches.com> - 2016-07-29 17:40 +0200
  [PATCH v2] checkpatch: check signoff when reading stdin Allen Hubbe <allenbh@gmail.com> - 2016-07-28 04:00 +0200

csiph-web