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 73CE87803D8 for ; Wed, 31 Jan 2024 15:07:25 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=a7tGov9GmbQIogQoGYWrgCBaGl35ZcQC19hP8C5SJNw=; 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=1706713644; v=1; b=E0jRlBprBLzbUvSdwH5JrOaVHKURy3LUlfcY4kj2xiHAtSYVUsQHL9+kt2dKJYyk34/GVJ9t 0HKjbyXWh/D9hn+JKGYDmQI8POhIyJJ7J191xEg3Guwms1JBH8f8Ary6Ghf337Q9uclcvUxOXSP oeKA11SqEPF7upcblJQLZw5A= X-Received: by 127.0.0.2 with SMTP id 5XaOYY7687511xufG7XHv0Xu; Wed, 31 Jan 2024 07:07:24 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.16160.1706713643336597702 for ; Wed, 31 Jan 2024 07:07:23 -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 1DE85DA7; Wed, 31 Jan 2024 07:08:06 -0800 (PST) X-Received: from [10.34.100.129] (e126645.nice.arm.com [10.34.100.129]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B095E3F762; Wed, 31 Jan 2024 07:07:21 -0800 (PST) Message-ID: Date: Wed, 31 Jan 2024 16:07:20 +0100 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: devel@edk2.groups.io Cc: Rebecca Cran , Liming Gao , Bob Feng , Yuwei Chen , Sami Mujawar , Pedro Falcato , Ray Ni References: <17A2CBB8731D31AE.28867@groups.io> From: "PierreGondois" In-Reply-To: <17A2CBB8731D31AE.28867@groups.io> 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: iuWdbDuWMCeurlCJ5TQd3H12x7686176AA= 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=E0jRlBpr; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=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 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. >=20 > Also add a '--ignore-change-id' command line parameter to ignore > the above check. >=20 > Signed-off-by: Pierre Gondois > Acked-by: Pedro Falcato > Reviewed-by: Yuwei Chen > Reviewed-by: Rebecca Cran > --- >=20 > Notes: > v2: > - Fix capitalization in helper: Change-id -> Change-Id >=20 > BaseTools/Scripts/PatchCheck.py | 18 +++++++++++++++++- > 1 file changed, 17 insertions(+), 1 deletion(-) >=20 > diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchChe= ck.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 =3D range(3) > level =3D NORMAL > =20 > +class PatchCheckConf: > + ignore_change_id =3D False > + > class EmailAddressCheck: > """Checks an email address.""" > =20 > @@ -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() > =20 > url =3D 'https://github.com/tianocore/tianocore.github.io/wiki/Comm= it-Message-Format' > @@ -307,6 +312,12 @@ class CommitMessageCheck: > break > last_sig_line =3D line.strip() > =20 > + 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) > =20 > 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:' t= ags 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 > =20 > if __name__ =3D=3D "__main__": > sys.exit(PatchCheckApp().retval) -=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 (#114904): https://edk2.groups.io/g/devel/message/114904 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] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-