mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Dwaipayan Ray <dwaipayanray1@gmail.com>
Cc: linux-kernel-mentees@lists.linuxfoundation.org,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Lukas Bulwahn <lukas.bulwahn@gmail.com>,
	Aditya Srivastava <yashsri421@gmail.com>
Subject: Re: [PATCH v2] checkpatch: improve email parsing
Date: Mon, 02 Nov 2020 23:28:06 -0800	[thread overview]
Message-ID: <e9d540c35ac04f0bb69e26d29c76c7cbd5693df8.camel@perches.com> (raw)
In-Reply-To: <CABJPP5DkJ3gwZDW+FBShs3Yo8z6GfP4LSMRW4hO5hL+fVXjShQ@mail.gmail.com>

On Tue, 2020-11-03 at 11:28 +0530, Dwaipayan Ray wrote:
> On Tue, Nov 3, 2020 at 11:18 AM Dwaipayan Ray <dwaipayanray1@gmail.com> wrote:
> > 
> > checkpatch doesn't report warnings for many common mistakes
> > in emails. Some of which are trailing commas and incorrect
> > use of email comments.
> > 
> > At the same time several false positives are reported due to
> > incorrect handling of mail comments. The most common of which
> > is due to the pattern:
> > 
> > <stable@vger.kernel.org> # X.X
> > 
> > Improve email parsing mechanism in checkpatch.
> > 
> > What is added:
> > 
> > - Support for multiple name/address comments.
> > - Improved handling of quoted names.
> > - Sanitize improperly formatted comments.
> > - Sanitize trailing semicolon or dot after email.
[]
> What do you think? Should warnings for the names which should
> be quoted be reported considering this result?

Clearly the quote suggestion is unnecessary.

I think that "cc: stable@(?:vger\.)?kernel\.org" should be
treated differently from other forms of invalid/odd address lines.

My suggestion is that the case insensitive form of

Cc: stable@vger.kernel.org

or only another similar case insensitive forms with a
# comment separator like

Cc: <stable@vger.kernel.org> # some comment

be acceptable for stable.

All other forms with stable@ should emit some message.

And other <foo>-by: and cc: addresses should only have a form like

Signed-off-by: "Full.Name" (possible comment) <email@domain.tld>
or
Signed-off-by: Full Name (possible comment) <email@domain.tld>

etc..

and any additional content after .tld in the email address be flagged
with some message like "unexpected content after email address" rather
than "might be better as".

What do you think best?


  reply	other threads:[~2020-11-03  7:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03  5:48 Dwaipayan Ray
2020-11-03  5:58 ` Dwaipayan Ray
2020-11-03  7:28   ` Joe Perches [this message]
2020-11-03  8:02     ` Dwaipayan Ray
2020-11-03  8:10     ` Lukas Bulwahn
2020-11-03 19:32       ` Joe Perches
2020-11-03 20:02         ` Dwaipayan Ray
2020-11-04  8:05         ` Lukas Bulwahn
2020-11-04  8:50           ` Dwaipayan Ray

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=e9d540c35ac04f0bb69e26d29c76c7cbd5693df8.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=lukas.bulwahn@gmail.com \
    --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
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®