Skip to content

Commit

Permalink
devtools: check that maintainers are listed in mailmap
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
david-marchand committed Jul 9, 2024
1 parent ec8fb56 commit 8e8aa4a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,7 @@ Jesper Wramberg <[email protected]>
Jesse Brandeburg <[email protected]>
Jesse Bruni <[email protected]>
Jia He <[email protected]> <[email protected]>
Jian Wang <[email protected]>
Jianbo Liu <[email protected]> <[email protected]>
Jianfeng Tan <[email protected]>
Jiang Yu <[email protected]>
Expand Down Expand Up @@ -1380,6 +1381,7 @@ Souvik Dey <[email protected]> <[email protected]>
Spike Du <[email protected]>
Sridhar Samudrala <[email protected]>
Sriharsha Basavapatna <[email protected]>
Srikanth Jampala <[email protected]>
Srikanth Yalavarthi <[email protected]>
Srinivas Narayan <[email protected]>
Srisivasubramanian Srinivasan <[email protected]> <[email protected]>
Expand Down Expand Up @@ -1717,7 +1719,7 @@ Zhihong Wang <[email protected]> <[email protected]>
Zhike Wang <[email protected]> <[email protected]>
Zhimin Huang <[email protected]>
Zhipeng Lu <[email protected]>
Zhirun Yan <[email protected]>
Zhirun Yan <[email protected]> <[email protected]>
Zhiwei He <[email protected]>
Zhiyong Yang <[email protected]>
Zhuobin Huang <[email protected]>
Expand Down
18 changes: 18 additions & 0 deletions devtools/check-maintainers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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>
{
Expand Down Expand Up @@ -129,4 +141,10 @@ echo '# wrong patterns'
echo '##########'
check_fx MAINTAINERS

echo
echo '##########'
echo '# wrong mailmap'
echo '##########'
check_mailmap MAINTAINERS .mailmap

# TODO: check overlaps

0 comments on commit 8e8aa4a

Please sign in to comment.