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 08C06AC1B33 for ; Wed, 20 Dec 2023 22:55:43 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Nms2Daqkc6tYwH1xYjuLMyhNiPX1k+tRnm+WRj17woU=; c=relaxed/simple; d=groups.io; h=Feedback-ID: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=1703112942; v=1; b=n6sqBltFWm+fb3h0cReEPEYrWlnPGL2LSVhmwyCvLoNr25lzpZ4OAcK6nwe+cXT1m2wm1ZMG f54ht1pWDFeqgxl/zEzcumk+Tr8lTZEYW5iz5Du0CatPIfS/whMpyscim6XDyjVMD49i4yy6PuT 8Ico52pO4YQgrLAXlfyG2h/A= X-Received: by 127.0.0.2 with SMTP id XeSUYY7687511x3gDSQpNZ42; Wed, 20 Dec 2023 14:55:42 -0800 X-Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mx.groups.io with SMTP id smtpd.web11.34421.1703112941777720374 for ; Wed, 20 Dec 2023 14:55:42 -0800 X-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 1A8E55C073B; Wed, 20 Dec 2023 17:55:41 -0500 (EST) X-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 20 Dec 2023 17:55:41 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvddufedgtdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne goufhushhpvggtthffohhmrghinhculdegledmnecujfgurhepkfffgggfuffvvehfhfgj tgfgsehtkeertddtvdejnecuhfhrohhmpeftvggsvggttggrucevrhgrnhcuoehrvggsvg gttggrsegsshguihhordgtohhmqeenucggtffrrghtthgvrhhnpeelfeffudevveegteeh tdefudekveffleekveejteeufeeilefhffdufedtudfggfenucffohhmrghinhepghhith hhuhgsrdgtohhmpdhgihhthhhusgdrihhonecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomheprhgvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 20 Dec 2023 17:55:39 -0500 (EST) Message-ID: <21612b0e-0063-49b0-8ed8-cdc11d93cdcf@bsdio.com> Date: Wed, 20 Dec 2023 15:55:33 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools/Scripts/PatchCheck.py: Check for Change-id To: Pierre Gondois , Sami Mujawar , "Ni, Ray" , "devel@edk2.groups.io" , "Chen, Christine" Cc: "Gao, Liming" , "Feng, Bob C" , Yeo Reum Yun , nd References: <20231122131444.1885823-1-pierre.gondois@arm.com> <25CEF31E-CECC-43BA-9632-3188A3D282F4@arm.com> <510ce3f1-b849-4a49-a0fd-4699505e2bd7@arm.com> From: "Rebecca Cran" In-Reply-To: <510ce3f1-b849-4a49-a0fd-4699505e2bd7@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,rebecca@bsdio.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 1wKgf2Pk1C3ULSCtSa6JrooSx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=n6sqBltF; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Thanks for the reminder - I'm catching up on patches today. One nit that would be good to fix before being merged: the help for "--ignore-change-id" should use the same capitalization of 'Change-Id' as the rest of the code (i.e. 'Change-Id' not 'Change-id'). With that fixed: Reviewed-by: Rebecca Cran -- Rebecca Cran On 12/12/2023 2:38 AM, Pierre Gondois wrote: > 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, >> >> On 29/11/2023, 00:56, "Ni, Ray" > > wrote: >> >> >> 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 for checking patches before they are posted on the list. >> >> Regards, >> >> Sami Mujawar >> >> 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, Liming >>> >; Feng, >>> Bob C >; Sami >>> Mujawar >; >>> YeoReum.Yun@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, Liming >>>> >; Feng, >>>> Bob C >; Chen, >>>> Christine >; >>>> Sami Mujawar >>>> >; >>>> YeoReum.Yun@arm.com >>>> 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 above >>>> 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.
# >>>> Copyright (C) 2020, Red Hat, Inc.
-# Copyright (c) 2020, ARM >>>> Ltd. All >>> 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 = range(3) level = NORMAL +class >>>> PatchCheckConf:+ ignore_change_id = 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 = >>>> 'https://github.com/tianocore/tianocore.github.io/wiki/Commit-Message- >>>> >>>> Format'@@ -307,6 +312,12 @@ class CommitMessageCheck: >>>> break last_sig_line = line.strip() + def >>>> check_change_id_format(self):+ cid='Change-Id:'+ if >>>> self.msg.find(cid) != -1:+ self.error('\"%s\" found in commit >>> message:' % >>>> cid)+ return+ (START, PRE_PATCH, PATCH) = range(3) class >>>> GitDiffCheck:@@ -780,11 +791,16 @@ class PatchCheckApp: >>>> group.add_argument("--silent", action="store_true", >>>> help="Print nothing")+ group.add_argument("--ignore-change-id",+ >>>> action="store_true",+ help="Ignore the presence of 'Change- >>>> id:' tags in commit message") self.args = parser.parse_args() if >>>> self.args.oneline: Verbose.level = Verbose.ONELINE if >>>> self.args.silent: Verbose.level = Verbose.SILENT+ if >>>> self.args.ignore_change_id:+ PatchCheckConf.ignore_change_id = True >>>> if __name__ == "__main__": sys.exit(PatchCheckApp().retval)-- >>>> 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112773): https://edk2.groups.io/g/devel/message/112773 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] -=-=-=-=-=-=-=-=-=-=-=-