linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH] checkpatch: Properly warn if Change-Id comes after first Signed-off-by line
@ 2020-02-24 23:58 John Stultz
  2020-02-25  2:12 ` Joe Perches
  0 siblings, 1 reply; 9+ messages in thread
From: John Stultz @ 2020-02-24 23:58 UTC (permalink / raw)
  To: lkml; +Cc: John Stultz, Andy Whitcroft, Joe Perches

Quite often, the Change-Id may be between Signed-off-by: lines or
at the end of them. Unfortunately checkpatch won't catch these
cases as it disables in_commit_log when it catches the first
Signed-off-by line.

This has bitten me many many times.

I suspect this patch will break other use cases, so it probably
shouldn't be merged, but I wanted to share it just to help
illustrate the problem.

Cc: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
 scripts/checkpatch.pl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index a63380c6b0d2..a55340a9e3ea 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2609,7 +2609,8 @@ sub process {
 # Check the patch for a signoff:
 		if ($line =~ /^\s*signed-off-by:/i) {
 			$signoff++;
-			$in_commit_log = 0;
+			#Disabling in_commit_log here breaks Change-Id checking in some cases
+			#$in_commit_log = 0;
 			if ($author ne '') {
 				my $l = $line;
 				$l =~ s/"//g;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-02-25 22:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-24 23:58 [RFC][PATCH] checkpatch: Properly warn if Change-Id comes after first Signed-off-by line John Stultz
2020-02-25  2:12 ` Joe Perches
2020-02-25  4:48   ` John Stultz
2020-02-25  6:49     ` Joe Perches
2020-02-25 17:45       ` John Stultz
2020-02-25 18:02         ` Joe Perches
2020-02-25 20:14         ` Joe Perches
2020-02-25 21:33           ` John Stultz
2020-02-25 22:16         ` [PATCH] checkpatch: Improve Gerrit Change-Id: test Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).