linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dwaipayan Ray <dwaipayanray1@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>,
	linux-kernel-mentees@lists.linuxfoundation.org,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Aditya Srivastava <yashsri421@gmail.com>
Subject: Re: [PATCH v2] checkpatch: improve email parsing
Date: Wed, 4 Nov 2020 01:32:41 +0530	[thread overview]
Message-ID: <CABJPP5D3xVKGC2ESwQbgO4_5eEB5A1JFxKB-ghCOsWGU3FoEbg@mail.gmail.com> (raw)
In-Reply-To: <6c275d95c3033422addfc256a30e6ae3dd37941d.camel@perches.com>

On Wed, Nov 4, 2020 at 1:02 AM Joe Perches <joe@perches.com> wrote:
>
> On Tue, 2020-11-03 at 09:10 +0100, Lukas Bulwahn wrote:
> > Maybe you can coordinate among each other who would want to create
> > suitable fix rules here?
>
> Yes please.
>
> > Also, start with the class of the most frequent mistakes for
> > unexpected content after email addresses.
> >
> > I imagine that a maintainer can simply run a tag sanitizing script
> > which just cleans up those stupid mistakes before creating their git
> > trees or sending git pulls to Linus.
>
> Does anyone really do that?
> It generally requires rebasing or post processing each commit after
> being committed before another commit occurs.
>
> > Let us try to add these
> > sanitizing rules to checkpatch.pl with fix options for now; if that
> > sanitizing feature becomes a monster script of its own within
> > checkpatch.pl, we can refactor that into an independent script for
> > cleaning up.
>
> I rather doubt an independent script is going to be worthwhile
> as these rules shouldn't be all that complex.
>
> The only prefixes acceptable for a stable address should be
> CC:|Cc:|cc:.  There are 2 uses in the last 100k commits for
> Signed-off-by: and Acked-by: with stable addresses, those should have a
> message/warning emitted in the future.
>
> The forms used with those cc: stable addresses:
>
> 2777    stable without comment
> 1381    stable # comment
> 74      stable [ comment ]
>
> So I suggest standardizing on no comment and # comment with any other
> style getting a warning.
>
> For non-stable <foo>-by: and cc: addresses and other signatures:
>
> Likely any content after a email address other than a parenthesized
> block should have some checkpatch message emitted.
>
> This should be OK:
>
> Signed-off-by: Full Name (comment) <address@domain.tld> (maintainer:...)
>
> But perhaps this should not be OK:
>
> Signed-off-by: Full Name (comment) <address@domain.tld> # comment
>
> There are 316 uses of this # comment style in the last 100k commits
> and 103 with (comment) after the address.
> Maybe the # use should be ok, maybe not.
>
> And anyone that uses a multiple comments in a name or a even
> a single comment in the email address should also get warned.
>
> The below should not be OK even if actually valid address forms:
>
> Signed-off-by: Full (comment1) Name (comment2) <address@domain.tld>
> Signed-off-by: Full Name <address@(comment)domain.tld>
>

Thanks for your time and review.

I will try to handle these in my next iteration.
Probably there could be extra warnings under
BAD_SIGN_OFF to handle these cases.

Am currently looking to achieve the following:
- unexpected content after email
- Use of multiple name comments
- Use of comments in between address
- stable@vger signoffs

Thanks & Regards,
Dwaipayan.

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

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03  5:48 [PATCH v2] checkpatch: improve email parsing Dwaipayan Ray
2020-11-03  5:58 ` Dwaipayan Ray
2020-11-03  7:28   ` Joe Perches
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 [this message]
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=CABJPP5D3xVKGC2ESwQbgO4_5eEB5A1JFxKB-ghCOsWGU3FoEbg@mail.gmail.com \
    --to=dwaipayanray1@gmail.com \
    --cc=joe@perches.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;
as well as URLs for NNTP newsgroup(s).