From: Joe Perches <joe@perches.com>
To: John 'Warthog9' Hawley <warthog9@eaglescrag.net>,
linux-kernel@vger.kernel.org, Andy Whitcroft <apw@canonical.com>,
Dwaipayan Ray <dwaipayanray1@gmail.com>,
Lukas Bulwahn <lukas.bulwahn@gmail.com>
Subject: Re: [PATCH] checkpatch: Add check for common mailing list helper checks
Date: Wed, 07 Jul 2021 10:53:49 -0700 [thread overview]
Message-ID: <5e5eaf6773a0dad42cd59e89f8e710666373f8f1.camel@perches.com> (raw)
In-Reply-To: <506ec749-63dc-3a08-48e7-5179c3df9a42@eaglescrag.net>
On Tue, 2021-07-06 at 12:31 -0700, John 'Warthog9' Hawley wrote:
> On 7/3/21 11:39 AM, Joe Perches wrote:
> > On Fri, 2021-07-02 at 15:37 -0700, John 'Warthog9' Hawley (VMware)
> > wrote:
> > > From: John 'Warthog9' Hawley <warthog9@eaglescrag.net>
> > >
> > > Mailing lists in an attempt to try and avoid sending certain
> > > administrative e-mails to the list, will check the first few lines
> > > (usually ~10) looking for keywords. If those key words are found it
> > > shunts the e-mail to the list admin contact instead of potentially
> > > passing it through to the list.
> >
> > Perhaps the below is a bit better, but I believe a few of the tests
> > are going to be tripped a bit too often.
> >
> > Especially "cancel", "config" and maybe "subscribe" too.
> >
> > For instance:
> >
> > $ git log --grep='\bcancel\b' -P -i --pretty=oneline -10000 | wc -l
> > 1693
> >
> > $ git log --grep='^config\b' -P -i --pretty=oneline -10000 | wc -l
> > 890
> >
> > $ git log --grep='\bsubscribe\b' -P -i --pretty=oneline -10000 | wc -l
> > 123
>
> A part of getting this into checkpatch.pl is getting some better
> feedback mechanisms for why patches may not be passing through the list
> correctly with regexes that have been in place for at least 14 years.
> These, aren't tripped over often,
3000+ commits with regex matches seem rather a lot to me.
> but have run into a instance at least
> recently that triggered me trying to get at least some self check, and
> notification, pieces in place.
No worries, but perhaps the message might be reworded to
say something about possible mailing list moderation rather
than imply rejection.
> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> > @@ -865,6 +865,37 @@ our $allowed_asm_includes = qr{(?x:
> > )};
> > # memory.h: ARM has a custom one
> >
> > +our $mailing_list_phrases = qr{(?xi:
> > + \bcancel\b |
Mere use of the word "cancel" in the commit description seems undesirable to me.
> > +# check if words in the commit message may trip up common mailing list helpers
> > +# to redirect email to the admin contact
> > + if ($in_commit_log && $commit_log_lines < 10 &&
> > + $line =~ /($mailing_list_phrases)/) {
> > + WARN("MAILING_LIST_HELPER",
> > + "Line matches common mailing list helpers and may not be delivered correctly - consider rewording '$1'\n" . $herecurr);
Maybe FILTERS for phrases and helpers
Maybe something like:
"Use of '$1' in this patch's commit description might cause mailing list moderation or rejection\n"
next prev parent reply other threads:[~2021-07-07 17:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-02 22:37 John 'Warthog9' Hawley (VMware)
2021-07-03 3:27 ` Joe Perches
2021-07-03 18:39 ` Joe Perches
2021-07-06 19:31 ` John 'Warthog9' Hawley
2021-07-07 17:53 ` Joe Perches [this message]
2021-07-08 0:21 ` John 'Warthog9' Hawley
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=5e5eaf6773a0dad42cd59e89f8e710666373f8f1.camel@perches.com \
--to=joe@perches.com \
--cc=apw@canonical.com \
--cc=dwaipayanray1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
--cc=warthog9@eaglescrag.net \
/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®