summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorThomas Monjalon <thomas.monjalon@6wind.com>2015-02-04 09:51:20 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-02-09 15:15:04 +0100
commit441a2256b36a0026562d40a9f97cfc23ed1b657f (patch)
tree9d28a0ec1ae15faaa8d54bb5987dc12377a88223 /scripts
parentf41b0ad598caf9b130bf4ccbd45db533c1252603 (diff)
downloaddpdk-441a2256b36a0026562d40a9f97cfc23ed1b657f.zip
dpdk-441a2256b36a0026562d40a9f97cfc23ed1b657f.tar.gz
dpdk-441a2256b36a0026562d40a9f97cfc23ed1b657f.tar.xz
scripts: check wrong patterns in maintainers file
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>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/check-maintainers.sh20
1 files changed, 19 insertions, 1 deletions
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