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