mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: John Stultz <john.stultz@linaro.org>,
	lkml <linux-kernel@vger.kernel.org>
Cc: Andy Whitcroft <apw@canonical.com>
Subject: Re: [RFC][PATCH] checkpatch: Properly warn if Change-Id comes after first Signed-off-by line
Date: Mon, 24 Feb 2020 18:12:08 -0800	[thread overview]
Message-ID: <a8af6c423501d5d49f1d81997b3a2295c0df7b9e.camel@perches.com> (raw)
In-Reply-To: <20200224235824.126361-1-john.stultz@linaro.org>

On Mon, 2020-02-24 at 23:58 +0000, John Stultz wrote:
> 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.

Hmm.  When is change-id used in your workflow?

> 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>

Yes, I expect this will break things.

And it's probably better to not add a Signed-off-by: when
you intend this not to be merged.

> ---
>  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;


  reply	other threads:[~2020-02-25  2:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-24 23:58 John Stultz
2020-02-25  2:12 ` Joe Perches [this message]
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

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=a8af6c423501d5d49f1d81997b3a2295c0df7b9e.camel@perches.com \
    --to=joe@perches.com \
    --cc=apw@canonical.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    /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®