From: Arnon Warshavsky <arnon@qwilt.com>
To: thomas@monjalon.net, dev@dpdk.org, john.mcnamara@intel.com,
marko.kovacevic@intel.com
Cc: arnon@qwilt.com
Subject: [dpdk-dev] [PATCH v3] devtools: add explicit warning messages for forbidden tokens
Date: Fri, 2 Nov 2018 12:52:21 +0200 [thread overview]
Message-ID: <1541155941-18088-1-git-send-email-arnon@qwilt.com> (raw)
Replace the content of warning in the forbidden tokens script
from using the searched regex into using explicit messages
Signed-off-by: Arnon Warshavsky <arnon@qwilt.com>
---
v2 - fix typo
v3 - reduce message not to exceed 80 chars
devtools/check-forbidden-tokens.awk | 7 +------
devtools/checkpatches.sh | 2 ++
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/devtools/check-forbidden-tokens.awk b/devtools/check-forbidden-tokens.awk
index fd77cdd..8c89de3 100755
--- a/devtools/check-forbidden-tokens.awk
+++ b/devtools/check-forbidden-tokens.awk
@@ -63,12 +63,7 @@ BEGIN {
END {
if (count > 0) {
print "Warning in " substr(last_file,6) ":"
- print "are you sure you want to add the following:"
- for (key in expressions) {
- if (expressions[key] > 0) {
- print key
- }
- }
+ print MESSAGE
exit RET_ON_FAIL
}
}
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index fb9e9f7..7f823e0 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -49,6 +49,7 @@ check_forbidden_additions() { # <patch>
awk -v FOLDERS="lib drivers" \
-v EXPRESSIONS="rte_panic\\\( rte_exit\\\(" \
-v RET_ON_FAIL=1 \
+ -v MESSAGE='Using rte_panic/rte_exit' \
-f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk \
"$1"
# svg figures must be included with wildcard extension
@@ -56,6 +57,7 @@ check_forbidden_additions() { # <patch>
awk -v FOLDERS='doc' \
-v EXPRESSIONS='::[[:space:]]*[^[:space:]]*\\.svg' \
-v RET_ON_FAIL=1 \
+ -v MESSAGE="Using explicit .svg extension instead of .*" \
-f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk \
"$1"
}
--
1.8.3.1
next reply other threads:[~2018-11-02 10:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-02 10:52 Arnon Warshavsky [this message]
2018-11-04 20:46 ` Thomas Monjalon
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=1541155941-18088-1-git-send-email-arnon@qwilt.com \
--to=arnon@qwilt.com \
--cc=dev@dpdk.org \
--cc=john.mcnamara@intel.com \
--cc=marko.kovacevic@intel.com \
--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).