[v2] devtools: check that maintainers are listed in mailmap

Message ID 20240628125612.3049232-1-david.marchand@redhat.com (mailing list archive)
State Accepted
Delegated to: David Marchand
Headers
Series [v2] devtools: check that maintainers are listed in mailmap |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-abi-testing success Testing PASS

Commit Message

David Marchand June 28, 2024, 12:56 p.m. UTC
  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 <david.marchand@redhat.com>
---
Changes since v1:
- merged patch 1,
- added Jian and Srikanth to .mailmap,

---
 .mailmap                      |  4 +++-
 devtools/check-maintainers.sh | 18 ++++++++++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)
  

Comments

David Marchand July 9, 2024, 1:11 p.m. UTC | #1
On Fri, Jun 28, 2024 at 2:56 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> 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 <david.marchand@redhat.com>

Applied.
  

Patch

diff --git a/.mailmap b/.mailmap
index f76037213d..31383bc782 100644
--- a/.mailmap
+++ b/.mailmap
@@ -645,6 +645,7 @@  Jesper Wramberg <jesper.wramberg@gmail.com>
 Jesse Brandeburg <jesse.brandeburg@intel.com>
 Jesse Bruni <jesse.bruni@intel.com>
 Jia He <justin.he@arm.com> <jia.he@hxt-semitech.com>
+Jian Wang <jianwang@trustnetic.com>
 Jianbo Liu <jianbo.liu@arm.com> <jianbo.liu@linaro.org>
 Jianfeng Tan <jianfeng.tan@intel.com>
 Jiang Yu <yux.jiang@intel.com>
@@ -1378,6 +1379,7 @@  Souvik Dey <sodey@rbbn.com> <sodey@sonusnet.com>
 Spike Du <spiked@nvidia.com>
 Sridhar Samudrala <sridhar.samudrala@intel.com>
 Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
+Srikanth Jampala <jsrikanth@marvell.com>
 Srikanth Yalavarthi <syalavarthi@marvell.com>
 Srinivas Narayan <srinivas.narayan@att.com>
 Srisivasubramanian Srinivasan <srinivasan@marvell.com> <ssrinivasan@caviumnetworks.com>
@@ -1711,7 +1713,7 @@  Zhihong Wang <wangzhihong.wzh@bytedance.com> <zhihong.wang@intel.com>
 Zhike Wang <wangzhike@jd.com> <wangzk320@163.com>
 Zhimin Huang <zhiminx.huang@intel.com>
 Zhipeng Lu <luzhipeng@cestc.cn>
-Zhirun Yan <zhirun.yan@intel.com>
+Zhirun Yan <yanzhirun_163@163.com> <zhirun.yan@intel.com>
 Zhiwei He <zhiwei.he@intel.com>
 Zhiyong Yang <zhiyong.yang@intel.com>
 Zhuobin Huang <zobin1999@gmail.com>
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