* [PATCH] checkpatch: allow a space after BAREBOX_CMD_HELP_OPT
@ 2026-11-08 7:55 Ahmad Fatoum
2026-11-09 9:51 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2026-11-08 7:55 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] checkpatch: allow a space after BAREBOX_CMD_HELP_OPT
2026-11-08 7:55 [PATCH] checkpatch: allow a space after BAREBOX_CMD_HELP_OPT Ahmad Fatoum
@ 2026-11-09 9:51 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2026-11-09 9:51 UTC (permalink / raw)
To: barebox, Ahmad Fatoum
On Sun, 08 Nov 2026 08:55:28 +0100, Ahmad Fatoum wrote:
> 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.
>
> [...]
Applied, thanks!
[1/1] checkpatch: allow a space after BAREBOX_CMD_HELP_OPT
https://git.pengutronix.de/cgit/barebox/commit/?id=d8e021b78bef (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-09 9:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-08 7:55 [PATCH] checkpatch: allow a space after BAREBOX_CMD_HELP_OPT Ahmad Fatoum
2026-11-09 9:51 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox