BaseTools/Scripts/PatchCheck.py: Detect emails rewritten by Groups.Io

Due to strict DMARC / DKIM / SPF rules, Groups.Io sometimes rewrite
the author email. See for example commit df851da3ce.
Add a check to detect these rewrites with PatchCheck.py.

Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com>

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
This commit is contained in:
Philippe Mathieu-Daude 2020-02-05 06:49:15 +08:00 committed by mergify[bot]
parent a4960cf1b6
commit 38ed2ff3dd
1 changed files with 4 additions and 0 deletions

View File

@ -79,6 +79,10 @@ class EmailAddressCheck:
self.error("The email address cannot contain a space: " +
mo.group(3))
if ' via Groups.Io' in name and mo.group(3).endswith('@groups.io'):
self.error("Email rewritten by lists DMARC / DKIM / SPF: " +
email)
class CommitMessageCheck:
"""Checks the contents of a git commit message."""