From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.61]) by mx.groups.io with SMTP id smtpd.web10.7015.1578566976695790755 for ; Thu, 09 Jan 2020 02:49:36 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MdRu31a1; spf=pass (domain: redhat.com, ip: 205.139.110.61, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578566975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qd4B8tm/aW73Bw8N6ssUZfWS/ktDFIk3QaRwfoh1SFM=; b=MdRu31a11Naq79fsJ1wMAP83n7IcK0mv5GFWVb9gm/jYkxOcARfxGvjABCz8dlCp0kVecs T77yVuIlfbPyZt0d4/u2z2zOTOj0CBtecn6Hpx63tnchlmKrZKf3qKy0JnbRZ09w5d2ouL ARcAyAFLxps86i+xJAfwNOKievEGz3c= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-296-JXfALxNmOBqADPhUWOqgug-1; Thu, 09 Jan 2020 05:49:34 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 24B8F107ACC5; Thu, 9 Jan 2020 10:49:33 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-107.brq.redhat.com [10.40.204.107]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A4E2860BE0; Thu, 9 Jan 2020 10:49:29 +0000 (UTC) From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= To: Liming Gao , Bob Feng , devel@edk2.groups.io Cc: Philippe Mathieu-Daude , Jordan Justen Subject: [PATCH v3 2/4] BaseTools/PatchCheck.py: Let EmailAddressCheck describe email checked Date: Thu, 9 Jan 2020 11:49:16 +0100 Message-Id: <20200109104918.29750-3-philmd@redhat.com> In-Reply-To: <20200109104918.29750-1-philmd@redhat.com> References: <20200109104918.29750-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: JXfALxNmOBqADPhUWOqgug-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 Cc: Jordan Justen Reviewed-by: Bob Feng Signed-off-by: Philippe Mathieu-Daude --- 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 3b6d77081e7e..42b923cb927e 100755 --- a/BaseTools/Scripts/PatchCheck.py +++ b/BaseTools/Scripts/PatchCheck.py @@ -26,18 +26,22 @@ class Verbose: class EmailAddressCheck: """Checks an email address.""" =20 - def __init__(self, email): + def __init__(self, email, description): self.ok =3D True =20 if email is None: self.error('Email address is missing!') return + if description is None: + self.error('Email description is missing!') + return =20 + self.description =3D "'" + description + "'" self.check_email_address(email) =20 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 =3D False if Verbose.level < Verbose.NORMAL: return @@ -174,7 +178,7 @@ class CommitMessageCheck: if s[2] !=3D ' ': self.error("There should be a space after '" + sig + ":'") =20 - EmailAddressCheck(s[3]) + EmailAddressCheck(s[3], sig) =20 return sigs =20 --=20 2.21.1