From: Ahmad Fatoum <a.fatoum@barebox.org>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH] checkpatch: allow a space after BAREBOX_CMD_HELP_OPT
Date: Sun, 8 Nov 2026 08:55:28 +0100 [thread overview]
Message-ID: <20261108075530.1207763-1-a.fatoum@barebox.org> (raw)
Command help is commonly written with a space after BAREBOX_CMD_HELP_OPT,
so the strings line up with those of the BAREBOX_CMD_HELP_TEXT( lines
around them. About 300 lines in the tree do so and checkpatch warns about
every single one of them.
Let's accept the space for BAREBOX_CMD_HELP_OPT, but keep warning about
it anywhere else.
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
scripts/checkpatch.pl | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 94fca7f34bb3..5d20e5e3178b 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -5101,6 +5101,9 @@ sub process {
# cpp #elif statement condition may start with a (
} elsif ($ctx =~ /^.\s*\#\s*elif\s*$/) {
+ # the space lines the help text up with BAREBOX_CMD_HELP_TEXT(
+ } elsif ($name eq "BAREBOX_CMD_HELP_OPT") {
+
# If this whole things ends with a type its most
# likely a typedef for a function.
} elsif ($ctx =~ /$Type$/) {
--
2.47.3
next reply other threads:[~2026-11-08 7:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-08 7:55 Ahmad Fatoum [this message]
2026-11-09 9:51 ` Sascha Hauer
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=20261108075530.1207763-1-a.fatoum@barebox.org \
--to=a.fatoum@barebox.org \
--cc=barebox@lists.infradead.org \
/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