From: Javi Merino <javi.merino@arm.com>
To: linux-kernel@vger.kernel.org
Cc: Javi Merino <javi.merino@arm.com>, Joe Perches <joe@perches.com>,
Petr Mladek <pmladek@suse.cz>, Andy Whitcroft <apw@canonical.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] checkpatch: check Signed-off-by: lines for patches coming from stdin
Date: Tue, 11 Aug 2015 15:20:14 +0100 [thread overview]
Message-ID: <1439302814-5750-1-git-send-email-javi.merino@arm.com> (raw)
Commit 34d8815f9512 ("checkpatch: add --showfile to allow input via pipe
to show filenames") disabled the ability to check for Signed-off-by
lines in patches that are fed to scripts/checkpatch.pl from stdin. This
makes things like:
git rebase --interactive --exec 'git format-patch --stdout -1 | scripts/checkpatch.pl --strict -'
not complain about patches without a Signed-off-by.
While commit 34d8815f9512 ("checkpatch: add --showfile to allow input
via pipe to show filenames") is meant to work with the output of git
diff, this should be achieved by explicitly passing --no-signoff
to checkpatch.pl:
git diff | ./scripts/checkpatch --no-signoff -
Fixes: 34d8815f9512 ("checkpatch: add --showfile to allow input via pipe to show filenames")
Cc: Joe Perches <joe@perches.com>
Cc: Petr Mladek <pmladek@suse.cz>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Javi Merino <javi.merino@arm.com>
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index d5c8e9a3a73c..984e7ddfd7e3 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -5684,7 +5684,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");
}
--
1.9.1
next reply other threads:[~2015-08-11 14:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-11 14:20 Javi Merino [this message]
2015-08-11 16:47 ` Joe Perches
2015-08-11 17:04 ` Javi Merino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1439302814-5750-1-git-send-email-javi.merino@arm.com \
--to=javi.merino@arm.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®