12/09/2024 10:26, David Marchand: > --- a/devtools/check-forbidden-tokens.awk > +++ b/devtools/check-forbidden-tokens.awk > @@ -32,14 +32,11 @@ BEGIN { > for (i in deny_expr) { > forbidden_added = "^\\+.*" deny_expr[i]; > forbidden_removed="^-.*" deny_expr[i]; > - current = expressions[deny_expr[i]] > if ($0 ~ forbidden_added) { > - count = count + 1; > - expressions[deny_expr[i]] = current + 1 > + count = count + 1 > } > if ($0 ~ forbidden_removed) { > - count = count - 1; > - expressions[deny_expr[i]] = current - 1 > + count = count - 1 > } > } > } > @@ -55,6 +52,7 @@ BEGIN {
While at it, you could insert a missing space in "previous filehad new additions" few lines above. > if (count > 0) { > exit; > } > + count = 0 I'm not an awk expert, but it looks simple enough. Thank you Acked-by: Thomas Monjalon <tho...@monjalon.net>