From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 179EDD80D0C for ; Tue, 12 Dec 2023 09:38:46 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=IObmzjwvUOV/tU+/QrrZq3pf3c3v0Tm1f/7gVGn/UeY=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1702373925; v=1; b=Th2evmls2eys5rSRXqc38ut/ER4U+rOjNlevX7IBeRime6I6qo6/CTv20mhAAz/AWNH2FRUR XNyY2KXfQqV7x8lHUBkc8MfeRMMU7aMiEXEqYp1j/4+EVYY8VVKXU0SMtmtPlFJSwe35F5qU+Ye YK+x2Z9AsBc9ZUcbd112YN0Y= X-Received: by 127.0.0.2 with SMTP id 6RlSYY7687511xaNXILLBz9I; Tue, 12 Dec 2023 01:38:45 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.13091.1702373924927413229 for ; Tue, 12 Dec 2023 01:38:45 -0800 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 16082143D; Tue, 12 Dec 2023 01:39:31 -0800 (PST) X-Received: from [10.57.44.69] (unknown [10.57.44.69]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9E9623F5A1; Tue, 12 Dec 2023 01:38:41 -0800 (PST) Message-ID: <510ce3f1-b849-4a49-a0fd-4699505e2bd7@arm.com> Date: Tue, 12 Dec 2023 10:38:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools/Scripts/PatchCheck.py: Check for Change-id To: Sami Mujawar , "Ni, Ray" , "devel@edk2.groups.io" , "Chen, Christine" Cc: Rebecca Cran , "Gao, Liming" , "Feng, Bob C" , Yeo Reum Yun , nd References: <20231122131444.1885823-1-pierre.gondois@arm.com> <25CEF31E-CECC-43BA-9632-3188A3D282F4@arm.com> From: "PierreGondois" In-Reply-To: <25CEF31E-CECC-43BA-9632-3188A3D282F4@arm.com> Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: X2GnnxAQZvA1jYGCGMGUjxd3x7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=Th2evmls; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none) Hello BaseTools maintainers, Just a ping in case you have any comment for this patch, Regards, Pierre On 11/29/23 10:37, Sami Mujawar wrote: > Hi Ray, >=20 > =EF=BB=BFOn 29/11/2023, 00:56, "Ni, Ray" > wrote: >=20 >=20 > It's good. But I am curious why --ignore-change-id is needed? > [SAMI] This option can be useful if an internal CI uses the same script f= or checking patches before they are posted on the list. >=20 > Regards, >=20 > Sami Mujawar >=20 > Thanks, > Ray >> -----Original Message----- >> From: devel@edk2.groups.io > On Behalf Of Yuwei >> Chen >> Sent: Wednesday, November 29, 2023 8:23 AM >> To: Pierre Gondois >; devel@edk2.groups.io >> Cc: Rebecca Cran >; Gao, Li= ming >> >; Feng, Bob = C >; Sami >> Mujawar >; YeoReum.Yu= n@arm.com >> Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools/Scripts/PatchCheck.py: >> Check for Change-id >> >> The patch is good for me. >> >> Reviewed-by: Yuwei Chen > >> >>> -----Original Message----- >>> From: Pierre Gondois > >>> Sent: Wednesday, November 22, 2023 9:15 PM >>> To: devel@edk2.groups.io >>> Cc: Rebecca Cran >; Gao, L= iming >>> >; Feng, Bob= C >; Chen, >>> Christine >; Sami Mu= jawar >>> >; YeoReum.Yun@arm.c= om >>> Subject: [PATCH 1/1] BaseTools/Scripts/PatchCheck.py: Check for Change-= id >>> >>> Code review tools like gerrit might use a 'Change-id' tag to track the = evolution >>> of patches. This tag should be removed before submitting a patch to the >>> mailing-list. >>> It has been observed that contributors sometimes forget to remove this = tag. >>> Add a check in PatchCheck.py to automate this. >>> >>> Also add a '--ignore-change-id' command line parameter to ignore the ab= ove >>> check. >>> >>> Signed-off-by: Pierre Gondois > >>> --- >>> BaseTools/Scripts/PatchCheck.py | 18 +++++++++++++++++- >>> 1 file changed, 17 insertions(+), 1 deletion(-) >>> >>> diff --git a/BaseTools/Scripts/PatchCheck.py >>> b/BaseTools/Scripts/PatchCheck.py index 7f372d40b570..7770d1e37318 >>> 100755 >>> --- a/BaseTools/Scripts/PatchCheck.py >>> +++ b/BaseTools/Scripts/PatchCheck.py >>> @@ -3,7 +3,7 @@ >>> # # Copyright (c) 2015 - 2021, Intel Corporation. All rights reserved.<= BR> # >>> Copyright (C) 2020, Red Hat, Inc.
-# Copyright (c) 2020, ARM Ltd. Al= l >> rights >>> reserved.
+# Copyright (c) 2020 - 2023, Arm Limited. All rights >>> reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent #@@ -26,= 6 >>> +26,9 @@ class Verbose: >>> SILENT, ONELINE, NORMAL =3D range(3) level =3D NORMAL +class >>> PatchCheckConf:+ ignore_change_id =3D False+ class EmailAddressCheck: >>> """Checks an email address.""" @@ -111,6 +114,8 @@ class >>> CommitMessageCheck: >>> self.check_signed_off_by() self.check_misc_signatures() >>> self.check_overall_format()+ if not PatchCheckConf.ignore_change_id:+ >>> self.check_change_id_format() self.report_message_result() url =3D >>> 'https://github.com/tianocore/tianocore.github.io/wiki/Commit-Message- = >>> Format'@@ -307,6 +312,12 @@ class CommitMessageCheck: >>> break last_sig_line =3D line.strip() + def >>> check_change_id_format(self):+ cid=3D'Change-Id:'+ if >>> self.msg.find(cid) !=3D -1:+ self.error('\"%s\" found in commit >> message:' % >>> cid)+ return+ (START, PRE_PATCH, PATCH) =3D range(3) class >>> GitDiffCheck:@@ -780,11 +791,16 @@ class PatchCheckApp: >>> group.add_argument("--silent", action=3D"store_true", >>> help=3D"Print nothing")+ group.add_argument("--ignore-change-id",+ >>> action=3D"store_true",+ help=3D"Ignore the presence of 'Change- >>> id:' tags in commit message") self.args =3D parser.parse_args() if >>> self.args.oneline: Verbose.level =3D Verbose.ONELINE if >>> self.args.silent: Verbose.level =3D Verbose.SILENT+ if >>> self.args.ignore_change_id:+ PatchCheckConf.ignore_change_id =3D True >>> if __name__ =3D=3D "__main__": sys.exit(PatchCheckApp().retval)-- >>> 2.25.1 >> >> >> >>=20 >> >=20 >=20 >=20 >=20 >=20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112382): https://edk2.groups.io/g/devel/message/112382 Mute This Topic: https://groups.io/mt/102748141/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-