diff options
author | Thomas Monjalon <thomas.monjalon@6wind.com> | 2015-02-06 20:24:29 +0100 |
---|---|---|
committer | Thomas Monjalon <thomas.monjalon@6wind.com> | 2015-02-09 15:15:04 +0100 |
commit | e12f553035d9df8af75691c20039c9b68a1e36f3 (patch) | |
tree | 621f759ffd76775bcf7abdf9e653851e18738717 /scripts | |
parent | 441a2256b36a0026562d40a9f97cfc23ed1b657f (diff) | |
download | dpdk-e12f553035d9df8af75691c20039c9b68a1e36f3.zip dpdk-e12f553035d9df8af75691c20039c9b68a1e36f3.tar.gz dpdk-e12f553035d9df8af75691c20039c9b68a1e36f3.tar.xz |
scripts: find areas without maintainer
The section titles are filtered to print only those which
are not associated with an email address.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/check-maintainers.sh | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/scripts/check-maintainers.sh b/scripts/check-maintainers.sh index e62217e..69c879a 100755 --- a/scripts/check-maintainers.sh +++ b/scripts/check-maintainers.sh @@ -70,14 +70,22 @@ parse_fx () # <index file> whitelist=$(files $flines) blacklist=$(files $xlines) match=$(aminusb "$whitelist" "$blacklist") + if [ -n "$whitelist" ] ; then + printf "# $title " + maintainers=$(echo "$maintainers" | sed -r 's,.*<(.*)>.*,\1,') + maintainers=$(printf "$maintainers" | sed -e 's,^,<,' -e 's,$,>,') + echo $maintainers + fi if [ -n "$match" ] ; then - echo "# $title" echo "$match" fi # flush section + unset maintainers unset flines unset xlines elif echo "$line" | grep -q '^[A-Z]: ' ; then + # maintainer + maintainers=$(add_line_to_if "$line" "$maintainers" 'M: ') # file matching pattern flines=$(add_line_to_if "$line" "$flines" 'F: ') # file exclusion pattern @@ -118,18 +126,32 @@ aminusb () # <lines a> <lines b> printf "$1\n$2\n$2" | sort | uniq -u | sed '/^$/d' } -all=$(files ./) -listed=$(parse_fx MAINTAINERS | sed '/^#/d' | sort -u) +printf 'sections: ' +parsed=$(parse_fx MAINTAINERS) +echo "$parsed" | grep -c '^#' +printf 'with maintainer: ' +echo "$parsed" | grep -c '^#.*@' +printf 'maintainers: ' +grep '^M:.*<' MAINTAINERS | sort -u | wc -l + +echo +echo '##########' +echo '# orphan areas' +echo '##########' +echo "$parsed" | sed -rn 's,^#([^@]*)$,\1,p' | uniq +echo echo '##########' echo '# files not listed' echo '##########' +all=$(files ./) +listed=$(echo "$parsed" | sed '/^#/d' | sort -u) aminusb "$all" "$listed" +echo echo '##########' echo '# wrong patterns' echo '##########' check_fx MAINTAINERS # TODO: check overlaps -# TODO: check orphan areas |