Linux Documentation
 help / color / mirror / Atom feed
From: "Tobin C. Harding" <me@tobin.cc>
To: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Jonathan Corbet <corbet@lwn.net>,
	Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>,
	Jonathan Cameron <jic23@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Niklas Cassel <niklas.cassel@linaro.org>
Subject: Re: [PATCH v5 2/2] checkpatch: Warn on improper usage of Co-developed-by
Date: Sat, 23 Mar 2019 13:01:03 +1100	[thread overview]
Message-ID: <20190323020103.GB17709@eros.localdomain> (raw)
In-Reply-To: <20190322211137.18241-3-sean.j.christopherson@intel.com>

On Fri, Mar 22, 2019 at 02:11:37PM -0700, Sean Christopherson wrote:
> The purpose of Co-developed-by: is to give attribution to authors who
> aren't already attributed by the From: tag, i.e. who aren't the nominal
> patch author.  Because Co-developed-by: is essentially a variation of
> From:, it must be accompanied by a Signed-off-by: of the associated
> co-author.  To ease the burden of determining whether or not co-authors
> have signed off, Co-developed-by and Signed-off-by: must be explicitly
> paired, i.e. on consecutive lines for a given co-author.
> 
> Suggested-by: Joe Perches <joe@perches.com>
> Cc: Tobin C. Harding <me@tobin.cc>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
> Cc: Jonathan Cameron <jic23@kernel.org>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Niklas Cassel <niklas.cassel@linaro.org>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
> ---
>  scripts/checkpatch.pl | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 5b756278df13..bbe71f017f6d 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2687,6 +2687,24 @@ sub process {
>  			} else {
>  				$signatures{$sig_nospace} = 1;
>  			}
> +
> +# Check Co-developed-by: immediately followed by Signed-off-by: with same name and email
> +			if ($sign_off =~ /^co-developed-by:$/i) {
> +				if ($email eq $author) {
> +					WARN("BAD_SIGN_OFF",
> +					      "Co-developed-by: should not be used to attribute nominal patch author '$author'\n" . "$here\n" . $rawline);
> +				}
> +				if (!defined $lines[$linenr]) {
> +					WARN("BAD_SIGN_OFF",
> +                                             "Co-developed-by: must be immediately followed by Signed-off-by:\n" . "$here\n" . $rawline);
> +				} elsif ($rawlines[$linenr] !~ /^\s*signed-off-by:\s*(.*)/i) {
> +					WARN("BAD_SIGN_OFF",
> +					     "Co-developed-by: must be immediately followed by Signed-off-by:\n" . "$here\n" . $rawline . "\n" .$rawlines[$linenr]);
> +				} elsif ($1 ne $email) {
> +					WARN("BAD_SIGN_OFF",
> +					     "Co-developed-by and Signed-off-by: name/email do not match \n" . "$here\n" . $rawline . "\n" .$rawlines[$linenr]);
> +				}
> +			}
>  		}
>  
>  # Check email subject for common tools that don't need to be mentioned
> -- 
> 2.21.0
> 


Works as advertised!

thanks,
Tobin.

      reply	other threads:[~2019-03-23  2:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-22 21:11 [PATCH v5 0/2] docs: checkpatch: improve handling of Co-developed-by Sean Christopherson
2019-03-22 21:11 ` [PATCH v5 1/2] docs: Clarify the usage and sign-off requirements for Co-developed-by Sean Christopherson
2019-03-23  2:00   ` Tobin C. Harding
2019-03-25 16:31   ` Jonathan Corbet
2019-03-25 16:40     ` Joe Perches
2019-03-25 16:45       ` Jonathan Corbet
2019-03-22 21:11 ` [PATCH v5 2/2] checkpatch: Warn on improper usage of Co-developed-by Sean Christopherson
2019-03-23  2:01   ` Tobin C. Harding [this message]

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=20190323020103.GB17709@eros.localdomain \
    --to=me@tobin.cc \
    --cc=apw@canonical.com \
    --cc=corbet@lwn.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=jic23@kernel.org \
    --cc=joe@perches.com \
    --cc=jorge.ramirez-ortiz@linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=niklas.cassel@linaro.org \
    --cc=sean.j.christopherson@intel.com \
    --cc=tglx@linutronix.de \
    /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