Linux Kernel Mentees Archive on lore.kernel.org
 help / color / Atom feed
From: Joe Perches <joe@perches.com>
To: Aditya Srivastava <yashsri421@gmail.com>
Cc: linux-kernel-mentees@lists.linuxfoundation.org,
	linux-kernel@vger.kernel.org, dwaipayanray1@gmail.com
Subject: Re: [Linux-kernel-mentees] [PATCH] checkpatch: add fix for BAD_SIGN_OFF
Date: Sun, 08 Nov 2020 11:57:06 -0800
Message-ID: <e8fef5fbd71331b010988769b249af6a79048f48.camel@perches.com> (raw)
In-Reply-To: <20201108134317.25400-1-yashsri421@gmail.com>

On Sun, 2020-11-08 at 19:13 +0530, Aditya Srivastava wrote:
> Currently, checkpatch warns us if the author of the commit signs-off
> as co-developed-by.
[]
> A quick manual check found out that all fixes were correct in those
> cases.
[]
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -2827,8 +2827,11 @@ sub process {
>  # 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 (WARN("BAD_SIGN_OFF",
> +						 "Co-developed-by: should not be used to attribute nominal patch author '$author'\n" . "$here\n" . $rawline) &&
> +					    $fix) {
> +						fix_delete_line($fixlinenr, $rawline);
> +					}
>  				}
>  				if (!defined $lines[$linenr]) {
>  					WARN("BAD_SIGN_OFF",

Looks OK to me.

Another option might be to add a Signed-off-by: line derived from
any "From:" line when:

	if ($is_patch && $has_commit_log && $chk_signoff) {
		if ($signoff == 0) {
			ERROR("MISSING_SIGN_OFF",
			      "Missing Signed-off-by: line(s)\n");

etc...

_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

  reply index

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-08 13:43 Aditya Srivastava
2020-11-08 19:57 ` Joe Perches [this message]
2020-11-09  7:24   ` Aditya
2020-12-04 10:06   ` Aditya
  -- strict thread matches above, loose matches on Subject: below --
2020-11-08 13:41 Aditya Srivastava
2020-11-03 15:18 Aditya Srivastava
2020-11-04 11:14 ` Lukas Bulwahn
2020-11-07  9:27   ` Aditya
2020-11-07 18:38     ` Lukas Bulwahn
2020-11-07 18:55       ` Aditya
2020-11-08  6:47         ` Lukas Bulwahn
2020-11-08  9:19           ` Aditya
2020-11-08 10:42             ` Lukas Bulwahn

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=e8fef5fbd71331b010988769b249af6a79048f48.camel@perches.com \
    --to=joe@perches.com \
    --cc=dwaipayanray1@gmail.com \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yashsri421@gmail.com \
    /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

Linux Kernel Mentees Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-kernel-mentees/0 linux-kernel-mentees/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-kernel-mentees linux-kernel-mentees/ https://lore.kernel.org/linux-kernel-mentees \
		linux-kernel-mentees@lists.linuxfoundation.org linux-kernel-mentees@lists.linux-foundation.org
	public-inbox-index linux-kernel-mentees

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.linuxfoundation.lists.linux-kernel-mentees


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git