public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "fengyunhua" <fengyunhua@byosoft.com.cn>
To: devel@edk2.groups.io
Cc: Bob Feng <bob.c.feng@intel.com>,
	Liming Gao <gaoliming@byosoft.com.cn>,
	Yuwei Chen <yuwei.chen@intel.com>
Subject: [PATCH] BaseTools/Ecc: Fix ECC check MetaFile Copyright information issue
Date: Tue, 20 Oct 2020 10:20:02 +0800	[thread overview]
Message-ID: <20201020022002.2856-1-fengyunhua@byosoft.com.cn> (raw)

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



             reply	other threads:[~2020-10-20  2:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-20  2:20 fengyunhua [this message]
2020-10-22  1:11 ` 回复: [edk2-devel] [PATCH] BaseTools/Ecc: Fix ECC check MetaFile Copyright information issue gaoliming

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=20201020022002.2856-1-fengyunhua@byosoft.com.cn \
    --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