X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=devtools%2Fcheck-forbidden-tokens.awk;h=026844141c8394afc09ccfae1d63de0b666497b4;hb=0615dd2aa139312a93ae312233a80e164c8f1048;hp=f86cbe8dc17cdec9a8ee75171f8f57922b61c4e9;hpb=8d4a222e12f8ce99714fad5011d76bd6a38c36e3;p=dpdk.git diff --git a/devtools/check-forbidden-tokens.awk b/devtools/check-forbidden-tokens.awk index f86cbe8dc1..026844141c 100755 --- a/devtools/check-forbidden-tokens.awk +++ b/devtools/check-forbidden-tokens.awk @@ -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 @@ -54,7 +57,7 @@ BEGIN { } for (i in deny_folders) { re = "^\\+\\+\\+ b/" deny_folders[i]; - if ($0 ~ deny_folders[i]) { + if ($0 ~ re) { in_file = 1 last_file = $0 }