mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: "John 'Warthog9' Hawley (VMware)" <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: Fri, 02 Jul 2021 20:27:23 -0700	[thread overview]
Message-ID: <791e3b6560056a9dc7a729c72591af6611163f6d.camel@perches.com> (raw)
In-Reply-To: <20210702223743.1240694-1-warthog9@eaglescrag.net>

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.
> 
> This adds a known list of the potential things that are checked for, and
> while it may search deeper into the message (it goes till it believes
> it's into the patch section) than the mailing list software this should
> help give some warning if the wrong word is potentially added in the
> wrong place in the beginning of a patch message.
[]
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -2852,6 +2852,40 @@ sub process {
[]
> +# check if this may trip up common mailing list helpers to redirect email to the admin contact
> +		if ($in_commit_log &&
> +		    ($line =~ /\bcancel\b/i ||
> +		    $line =~ /\badd me\b/i ||
> +		    $line =~ /\bdelete me\b/i ||
> +		    $line =~ /\bremove\s+me\b/i ||
> +		    $line =~ /\bchange\b.*\baddress\b/ ||
> +		    $line =~ /\bsubscribe\b/i ||
> +		    $line =~ /^sub\b/i ||
> +		    $line =~ /\bunsubscribe\b/i ||
> +		    $line =~ /^unsub\b/i ||
> +		    $line =~ /^\s*help\s*$/i ||
> +		    $line =~ /^\s*info\s*$/i ||
> +		    $line =~ /^\s*info\s+\S+\s*$/i ||
> +		    $line =~ /^\s*lists\s*$/i ||
> +		    $line =~ /^\s*which\s*$/i ||
> +		    $line =~ /^\s*which\s+\S+\s*$/i ||
> +		    $line =~ /^\s*index\s*$/i ||
> +		    $line =~ /^\s*index\s+\S+\s*$/i ||
> +		    $line =~ /^\s*who\s*$/i ||
> +		    $line =~ /^\s*who\s+\S+\s*$/i ||
> +		    $line =~ /^\s*get\s+\S+\s*$/i ||
> +		    $line =~ /^\s*get\s+\S+\s+\S+\s*$/i ||
> +		    $line =~ /^\s*approve\b/i ||
> +		    $line =~ /^\s*passwd\b/i ||
> +		    $line =~ /^\s*newinfo\b/i ||
> +		    $line =~ /^\s*config\b/i ||
> +		    $line =~ /^\s*newconfig\b/i ||
> +		    $line =~ /^\s*writeconfig\b/i ||
> +		    $line =~ /^\s*mkdigest\b/i)){

Have you checked this list against actual commits?

> +			WARN("MAILING LIST HELPER",

This must use underscores for the spaces

	MAILING_LIST_HELPER



  reply	other threads:[~2021-07-03  3:27 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 [this message]
2021-07-03 18:39 ` Joe Perches
2021-07-06 19:31   ` John 'Warthog9' Hawley
2021-07-07 17:53     ` Joe Perches
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=791e3b6560056a9dc7a729c72591af6611163f6d.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®