The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Onur Özkan" <work@onurozkan.dev>
To: linux-kernel@vger.kernel.org
Cc: apw@canonical.com, joe@perches.com, dwaipayanray1@gmail.com,
	lukas.bulwahn@gmail.com
Subject: Re: [PATCH] checkpatch: warn on unhandled placeholders in cover letters
Date: Wed, 17 Sep 2025 17:01:10 +0300	[thread overview]
Message-ID: <20250917170110.4e6d4831@nimda.home> (raw)
In-Reply-To: <20250917114909.7678-1-work@onurozkan.dev>

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 ***
> 
> These placeholders can be seen on mailing lists (e.g., searching
> for "BLURB HERE" on lore.kernel.org). With this patch, checkpatch
> will emit a warning when such text is found.
> 
> Example output on an invalid cover letter:
> 
>     WARNING: Incomplete cover letter: placeholder text detected
>     #4: FILE: ./0000-cover-letter.patch:4:
>     +Subject: [PATCH 0/4] *** SUBJECT HERE ***
> 
>     WARNING: Incomplete cover letter: placeholder text detected
>     #9: FILE: ./0000-cover-letter.patch:9:
>     +*** BLURB HERE ***
> 
>     total: 0 errors, 2 warnings, 24 lines checked
> 
>     NOTE: For some of the reported defects, checkpatch may be able to
> 	  mechanically convert to the typical style using --fix or
> --fix-inplace.
> 
>     ./0000-cover-letter.patch has style problems, please review.
> 
>     NOTE: If any of the errors are false positives, please report
> 	  them to the maintainer, see CHECKPATCH in MAINTAINERS.
> 
> Signed-off-by: Onur Özkan <work@onurozkan.dev>
> ---
>  scripts/checkpatch.pl | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index e722dd6fa8ef..9d5ded376112 100755
> --- 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$/) {
> +			if ($rawline =~ /^\+Subject:.*\*\*\* SUBJECT
> HERE \*\*\*/ ||
> +				$rawline =~ /^\+\*\*\* BLURB HERE
> \*\*\*/) {
> +				my $placeholder = $1 || $2;
> +				WARN("COVER_LETTER_PLACEHOLDER",
> +					 "Incomplete cover letter:
> placeholder text detected\n" . $herecurr);
> +			}
> +		}
>  
>  # Check for git id commit length and improperly formed commit
> descriptions # A correctly formed commit description is:

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?

Regards,
Onur

  reply	other threads:[~2025-09-17 14:01 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 [this message]
2025-09-17 15:43   ` Joe Perches
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=20250917170110.4e6d4831@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