summaryrefslogtreecommitdiffstats
path: root/BaseTools
diff options
context:
space:
mode:
authorYunhua Feng <fengyunhua@byosoft.com.cn>2020-10-20 10:20:02 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-10-27 06:50:06 +0000
commiteb520b93d279e901a593c57e30649fb08f4290c5 (patch)
tree1cd4b4ec4599bc256e979b95abd614301cc7177a /BaseTools
parent31e97bdae2c66e28c5c7df1340757304e1b76d41 (diff)
downloadedk2-eb520b93d279e901a593c57e30649fb08f4290c5.tar.gz
edk2-eb520b93d279e901a593c57e30649fb08f4290c5.tar.bz2
edk2-eb520b93d279e901a593c57e30649fb08f4290c5.zip
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> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/Python/Ecc/MetaDataParser.py6
1 files changed, 5 insertions, 1 deletions
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