From: Joe Perches <joe@perches.com>
To: "Ignacio Peña" <ignacio.pena87@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] checkpatch: warn about novice phrases in commit messages
Date: Tue, 29 Jul 2025 13:28:45 -0700 [thread overview]
Message-ID: <afe999de5fecdeabb291dad9da186073bed386b7.camel@perches.com> (raw)
In-Reply-To: <20250729140725.130842-1-ignacio.pena87@gmail.com>
On Tue, 2025-07-29 at 10:07 -0400, Ignacio Peña wrote:
> Add warnings for common phrases that indicate uncertainty or lack of
> confidence in commit messages.
>
> Signed-off-by: Ignacio Peña <ignacio.pena87@gmail.com>
> ---
> scripts/checkpatch.pl | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
-ENOCHANGELOG
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -3430,6 +3430,24 @@ sub process {
> "Use lore.kernel.org archive links when possible - see https://lore.kernel.org/lists.html\n" . $herecurr);
> }
>
> +# Check for novice phrases in commit messages
> + if ($in_commit_log && !$non_utf8_charset) {
> + my $novice_phrases = qr{(?:^|\s)(?i)(
> + I\s+think|
> + I\s+believe|
> + I\s+suppose|
> + probably|
> + maybe|
> + perhaps|
> + possibly|
> + hopefully
definite nak.
maybe is used way too often.
Where did you get these word choices?
What happened to the "my first kernel patch" phrases?
And you have not ever answered why !$non_utf8_charset is useful.
> + )(?:\s|$)}x;
> + if ($line =~ /$novice_phrases/) {
this should be
if ($line =~ /\b$novice_phrases\b/) {
> + WARN("NOVICE_PHRASE",
> + "Avoid uncertainty phrases like '$1' in commit messages\n" . $herecurr);
> + }
> + }
> +
> # Check for added, moved or deleted files
> if (!$reported_maintainer_file && !$in_commit_log &&
> ($line =~ /^(?:new|deleted) file mode\s*\d+\s*$/ ||
prev parent reply other threads:[~2025-07-29 20:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <ZqCu6xskqgLMQm8K@saruman>
2025-07-29 14:07 ` [PATCH v4] checkpatch: warn about novice phrases in commit messages Ignacio Peña
2025-07-29 20:28 ` Joe Perches [this message]
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=afe999de5fecdeabb291dad9da186073bed386b7.camel@perches.com \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=ignacio.pena87@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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