]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
checkpatch: detect unhandled placeholders in cover letters
authorOnur Özkan <work@onurozkan.dev>
Wed, 17 Sep 2025 17:37:24 +0000 (20:37 +0300)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 12 Nov 2025 00:48:29 +0000 (16:48 -0800)
Add a new check PLACEHOLDER_USE to detect unhandled placeholders.  This
prevents sending patch series with incomplete patches (mostly in cover
letters) containing auto generated subject or blurb lines.

These placeholders can be seen on mailing lists.  With this change,
checkpatch will emit an error when such text is found.

Link: https://lkml.kernel.org/r/20250917173725.22547-2-work@onurozkan.dev
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Acked-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
scripts/checkpatch.pl

index 92669904eecc7a8d2afd3f2625528e02b6d17cd6..6729f18e565431e844c3f02c3e6a619909d6a1d1 100755 (executable)
@@ -3345,6 +3345,13 @@ sub process {
                        }
                }
 
+# Check for auto-generated unhandled placeholder text (mostly for cover letters)
+               if (($in_commit_log || $in_header_lines) &&
+                   $rawline =~ /(?:SUBJECT|BLURB) HERE/) {
+                       ERROR("PLACEHOLDER_USE",
+                             "Placeholder text detected\n" . $herecurr);
+               }
+
 # Check for git id commit length and improperly formed commit descriptions
 # A correctly formed commit description is:
 #    commit <SHA-1 hash length 12+ chars> ("Complete commit subject")