On 2019-04-04 15:43:01, Michael D Kinney wrote:
> https://bugzilla.tianocore.org/show_bug.cgi?id=1655
>
> With the change to BSD+Patent License, the TianoCore Contributor's
> Agreement has been removed and as a result, a Contributed under
> tag is no longer appropriate in patches. Remove the check for
> the TianoCore Contributor's Agreement and instead, generate an
> error if a patch contains a Contributed under tag in the commit
> message.
>
> Cc: Jordan Justen <[email protected]>
> Cc: Bob Feng <[email protected]>
> Cc: Liming Gao <[email protected]>
> Cc: Yonghong Zhu <[email protected]>
> Signed-off-by: Michael D Kinney <[email protected]>
> ---
> BaseTools/Scripts/PatchCheck.py | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py
> index 0b580f3b31..19a7159358 100755
> --- a/BaseTools/Scripts/PatchCheck.py
> +++ b/BaseTools/Scripts/PatchCheck.py
> @@ -1,7 +1,7 @@
> ## @file
> # Check a patch for various format issues
> #
> -# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
> +# Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.<BR>
> #
> # This program and the accompanying materials are licensed and made
> # available under the terms and conditions of the BSD License which
> @@ -75,13 +75,9 @@ class CommitMessageCheck:
> count += 1
>
> def check_contributed_under(self):
> - cu_msg='Contributed-under: TianoCore Contribution Agreement 1.1'
> - if self.msg.find(cu_msg) < 0:
> - # Allow 1.0 for now while EDK II community transitions to 1.1
> - cu_msg='Contributed-under: TianoCore Contribution Agreement 1.0'
> - if self.msg.find(cu_msg) < 0:
> - self.error('Missing Contributed-under! (Note: this must be '
> +
> - 'added by the code contributor!)')
> + if self.msg.find('Contributed-under') >= 0:
> + self.error('Contributed-under! (Note: this must be ' +
> + 'removed by the code contributor!)')
I don't think it's too important, but what about something like?
contributed_under_re = \
re.compile(r'^\s*contributed-under\s*:', re.MULTILINE|re.IGNORECASE)
def check_contributed_under(self):
mo = self.contributed_under_re.search(self.msg)
if mo is not None:
self.error('Contributed-under! (Note: this must be ' +
'removed by the code contributor!)')
* only find 'contributed-under:' at the start of the line
* ignore case
* adds checking for the ':'
* also catches if they put a space before the c-u tag
It might let you have 'Contributed-under' in your commit message
without triggering the error. :)
Like I said, not too important, and either way:
Reviewed-by: Jordan Justen <[email protected]>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#38600): https://edk2.groups.io/g/devel/message/38600
Mute This Topic: https://groups.io/mt/30911614/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-