public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: devel@edk2.groups.io
Cc: Laszlo Ersek <lersek@redhat.com>,
	Michael D Kinney <michael.d.kinney@intel.com>,
	Philippe Mathieu-Daude <philmd@redhat.com>,
	Liming Gao <liming.gao@intel.com>,
	Jordan Justen <jordan.l.justen@intel.com>
Subject: [PATCH 2/4] BaseTools/PatchCheck.py: Let EmailAddressCheck describe email checked
Date: Thu,  2 Jan 2020 16:25:51 +0100	[thread overview]
Message-ID: <20200102152553.11976-3-philmd@redhat.com> (raw)
In-Reply-To: <20200102152553.11976-1-philmd@redhat.com>

We are checking different emails from the signature list. We are
going to check more. To be able to differency, add a description
field, so the error reported is clearer.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com>
---
 BaseTools/Scripts/PatchCheck.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py
index 0e654345fcc8..a0ff5ec0038a 100755
--- a/BaseTools/Scripts/PatchCheck.py
+++ b/BaseTools/Scripts/PatchCheck.py
@@ -25,18 +25,22 @@ class Verbose:
 class EmailAddressCheck:
     """Checks an email address."""
 
-    def __init__(self, email):
+    def __init__(self, email, description):
         self.ok = True
 
         if email is None:
             self.error('Email address is missing!')
             return
+        if description is None:
+            self.error('Email description is missing!')
+            return
 
+        self.description = "'" + description + "'"
         self.check_email_address(email)
 
     def error(self, *err):
         if self.ok and Verbose.level > Verbose.ONELINE:
-            print('The email address is not valid:')
+            print('The ' + self.description + ' email address is not valid:')
         self.ok = False
         if Verbose.level < Verbose.NORMAL:
             return
@@ -173,7 +177,7 @@ class CommitMessageCheck:
             if s[2] != ' ':
                 self.error("There should be a space after '" + sig + ":'")
 
-            EmailAddressCheck(s[3])
+            EmailAddressCheck(s[3], sig)
 
         return sigs
 
-- 
2.21.0


  parent reply	other threads:[~2020-01-02 15:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-02 15:25 [PATCH 0/4] BaseTools/PatchCheck: Check committer/author email addresses Philippe Mathieu-Daudé
2020-01-02 15:25 ` [PATCH 1/4] BaseTools/PatchCheck.py: Extract email check code to EmailAddressCheck Philippe Mathieu-Daudé
2020-01-02 15:25 ` Philippe Mathieu-Daudé [this message]
2020-01-02 15:25 ` [PATCH 3/4] BaseTools/PatchCheck.py: Check the patch author email address Philippe Mathieu-Daudé
2020-01-02 15:25 ` [RFC PATCH 4/4] BaseTools/PatchCheck.py: Check the committer " Philippe Mathieu-Daudé
2020-01-03 22:59   ` Jordan Justen
2020-01-04 11:38     ` Philippe Mathieu-Daudé
2020-01-03 13:11 ` [PATCH 0/4] BaseTools/PatchCheck: Check committer/author email addresses Laszlo Ersek

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-list 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=20200102152553.11976-3-philmd@redhat.com \
    --to=devel@edk2.groups.io \
    /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