From: Jim Cromie <jim.cromie@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@linuxfoundation.org, Jim Cromie <jim.cromie@gmail.com>
Subject: [PATCH v2 0/2] checkpatch --debug rx=1 facility
Date: Sun, 26 Oct 2025 14:21:39 -0600 [thread overview]
Message-ID: <20251026202142.1622060-1-jim.cromie@gmail.com> (raw)
checkpatch uses a lot of s/// and s///g heuristics to cleanup
code-chunks, before inspecting for problems with more heurisitics.
add a drx_print("reason") helper, for use like:
s/$patt//; -> s/$patt/drx_print("does this")/e;
s/$patt//g; -> s/$patt/drx_print("does that")/ge;
(note the 'e' modifier)
To activate, pass --debug rx=1 or --debug rx="this"
Jim Cromie (2):
checkpatch: add --debug rx=1|foo option and drx_print() helper
checkpatch: 3 use-cases for --debug rx=1 option
scripts/checkpatch.pl | 48 ++++++++++++++++++++++++++++++++++++++++---
1 file changed, 45 insertions(+), 3 deletions(-)
--
2.51.0
next reply other threads:[~2025-10-26 20:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-26 20:21 Jim Cromie [this message]
2025-10-26 20:21 ` [PATCH v2 1/2] checkpatch: add --debug rx=1|foo option and drx_print() helper Jim Cromie
2025-10-26 20:21 ` [PATCH v2 2/2] checkpatch: 3 use-cases for --debug rx=1 option Jim Cromie
2025-10-26 23:40 ` Joe Perches
2025-10-29 19:20 ` jim.cromie
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=20251026202142.1622060-1-jim.cromie@gmail.com \
--to=jim.cromie@gmail.com \
--cc=akpm@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®