From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: [PATCH 3/3] scripts: check wrong patterns in maintainers file Date: Wed, 4 Feb 2015 23:23:24 +0100 Message-ID: <1423088604-29274-4-git-send-email-thomas.monjalon@6wind.com> References: <1423088604-29274-1-git-send-email-thomas.monjalon@6wind.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1423088604-29274-1-git-send-email-thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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 --- 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 () # 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 -- 2.2.2