* Re: [edk2-devel] [PATCH 1/1] BaseTools/Scripts/PatchCheck.py: Check for Change-id
2023-11-29 0:56 ` Ni, Ray
@ 2023-11-29 1:10 ` Yuwei Chen
2023-11-29 6:40 ` Pedro Falcato
2023-11-29 9:37 ` Sami Mujawar
2 siblings, 0 replies; 10+ messages in thread
From: Yuwei Chen @ 2023-11-29 1:10 UTC (permalink / raw)
To: Ni, Ray, devel@edk2.groups.io, Pierre Gondois
Cc: Rebecca Cran, Gao, Liming, Feng, Bob C, Sami Mujawar,
YeoReum.Yun@arm.com
Ray do you mean set it as default checking?
It is a good point.
> -----Original Message-----
> From: Ni, Ray <ray.ni@intel.com>
> Sent: Wednesday, November 29, 2023 8:56 AM
> To: 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
> Subject: RE: [edk2-devel] [PATCH 1/1] BaseTools/Scripts/PatchCheck.py: Check
> for Change-id
>
> 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-Messag
> > > e- 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 (#111833): https://edk2.groups.io/g/devel/message/111833
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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] BaseTools/Scripts/PatchCheck.py: Check for Change-id
2023-11-29 0:56 ` Ni, Ray
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
2 siblings, 1 reply; 10+ messages in thread
From: Pedro Falcato @ 2023-11-29 6:40 UTC (permalink / raw)
To: devel, ray.ni
Cc: Chen, Christine, Pierre Gondois, Rebecca Cran, Gao, Liming,
Feng, Bob C, Sami Mujawar, YeoReum.Yun@arm.com
On Wed, Nov 29, 2023 at 12:56 AM Ni, Ray <ray.ni@intel.com> wrote:
>
> It's good. But I am curious why --ignore-change-id is needed?
I didn't ask, but presumably, if you have an internal gerrit instance
that runs CI before pushing, PatchCheck.py may be part of the CI
workflow; in those cases, we don't want it to error out.
So the CI would be adapted to do PatchCheck.py --ignore-change-id, and
all is well.
--
Pedro
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111836): https://edk2.groups.io/g/devel/message/111836
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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] BaseTools/Scripts/PatchCheck.py: Check for Change-id
2023-11-29 6:40 ` Pedro Falcato
@ 2023-11-29 9:53 ` Sami Mujawar
0 siblings, 0 replies; 10+ messages in thread
From: Sami Mujawar @ 2023-11-29 9:53 UTC (permalink / raw)
To: Pedro Falcato, devel@edk2.groups.io, ray.ni@intel.com
Cc: Chen, Christine, Pierre Gondois, Rebecca Cran, Gao, Liming,
Feng, Bob C, Yeo Reum Yun, nd
Hi Pedro,
On 29/11/2023, 06:40, "Pedro Falcato" <pedro.falcato@gmail.com <mailto:pedro.falcato@gmail.com>> wrote:
On Wed, Nov 29, 2023 at 12:56 AM Ni, Ray <ray.ni@intel.com <mailto:ray.ni@intel.com>> wrote:
>
> It's good. But I am curious why --ignore-change-id is needed?
I didn't ask, but presumably, if you have an internal gerrit instance
that runs CI before pushing, PatchCheck.py may be part of the CI
workflow; in those cases, we don't want it to error out.
So the CI would be adapted to do PatchCheck.py --ignore-change-id, and
all is well.
[SAMI] Just saw your email. You have summarised it well.
Regards,
Sami Mujawar
--
Pedro
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111844): https://edk2.groups.io/g/devel/message/111844
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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] BaseTools/Scripts/PatchCheck.py: Check for Change-id
2023-11-29 0:56 ` Ni, Ray
2023-11-29 1:10 ` Yuwei Chen
2023-11-29 6:40 ` Pedro Falcato
@ 2023-11-29 9:37 ` Sami Mujawar
2023-12-12 9:38 ` PierreGondois
2 siblings, 1 reply; 10+ messages in thread
From: Sami Mujawar @ 2023-11-29 9:37 UTC (permalink / raw)
To: Ni, Ray, devel@edk2.groups.io, Chen, Christine, Pierre Gondois
Cc: Rebecca Cran, Gao, Liming, Feng, Bob C, Yeo Reum Yun, nd
Hi Ray,
On 29/11/2023, 00:56, "Ni, Ray" <ray.ni@intel.com <mailto:ray.ni@intel.com>> 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 <mailto:devel@edk2.groups.io> <devel@edk2.groups.io <mailto:devel@edk2.groups.io>> On Behalf Of Yuwei
> Chen
> Sent: Wednesday, November 29, 2023 8:23 AM
> To: Pierre Gondois <pierre.gondois@arm.com <mailto:pierre.gondois@arm.com>>; devel@edk2.groups.io <mailto:devel@edk2.groups.io>
> Cc: Rebecca Cran <rebecca@bsdio.com <mailto:rebecca@bsdio.com>>; Gao, Liming
> <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn>>; Feng, Bob C <bob.c.feng@intel.com <mailto:bob.c.feng@intel.com>>; Sami
> Mujawar <sami.mujawar@arm.com <mailto:sami.mujawar@arm.com>>; YeoReum.Yun@arm.com <mailto: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 <mailto:yuwei.chen@intel.com>>
>
> > -----Original Message-----
> > From: Pierre Gondois <pierre.gondois@arm.com <mailto:pierre.gondois@arm.com>>
> > Sent: Wednesday, November 22, 2023 9:15 PM
> > To: devel@edk2.groups.io <mailto:devel@edk2.groups.io>
> > Cc: Rebecca Cran <rebecca@bsdio.com <mailto:rebecca@bsdio.com>>; Gao, Liming
> > <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn>>; Feng, Bob C <bob.c.feng@intel.com <mailto:bob.c.feng@intel.com>>; Chen,
> > Christine <yuwei.chen@intel.com <mailto:yuwei.chen@intel.com>>; Sami Mujawar
> > <sami.mujawar@arm.com <mailto:sami.mujawar@arm.com>>; YeoReum.Yun@arm.com <mailto: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 <mailto: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- <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 (#111843): https://edk2.groups.io/g/devel/message/111843
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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] BaseTools/Scripts/PatchCheck.py: Check for Change-id
2023-11-29 9:37 ` Sami Mujawar
@ 2023-12-12 9:38 ` PierreGondois
2023-12-20 22:55 ` Rebecca Cran
0 siblings, 1 reply; 10+ messages in thread
From: PierreGondois @ 2023-12-12 9:38 UTC (permalink / raw)
To: Sami Mujawar, Ni, Ray, devel@edk2.groups.io, Chen, Christine
Cc: Rebecca Cran, Gao, Liming, Feng, Bob C, Yeo Reum Yun, nd
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" <ray.ni@intel.com <mailto:ray.ni@intel.com>> 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 <mailto:devel@edk2.groups.io> <devel@edk2.groups.io <mailto:devel@edk2.groups.io>> On Behalf Of Yuwei
>> Chen
>> Sent: Wednesday, November 29, 2023 8:23 AM
>> To: Pierre Gondois <pierre.gondois@arm.com <mailto:pierre.gondois@arm.com>>; devel@edk2.groups.io <mailto:devel@edk2.groups.io>
>> Cc: Rebecca Cran <rebecca@bsdio.com <mailto:rebecca@bsdio.com>>; Gao, Liming
>> <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn>>; Feng, Bob C <bob.c.feng@intel.com <mailto:bob.c.feng@intel.com>>; Sami
>> Mujawar <sami.mujawar@arm.com <mailto:sami.mujawar@arm.com>>; YeoReum.Yun@arm.com <mailto: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 <mailto:yuwei.chen@intel.com>>
>>
>>> -----Original Message-----
>>> From: Pierre Gondois <pierre.gondois@arm.com <mailto:pierre.gondois@arm.com>>
>>> Sent: Wednesday, November 22, 2023 9:15 PM
>>> To: devel@edk2.groups.io <mailto:devel@edk2.groups.io>
>>> Cc: Rebecca Cran <rebecca@bsdio.com <mailto:rebecca@bsdio.com>>; Gao, Liming
>>> <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn>>; Feng, Bob C <bob.c.feng@intel.com <mailto:bob.c.feng@intel.com>>; Chen,
>>> Christine <yuwei.chen@intel.com <mailto:yuwei.chen@intel.com>>; Sami Mujawar
>>> <sami.mujawar@arm.com <mailto:sami.mujawar@arm.com>>; YeoReum.Yun@arm.com <mailto: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 <mailto: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- <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 (#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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] BaseTools/Scripts/PatchCheck.py: Check for Change-id
2023-12-12 9:38 ` PierreGondois
@ 2023-12-20 22:55 ` Rebecca Cran
0 siblings, 0 replies; 10+ messages in thread
From: Rebecca Cran @ 2023-12-20 22:55 UTC (permalink / raw)
To: Pierre Gondois, Sami Mujawar, Ni, Ray, devel@edk2.groups.io,
Chen, Christine
Cc: Gao, Liming, Feng, Bob C, Yeo Reum Yun, nd
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@bsdio.com>
--
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" <ray.ni@intel.com
>> <mailto:ray.ni@intel.com>> 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 <mailto:devel@edk2.groups.io>
>>> <devel@edk2.groups.io <mailto:devel@edk2.groups.io>> On Behalf Of Yuwei
>>> Chen
>>> Sent: Wednesday, November 29, 2023 8:23 AM
>>> To: Pierre Gondois <pierre.gondois@arm.com
>>> <mailto:pierre.gondois@arm.com>>; devel@edk2.groups.io
>>> <mailto:devel@edk2.groups.io>
>>> Cc: Rebecca Cran <rebecca@bsdio.com <mailto:rebecca@bsdio.com>>;
>>> Gao, Liming
>>> <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn>>; Feng,
>>> Bob C <bob.c.feng@intel.com <mailto:bob.c.feng@intel.com>>; Sami
>>> Mujawar <sami.mujawar@arm.com <mailto:sami.mujawar@arm.com>>;
>>> YeoReum.Yun@arm.com <mailto: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
>>> <mailto:yuwei.chen@intel.com>>
>>>
>>>> -----Original Message-----
>>>> From: Pierre Gondois <pierre.gondois@arm.com
>>>> <mailto:pierre.gondois@arm.com>>
>>>> Sent: Wednesday, November 22, 2023 9:15 PM
>>>> To: devel@edk2.groups.io <mailto:devel@edk2.groups.io>
>>>> Cc: Rebecca Cran <rebecca@bsdio.com <mailto:rebecca@bsdio.com>>;
>>>> Gao, Liming
>>>> <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn>>; Feng,
>>>> Bob C <bob.c.feng@intel.com <mailto:bob.c.feng@intel.com>>; Chen,
>>>> Christine <yuwei.chen@intel.com <mailto:yuwei.chen@intel.com>>;
>>>> Sami Mujawar
>>>> <sami.mujawar@arm.com <mailto:sami.mujawar@arm.com>>;
>>>> YeoReum.Yun@arm.com <mailto: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
>>>> <mailto: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-
>>>> <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]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 10+ messages in thread