mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	Andy Whitcroft <apw@canonical.com>,
	jgg@mellanox.com, Stephen Rothwell <sfr@canb.auug.org.au>,
	Linus Walleij <linus.walleij@linaro.org>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	Pavel Machek <pavel@ucw.cz>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] checkpatch: Warn if missing author Signed-off-by
Date: Wed, 11 Jul 2018 10:24:22 -0700	[thread overview]
Message-ID: <2fe72b18d3a3aa782529e112e07a0eb8d7cf2cc1.camel@perches.com> (raw)
In-Reply-To: <CAMuHMdXJeeaZQHqYp+q+L4FSRNusavDjtN8A_K-koiHGGGEFXw@mail.gmail.com>

On Wed, 2018-07-11 at 19:07 +0200, Geert Uytterhoeven wrote:
> Hi Joe,

Rehi Geert.

> On Wed, Jul 11, 2018 at 6:20 PM Joe Perches <joe@perches.com> wrote:
> > On Wed, 2018-07-11 at 17:10 +0200, Geert Uytterhoeven wrote:
> > > Print a warning if none of the Signed-off-by lines cover the patch
> > > author.
> > > 
> > > Non-ASCII quoted printable encoding in From: headers and (lack of)
> > > double quotes are handled.
> > > Split From: headers are not fully handled: only the first part is
> > > compared.
> > 
> > []
> > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> > 
> > []
> > > +# Check the patch for a From:
> > > +             if (decode("MIME-Header", $line) =~ /^From:\s*(.*)/) {
> > > +                     $author = encode("utf8", $1);
> > > +                     $author =~ s/"//g;
> > > +             }
> > > +
> > >  # Check the patch for a signoff:
> > >               if ($line =~ /^\s*signed-off-by:/i) {
> > >                       $signoff++;
> > >                       $in_commit_log = 0;
> > > +                     if ($author ne '') {
> > > +                             my $l = $line;
> > > +                             $l =~ s/"//g;
> > > +                             if ($l =~ /^\s*signed-off-by: \Q$author\E/i) {

	if (/^\s*signed-off-by:\s*\Q$author\E/i)

> > > +                                 $authorsignoff = 1;
> > > +                             }
> > > +                     }
> > >               }
> > 
> > I don't see the point of removing the quotes.
> 
> If the name contains a dot (e.g. "David S. Miller"), it must be protected
> by double quotes in the From: email header, but that is usually not the case
> in the Sob line.

Right.
It seems it's unusual for SOBs to use quotes around names.

> > Another somewhat frequent Signed-off-by: defect pattern
> > is to have a lower-case name or no name at all used.
> > 
> > Perhaps it'd be useful to add some checks like
> > a single word for a name and all lower-case names:
> > 
> > e.g.:
> >         Signed-off-by: joe perches <joe@perches.com>
> > 
> > emits
> > 
> > Unusual lower case name: 'joe perches <joe@perches.com>'
> > 
> > and
> >         Signed-off-by: root <root@mydomain.net>
> > and
> >         Signed-off-by: Root <root@mydomain.net>
> > and
> >         Signed-off-by: root@mydomain.net
> > 
> > all emit that a single or missing name is unusual.
> 
> Perhaps. But adding email addresses is not the topic of this patch.

Just another possible improvement if you're feeling energetic.

cheers, Joe

  reply	other threads:[~2018-07-11 17:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-11 15:10 Geert Uytterhoeven
2018-07-11 16:20 ` Joe Perches
2018-07-11 17:07   ` Geert Uytterhoeven
2018-07-11 17:24     ` Joe Perches [this message]
2018-07-12 10:05       ` Geert Uytterhoeven

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=2fe72b18d3a3aa782529e112e07a0eb8d7cf2cc1.camel@perches.com \
    --to=joe@perches.com \
    --cc=apw@canonical.com \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=jgg@mellanox.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=sfr@canb.auug.org.au \
    --cc=yoshihiro.shimoda.uh@renesas.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
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®