summaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
authorDavid Marchand <[email protected]>2024-06-28 14:56:12 +0200
committerDavid Marchand <[email protected]>2024-07-09 14:57:28 +0200
commit8e8aa4a4f90dce1fcea03a93f508e3d9bc0c98c0 (patch)
tree6fa6f7dd4fca881479573d2b852488ee7be35e39 /devtools
parentec8fb5696c7e0ddc7c1e9821b2dcaa8d8afde74c (diff)
devtools: check that maintainers are listed in mailmap
When a maintainer changes its mail address, check that the associated entry in .mailmap knows this address, otherwise there is a chance .mailmap points at an obsolete address. While at it, fix Zhirun mail address in mailmap and add Jian and Srikanth. Signed-off-by: David Marchand <[email protected]>
Diffstat (limited to 'devtools')
-rwxr-xr-xdevtools/check-maintainers.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/devtools/check-maintainers.sh b/devtools/check-maintainers.sh
index 71697bb352..8a786e14a9 100755
--- a/devtools/check-maintainers.sh
+++ b/devtools/check-maintainers.sh
@@ -85,6 +85,18 @@ check_fx () # <index file>
done
}
+# Check that every maintainer mail is known of .mailmap:
+check_mailmap () # <index file> <mailmap file>
+{
+ sed -n -e 's/^M: \(.*<.*\)$/\1/p' $1 | sort -u | while read line; do
+ name=${line%% <*}
+ mail='<'${line##* <}
+ if ! grep -q "^$name <" $2 || ! grep -iq "^$name.*$mail" $2; then
+ echo $name mail address $mail is not in $2
+ 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>
{
@@ -129,4 +141,10 @@ echo '# wrong patterns'
echo '##########'
check_fx MAINTAINERS
+echo
+echo '##########'
+echo '# wrong mailmap'
+echo '##########'
+check_mailmap MAINTAINERS .mailmap
+
# TODO: check overlaps