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 9888A7803CD for ; Sun, 4 Feb 2024 14:50:36 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=9vd5P1Wx7jrQ3fn8wH8JHLI1b0NyCpDmcyaYQod2uCo=; 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=1707058235; v=1; b=ugW0Wt6hhFrl7Bk/ShJHINkFLtz06h+d49hYEvwWXf8crsOVYqhGdujRCl5JxlctO5r/zFAI cC7iwcQPDljqr4iwQJXhRu1aTGivxIvoshsY5lGHkNK7Vs3utMMjPCVm5+jerFFyDB3hJg5qEc6 3QWBQCLhLqdq/zUn85Xi9blA= X-Received: by 127.0.0.2 with SMTP id Z8dHYY7687511xRIhkxluWNV; Sun, 04 Feb 2024 06:50:35 -0800 X-Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by mx.groups.io with SMTP id smtpd.web10.39761.1707058234383789108 for ; Sun, 04 Feb 2024 06:50:34 -0800 X-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 1025D3200A33; Sun, 4 Feb 2024 09:50:32 -0500 (EST) X-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sun, 04 Feb 2024 09:50:33 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfedukedgieelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne goufhushhpvggtthffohhmrghinhculdegledmnecujfgurhepkfffgggfuffvvehfhfgj tgfgsehtkeertddtvdejnecuhfhrohhmpeftvggsvggttggrucevrhgrnhcuoehrvggsvg gttggrsegsshguihhordgtohhmqeenucggtffrrghtthgvrhhnpeelfeffudevveegteeh tdefudekveffleekveejteeufeeilefhffdufedtudfggfenucffohhmrghinhepghhith hhuhgsrdgtohhmpdhgihhthhhusgdrihhonecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomheprhgvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 4 Feb 2024 09:50:30 -0500 (EST) Message-ID: Date: Sun, 4 Feb 2024 07:50:24 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH v2 1/1] BaseTools/Scripts/PatchCheck.py: Check for Change-id To: Pierre Gondois , devel@edk2.groups.io Cc: Liming Gao , Bob Feng , Yuwei Chen , Sami Mujawar , Pedro Falcato , Ray Ni References: <17A2CBB8731D31AE.28867@groups.io> From: "Rebecca Cran" In-Reply-To: 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: Y7hqgcZxdzePHdKS0dlFIMoPx7686176AA= 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=ugW0Wt6h; 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 Sorry, I had forgotten about it. The change has been pushed as 056b4bf74bf5cfa2c0c9c5e44a7c5f3f461d17c0. -- Rebecca Cran On 1/31/24 08:07, Pierre Gondois wrote: > Hello Rebecca, Liming, > > Just a ping in case this was forgotten, > Regards, > Pierre > > On 12/21/23 09:32, PierreGondois via groups.io wrote: >> 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 >> Acked-by: Pedro Falcato >> Reviewed-by: Yuwei Chen >> Reviewed-by: Rebecca Cran >> --- >> >> Notes: >>      v2: >>      - Fix capitalization in helper: Change-id -> Change-Id >> >>   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..1675dcbd7321 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) -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115086): https://edk2.groups.io/g/devel/message/115086 Mute This Topic: https://groups.io/mt/104076488/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-