BaseTools/Source/Python/Ecc/MetaDataParser.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3011
MetaFile Copyright support below format:
# Copyright (C) 2020 Hewlett Packard Enterprise Development LP<BR>
# (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Yunhua Feng <fengyunhua@byosoft.com.cn>
---
BaseTools/Source/Python/Ecc/MetaDataParser.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/BaseTools/Source/Python/Ecc/MetaDataParser.py b/BaseTools/Source/Python/Ecc/MetaDataParser.py
index 0fd9b6c4e3..d9f0da1ee0 100644
--- a/BaseTools/Source/Python/Ecc/MetaDataParser.py
+++ b/BaseTools/Source/Python/Ecc/MetaDataParser.py
@@ -214,8 +214,12 @@ def _IsCopyrightLine (LineContent):
LineContent = LineContent.upper()
Result = False
+ #Support below Copyright format
+ # Copyright (C) 2020 Hewlett Packard Enterprise Development LP<BR>
+ # (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
ReIsCopyrightRe = re.compile(r"""(^|\s)COPYRIGHT *\(""", re.DOTALL)
- if ReIsCopyrightRe.search(LineContent):
+ ReIsCopyrightTypeB = re.compile(r"""(^|\s)\(C\)\s*COPYRIGHT""", re.DOTALL)
+ if ReIsCopyrightRe.search(LineContent) or ReIsCopyrightTypeB.search(LineContent):
Result = True
return Result
--
2.27.0.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#66434): https://edk2.groups.io/g/devel/message/66434
Mute This Topic: https://groups.io/mt/77674083/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> > -----邮件原件----- > 发件人: bounce+27952+66434+4905953+8761045@groups.io > <bounce+27952+66434+4905953+8761045@groups.io> 代表 fengyunhua > 发送时间: 2020年10月20日 10:20 > 收件人: devel@edk2.groups.io > 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao > <gaoliming@byosoft.com.cn>; Yuwei Chen <yuwei.chen@intel.com> > 主题: [edk2-devel] [PATCH] BaseTools/Ecc: Fix ECC check MetaFile Copyright > information issue > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3011 > > MetaFile Copyright support below format: > > # Copyright (C) 2020 Hewlett Packard Enterprise Development LP<BR> > # (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR> > > Cc: Bob Feng <bob.c.feng@intel.com> > Cc: Liming Gao <gaoliming@byosoft.com.cn> > Cc: Yuwei Chen <yuwei.chen@intel.com> > Signed-off-by: Yunhua Feng <fengyunhua@byosoft.com.cn> > --- > BaseTools/Source/Python/Ecc/MetaDataParser.py | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/BaseTools/Source/Python/Ecc/MetaDataParser.py > b/BaseTools/Source/Python/Ecc/MetaDataParser.py > index 0fd9b6c4e3..d9f0da1ee0 100644 > --- a/BaseTools/Source/Python/Ecc/MetaDataParser.py > +++ b/BaseTools/Source/Python/Ecc/MetaDataParser.py > @@ -214,8 +214,12 @@ def _IsCopyrightLine (LineContent): > LineContent = LineContent.upper() > Result = False > > + #Support below Copyright format > + # Copyright (C) 2020 Hewlett Packard Enterprise Development LP<BR> > + # (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR> > ReIsCopyrightRe = re.compile(r"""(^|\s)COPYRIGHT *\(""", re.DOTALL) > - if ReIsCopyrightRe.search(LineContent): > + ReIsCopyrightTypeB = re.compile(r"""(^|\s)\(C\)\s*COPYRIGHT""", > re.DOTALL) > + if ReIsCopyrightRe.search(LineContent) or > ReIsCopyrightTypeB.search(LineContent): > Result = True > > return Result > -- > 2.27.0.windows.1 > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66516): https://edk2.groups.io/g/devel/message/66516 Mute This Topic: https://groups.io/mt/77721723/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2024 Red Hat, Inc.