mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] checkpatch --debug rx=1 facility
@ 2025-10-26 20:21 Jim Cromie
  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
  0 siblings, 2 replies; 5+ messages in thread
From: Jim Cromie @ 2025-10-26 20:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, Jim Cromie

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-10-29 19:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-26 20:21 [PATCH v2 0/2] checkpatch --debug rx=1 facility Jim Cromie
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

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®