From: "Ni, Ray" <ray.ni@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Chen, Christine" <yuwei.chen@intel.com>,
Pierre Gondois <pierre.gondois@arm.com>
Cc: Rebecca Cran <rebecca@bsdio.com>,
"Gao, Liming" <gaoliming@byosoft.com.cn>,
"Feng, Bob C" <bob.c.feng@intel.com>,
"Sami Mujawar" <sami.mujawar@arm.com>,
"YeoReum.Yun@arm.com" <YeoReum.Yun@arm.com>
Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools/Scripts/PatchCheck.py: Check for Change-id
Date: Wed, 29 Nov 2023 00:56:10 +0000 [thread overview]
Message-ID: <MN6PR11MB8244AF99D172D65FCDB6CD508C83A@MN6PR11MB8244.namprd11.prod.outlook.com> (raw)
In-Reply-To: <MW5PR11MB5906CC6BD2641126762989969683A@MW5PR11MB5906.namprd11.prod.outlook.com>
It's good. But I am curious why --ignore-change-id is needed?
Thanks,
Ray
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Yuwei
> Chen
> Sent: Wednesday, November 29, 2023 8:23 AM
> To: Pierre Gondois <pierre.gondois@arm.com>; devel@edk2.groups.io
> Cc: Rebecca Cran <rebecca@bsdio.com>; Gao, Liming
> <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; Sami
> Mujawar <sami.mujawar@arm.com>; 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 <yuwei.chen@intel.com>
>
> > -----Original Message-----
> > From: Pierre Gondois <pierre.gondois@arm.com>
> > Sent: Wednesday, November 22, 2023 9:15 PM
> > To: devel@edk2.groups.io
> > Cc: Rebecca Cran <rebecca@bsdio.com>; Gao, Liming
> > <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; Chen,
> > Christine <yuwei.chen@intel.com>; Sami Mujawar
> > <sami.mujawar@arm.com>; 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 <Pierre.Gondois@arm.com>
> > ---
> > 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.<BR>-# Copyright (c) 2020, ARM Ltd. All
> rights
> > reserved.<BR>+# Copyright (c) 2020 - 2023, Arm Limited. All rights
> > reserved.<BR> # # 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 (#111832): https://edk2.groups.io/g/devel/message/111832
Mute This Topic: https://groups.io/mt/102748141/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2023-11-29 0:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-22 13:14 [edk2-devel] [PATCH 1/1] BaseTools/Scripts/PatchCheck.py: Check for Change-id PierreGondois
2023-11-23 2:11 ` Pedro Falcato
2023-11-29 0:23 ` Yuwei Chen
2023-11-29 0:56 ` Ni, Ray [this message]
2023-11-29 1:10 ` Yuwei Chen
2023-11-29 6:40 ` Pedro Falcato
2023-11-29 9:53 ` Sami Mujawar
2023-11-29 9:37 ` Sami Mujawar
2023-12-12 9:38 ` PierreGondois
2023-12-20 22:55 ` Rebecca Cran
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=MN6PR11MB8244AF99D172D65FCDB6CD508C83A@MN6PR11MB8244.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox