checkpatch: add new check PLACEHOLDER_USE
Subsystems (4)
v2 cover checkpatch: add new check PLACEHOLDER_USE
Changes in v2:
- The check is documented in Documentation/dev-tools/checkpatch.rst file.
- Used ERROR instead of WARN on detection.
Onur Özkan (2):
checkpatch: detect unhandled placeholders in cover letters
checkpatch: document new check PLACEHOLDER_USE
Documentation/dev-tools/checkpatch.rst | 10 ++++++++++ scripts/checkpatch.pl | 7 +++++++ 2 files changed, 17 insertions(+)
Signature · 1 line
2.51.0
PATCH v2 1/2 checkpatch: detect unhandled placeholders in cover letters
Adds 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.
--- scripts/checkpatch.pl | 7 +++++++ 1 file changed, 7 insertions(+)
scripts/checkpatch.pl +7 -0
@@ -3340,6 +3340,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")
Signature · 1 line
2.51.0
PATCH v2 2/2 checkpatch: document new check PLACEHOLDER_USE
In reply to Onur ÖzkanAdds documentation for the new check PLACEHOLDER_USE in checkpatch.
--- Documentation/dev-tools/checkpatch.rst | 10 ++++++++++ 1 file changed, 10 insertions(+)
Documentation/dev-tools/checkpatch.rst +10 -0
@@ -1245,6 +1245,16 @@ Others The patch file does not appear to be in unified-diff format. Please regenerate the patch file before sending it to the maintainer. + **PLACEHOLDER_USE** + Detects unhandled placeholder text left in cover letters or commit headers/logs. + Common placeholders include lines like:: + + *** SUBJECT HERE *** + *** BLURB HERE *** + + These typically come from autogenerated templates. Replace them with a proper + subject and description before sending. + **PRINTF_0XDECIMAL** Prefixing 0x with decimal output is defective and should be corrected.
Signature · 1 line
2.51.0
Quoted 5 lines · On Wed, 17 Sep 2025 20:37:23 +0300 Onur Özkan <[email protected]> wrote:
Changes in v2:
- The check is documented inDocumentation/dev-tools/checkpatch.rst
file.
- Used ERROR instead of WARN on detection.
Quoted 8 lines
Onur Özkan (2):
checkpatch: detect unhandled placeholders in cover letters
checkpatch: document new checkPLACEHOLDER_USEDocumentation/dev-tools/checkpatch.rst | 10 ++++++++++ scripts/checkpatch.pl | 7 +++++++ 2 files changed, 17 insertions(+)
A friendly ping on this patch. It's been over two weeks with no feedback, would appreciate any thoughts or suggestions.
Regards,
Onur
Quoted 11 lines · Onur Özkan
Changes in v2:
- The check is documented inDocumentation/dev-tools/checkpatch.rstfile.
- Used ERROR instead of WARN on detection.Onur Özkan (2):
checkpatch: detect unhandled placeholders in cover letters
checkpatch: document new checkPLACEHOLDER_USEDocumentation/dev-tools/checkpatch.rst | 10 ++++++++++ scripts/checkpatch.pl | 7 +++++++ 2 files changed, 17 insertions(+)