From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, ferruh.yigit@amd.com,
stephen@networkplumber.org, mattias.ronnblom@ericsson.com
Subject: [PATCH 1/6] devtools: handle multiple pattern for skipping files
Date: Thu, 24 Oct 2024 14:05:30 +0200 [thread overview]
Message-ID: <20241024120535.2722316-2-david.marchand@redhat.com> (raw)
In-Reply-To: <20241024120535.2722316-1-david.marchand@redhat.com>
We may want to skip multiple patterns when forbidding use of some
expression.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
devtools/check-forbidden-tokens.awk | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/devtools/check-forbidden-tokens.awk b/devtools/check-forbidden-tokens.awk
index 59b1121090..28d32fc086 100755
--- a/devtools/check-forbidden-tokens.awk
+++ b/devtools/check-forbidden-tokens.awk
@@ -10,6 +10,7 @@
BEGIN {
split(FOLDERS,deny_folders," ");
split(EXPRESSIONS,deny_expr," ");
+ split(SKIP_FILES,skip_files," ");
in_file=0;
in_comment=0;
count=0;
@@ -56,14 +57,22 @@ BEGIN {
}
count = 0
for (i in deny_folders) {
- re = "^\\+\\+\\+ b/" deny_folders[i];
- if ($0 ~ re) {
- # Check only if the files are not part of SKIP_FILES
- if (!(length(SKIP_FILES) && ($re ~ SKIP_FILES))) {
- in_file = 1
- last_file = $0
+ if (!($0 ~ "^\\+\\+\\+ b/" deny_folders[i])) {
+ continue
+ }
+ skip = 0
+ for (j in skip_files) {
+ if (!($0 ~ "^\\+\\+\\+ b/" skip_files[j])) {
+ continue
}
+ skip = 1
+ break
+ }
+ if (skip == 0) {
+ in_file = 1
+ last_file = $0
}
+ break
}
}
END {
--
2.46.2
next prev parent reply other threads:[~2024-10-24 12:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-24 12:05 [PATCH 0/6] Clean up many __builtin_* in drivers David Marchand
2024-10-24 12:05 ` David Marchand [this message]
2024-10-24 12:05 ` [PATCH 2/6] devtools: forbid use of builtin helpers David Marchand
2024-10-24 16:40 ` Stephen Hemminger
2024-10-24 12:05 ` [PATCH 3/6] common/dpaax: use prefetch macros David Marchand
2024-10-24 16:40 ` Stephen Hemminger
2024-10-24 12:05 ` [PATCH 4/6] crypto/openssl: fix 3DES-CTR with big endian CPUs David Marchand
2024-10-24 12:54 ` Morten Brørup
2024-10-24 13:10 ` David Marchand
2024-10-24 13:17 ` David Marchand
2024-10-24 13:30 ` David Marchand
2024-10-24 14:21 ` Morten Brørup
2024-10-24 12:05 ` [PATCH 5/6] drivers: use branch prediction macros David Marchand
2024-10-24 16:41 ` Stephen Hemminger
2024-10-24 12:05 ` [PATCH 6/6] drivers: use bitops API instead of compiler builtins David Marchand
2024-10-24 12:25 ` Morten Brørup
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241024120535.2722316-2-david.marchand@redhat.com \
--to=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=mattias.ronnblom@ericsson.com \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).