devtools: fix comment detection in forbidden token check
PATCH 1/1 devtools: fix comment detection in forbidden token check
After a comment section was detected, passing to a new hunk was not seen as ending the section and all subsequent hunks were ignored.
Fixes 7413e7f2aeb3 ("devtools: alert on new calls to exit from libs")
Reported-by Thomas Monjalon <[email protected]>
Signed-off-by David Marchand <[email protected]>
--- devtools/check-forbidden-tokens.awk | 3 +++ 1 file changed, 3 insertions(+)
devtools/check-forbidden-tokens.awk +3 -0
@@ -20,6 +20,9 @@ BEGIN { # state machine assumes the comments structure is enforced by # checkpatches.pl (in_file) { + if ($0 ~ "^@@") { + in_comment = 0 + } # comment start if (index($0,comment_start) > 0) { in_comment = 1
Signature · 1 line
2.23.0
Thomas Monjalon
Applied27/01/2022 11:55, David Marchand:
Quoted 8 lines
After a comment section was detected, passing to a new hunk was not seen as ending the section and all subsequent hunks were ignored.
Fixes 7413e7f2aeb3 ("devtools: alert on new calls to exit from libs")Reported-by Thomas Monjalon <[email protected]>Signed-off-by David Marchand <[email protected]>
Applied, thanks