diff mbox series

devtools: fix comment detection in forbidden token check

Message ID 20220127105511.4397-1-david.marchand@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers show
Series devtools: fix comment detection in forbidden token check | expand

Checks

Context Check Description
ci/iol-abi-testing warning Testing issues
ci/iol-x86_64-compile-testing fail Testing issues
ci/iol-x86_64-unit-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/checkpatch success coding style OK

Commit Message

David Marchand Jan. 27, 2022, 10:55 a.m. UTC
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")
Cc: stable@dpdk.org

Reported-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 devtools/check-forbidden-tokens.awk | 3 +++
 1 file changed, 3 insertions(+)

Comments

Thomas Monjalon Jan. 27, 2022, 4:20 p.m. UTC | #1
27/01/2022 11:55, David Marchand:
> 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")
> Cc: stable@dpdk.org
> 
> Reported-by: Thomas Monjalon <thomas@monjalon.net>
> Signed-off-by: David Marchand <david.marchand@redhat.com>

Applied, thanks
diff mbox series

Patch

diff --git a/devtools/check-forbidden-tokens.awk b/devtools/check-forbidden-tokens.awk
index 61ba707c9b..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