From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 3/3] scripts: check wrong patterns in maintainers file
Date: Wed, 4 Feb 2015 23:23:24 +0100 [thread overview]
Message-ID: <1423088604-29274-4-git-send-email-thomas.monjalon@6wind.com> (raw)
In-Reply-To: <1423088604-29274-1-git-send-email-thomas.monjalon@6wind.com>
Each F or X pattern is checked and printed if there is no match
with a file in the repository.
The wildcard must be temporarily replaced to prevent from shell expansion.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
scripts/check-maintainers.sh | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/scripts/check-maintainers.sh b/scripts/check-maintainers.sh
index 2687cad..e62217e 100755
--- a/scripts/check-maintainers.sh
+++ b/scripts/check-maintainers.sh
@@ -88,6 +88,20 @@ parse_fx () # <index file>
done
}
+# Check patterns in F: and X:
+check_fx () # <index file>
+{
+ IFS='
+'
+ for line in $(sed -n 's,^[FX]: ,,p' $1 | tr '*' '#') ; do
+ line=$(printf "$line" | tr '#' '*')
+ match=$(files "$line")
+ if [ -z "$match" ] ; then
+ echo "$line"
+ fi
+ done
+}
+
# Add a line to a set of lines if it begins with right pattern
add_line_to_if () # <new line> <lines> <head pattern>
{
@@ -112,6 +126,10 @@ echo '# files not listed'
echo '##########'
aminusb "$all" "$listed"
-# TODO: check patterns that match nothing
+echo '##########'
+echo '# wrong patterns'
+echo '##########'
+check_fx MAINTAINERS
+
# TODO: check overlaps
# TODO: check orphan areas
--
2.2.2
next prev parent reply other threads:[~2015-02-04 22:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-04 22:23 [dpdk-dev] [PATCH 0/3] update maintainers areas Thomas Monjalon
2015-02-04 22:23 ` [dpdk-dev] [PATCH 1/3] maintainers: dispatch more doc Thomas Monjalon
2015-02-06 8:55 ` Olivier MATZ
2015-02-04 22:23 ` [dpdk-dev] [PATCH 2/3] maintainers: add ABI versioning Thomas Monjalon
2015-02-05 1:39 ` Neil Horman
2015-02-09 14:20 ` Thomas Monjalon
2015-02-04 22:23 ` Thomas Monjalon [this message]
2015-02-09 14:21 ` [dpdk-dev] [PATCH 0/3] update maintainers areas 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=1423088604-29274-4-git-send-email-thomas.monjalon@6wind.com \
--to=thomas.monjalon@6wind.com \
--cc=dev@dpdk.org \
/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).