From: Thomas Monjalon Date: Wed, 4 Feb 2015 08:51:20 +0000 (+0100) Subject: scripts: check wrong patterns in maintainers file X-Git-Tag: spdx-start~9784 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=441a2256b36a0026562d40a9f97cfc23ed1b657f;p=dpdk.git 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 --- diff --git a/scripts/check-maintainers.sh b/scripts/check-maintainers.sh index 2687cadaa5..e62217e113 100755 --- a/scripts/check-maintainers.sh +++ b/scripts/check-maintainers.sh @@ -88,6 +88,20 @@ parse_fx () # done } +# Check patterns in F: and X: +check_fx () # +{ + 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 () # { @@ -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