From: Joe Perches <joe@perches.com>
To: Dwaipayan Ray <dwaipayanray1@gmail.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] checkpatch: improve handling of email comments
Date: Sat, 31 Oct 2020 04:14:35 -0700 [thread overview]
Message-ID: <8b6d8af8ef3e3499f647c5895c79891e0b26ac6c.camel@perches.com> (raw)
In-Reply-To: <CABJPP5Ca8SNGmoE7GVc0OBotFhA6mLuX46QQETiVcQwTKHRosA@mail.gmail.com>
On Sat, 2020-10-31 at 11:41 +0530, Dwaipayan Ray wrote:
> Names which have must quote characters without any comments are
> not warned about right now:
>
> D. Ray <dwaipayanray1@gmail.com> doesn't throw any warning, while
> D. Ray (Dwai) <dwaipayanray1@gmail.com> does.
I agree that a comment in parentheses after the name and before
the email address is an issue that should be resolved.
I think your proposed solution isn't great through.
> Do you think this should be dealt separately from this patch?
I think the cc: stable@(?:vger\.)?kernel.org with additional
content on the same line should be separated from other email
addresses with additional content on the same line.
> Perhaps as another warning?
Dunno.
Try this git log grep:
$ git log --format=email -100000 | \
grep -P '^(?:[\w\-]+-by:|cc:|CC:|Cc:)' | \
grep -v 'stable\@' | \
grep -P '\>.+'
This finds any signature/cc line with content after an
email address that end with a close angle bracket that
doesn't go to the stable address.
Think about what content after that close angle bracket
should and shoud not be allowed.
There are a few variants here:
o comments (optional whitespace, followed by '#' or '[' or '(' or c89)
o misuse of quote (around the whole name and address)
o Odd commas after '>' likely from defective cut'n'paste use
Then add this to the first grep to avoid the comments as above
$ git log --format=email -100000 | \
grep -P '^(?:[\w\-]+-by:|cc:|CC:|Cc:)' | \
grep -v 'stable\@' | \
grep -P '\>.+' | \
grep -vP '\>\s*(?:\#|\(|/\*|\[)'
Shouldn't all these be reported?
Are they if your patch is applied?
Then look at the addresses that do not have a close angle
bracket and also have more content after the email address.
$ git log --format=email -100000 | \
grep -P '^(?:[\w\-]+-by:|cc:|CC:|Cc:)' | \
grep -v 'stable@' | \
grep -vP '<[\w\.\@\+\-]+>' | \
grep -vP '[\w\.\@\+\-]+$'
What of all of these should be reported?
Happy testing...
next prev parent reply other threads:[~2020-10-31 11:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-30 9:07 Dwaipayan Ray
2020-10-30 11:54 ` Joe Perches
2020-10-30 11:58 ` Lukas Bulwahn
2020-10-30 12:21 ` Joe Perches
2020-10-31 4:14 ` Joe Perches
2020-10-31 6:11 ` Dwaipayan Ray
2020-10-31 11:14 ` Joe Perches [this message]
2020-10-31 21:08 ` 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=8b6d8af8ef3e3499f647c5895c79891e0b26ac6c.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®