The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Onur Özkan" <work@onurozkan.dev>
To: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org, 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 20:34:48 +0300	[thread overview]
Message-ID: <20250917203448.569ac415@nimda.home> (raw)
In-Reply-To: <9a84b9a3adf08aa468252fddfdbb0d9a8506fd46.camel@perches.com>

On Wed, 17 Sep 2025 08:43:16 -0700
Joe Perches <joe@perches.com> wrote:

> 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.
> 

That was a left-over, sorry.

> > > +				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.


      reply	other threads:[~2025-09-17 17:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-17 11:49 [PATCH] checkpatch: warn on unhandled placeholders in cover letters Onur Özkan
2025-09-17 14:01 ` Onur Özkan
2025-09-17 15:43   ` Joe Perches
2025-09-17 17:34     ` Onur Özkan [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=20250917203448.569ac415@nimda.home \
    --to=work@onurozkan.dev \
    --cc=apw@canonical.com \
    --cc=dwaipayanray1@gmail.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@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