From: Joe Perches <joe@perches.com>
To: "Onur Özkan" <work@onurozkan.dev>, linux-kernel@vger.kernel.org
Cc: apw@canonical.com, dwaipayanray1@gmail.com, lukas.bulwahn@gmail.com
Subject: Re: [PATCH] checkpatch: warn on unhandled placeholders in cover letters
Date: Wed, 17 Sep 2025 08:43:16 -0700 [thread overview]
Message-ID: <9a84b9a3adf08aa468252fddfdbb0d9a8506fd46.camel@perches.com> (raw)
In-Reply-To: <20250917170110.4e6d4831@nimda.home>
On Wed, 2025-09-17 at 17:01 +0300, Onur Özkan wrote:
> On Wed, 17 Sep 2025 14:49:09 +0300
> Onur Özkan <work@onurozkan.dev> wrote:
>
> > Adds a new check to detect unhandled placeholders in cover letters.
> > This prevents sending patch series with incomplete cover letters
> > containing auto generated subject or blurb lines such as:
> >
> > *** SUBJECT HERE ***
> > *** BLURB HERE ***
[]
> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> > @@ -3339,6 +3339,15 @@ sub process {
> > $fixed[$fixlinenr] =~ s/^/ /;
> > }
> > }
> > +# Check for unhandled placeholder text in cover letters
> > + if ($filename =~ /cover-letter\.patch$/) {
Probably don't need this $filename test but do need
some test and code like
if (($in_commit_log || $in_header_lines) &&
$rawline =~ /(?:SUBJECT|BLURB) HERE/) {
ERROR("PLACEHOLDER_USE",
"Placeholder text detected\n" . $herecurr);
}
> > + if ($rawline =~ /^\+Subject:.*\*\*\* SUBJECT
> > HERE \*\*\*/ ||
> > + $rawline =~ /^\+\*\*\* BLURB HERE
> > \*\*\*/) {
> > + my $placeholder = $1 || $2;
$placeholder isn't useful.
> > + WARN("COVER_LETTER_PLACEHOLDER",
s/WARN/ERROR/
> > + "Incomplete cover letter:
> > placeholder text detected\n" . $herecurr);
> > + }
> > + }
[]
> I wasn't aware of the checkpatch documentation in
> "Documentation/dev-tools/checkpatch.rst" file. I guess
> COVER_LETTER_PLACEHOLDER needs to be documented there?
yes.
next prev parent reply other threads:[~2025-09-17 15:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-17 11:49 Onur Özkan
2025-09-17 14:01 ` Onur Özkan
2025-09-17 15:43 ` Joe Perches [this message]
2025-09-17 17:34 ` Onur Özkan
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=9a84b9a3adf08aa468252fddfdbb0d9a8506fd46.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=work@onurozkan.dev \
/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®