From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: Thomas Monjalon <thomas@monjalon.net>
Subject: [PATCH 2/2] devtools: check that maintainers are listed in mailmap
Date: Fri, 22 Mar 2024 17:14:06 +0100 [thread overview]
Message-ID: <20240322161406.996890-2-david.marchand@redhat.com> (raw)
In-Reply-To: <20240322161406.996890-1-david.marchand@redhat.com>
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.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
devtools/check-maintainers.sh | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
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
--
2.44.0
next prev parent reply other threads:[~2024-03-22 16:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-22 16:14 [PATCH 1/2] mailmap: fix outdated entry for Zhirun David Marchand
2024-03-22 16:14 ` David Marchand [this message]
2024-06-28 12:56 ` [PATCH v2] devtools: check that maintainers are listed in mailmap David Marchand
2024-07-09 13:11 ` David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240322161406.996890-2-david.marchand@redhat.com \
--to=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).