mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
checkpatch: detect unhandled placeholders in cover letters
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>
This commit is contained in:
committed by
Andrew Morton
parent
969493d7d6
commit
fc387a0704
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user