# This file is used to be the c coding style checking of ECC tool\r
#\r
# Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.<BR>\r
-# This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
#\r
\r
from __future__ import print_function\r
tuple = os.walk(RootDir)\r
IgnoredPattern = GetIgnoredDirListPattern()\r
ParseErrorFileList = []\r
+ TokenReleaceList = EccGlobalData.gConfig.TokenReleaceList\r
+ TokenReleaceList.extend(['L",\\\""'])\r
\r
for dirpath, dirnames, filenames in tuple:\r
if IgnoredPattern.match(dirpath.upper()):\r
EdkLogger.info("Parsing " + FullName)\r
model = f.endswith('c') and DataClass.MODEL_FILE_C or DataClass.MODEL_FILE_H\r
collector = CodeFragmentCollector.CodeFragmentCollector(FullName)\r
+ collector.TokenReleaceList = TokenReleaceList\r
try:\r
collector.ParseFile()\r
except UnicodeError:\r
PrintErrorMsg(ERROR_HEADER_CHECK_FILE, 'File header comment content should start with two spaces at each line', FileTable, ID)\r
\r
CommentLine = CommentLine.strip()\r
- if CommentLine.startswith('Copyright'):\r
+ if CommentLine.startswith('Copyright') or ('Copyright' in CommentLine and CommentLine.lower().startswith('(c)')):\r
NoCopyrightFlag = False\r
if CommentLine.find('All rights reserved') == -1:\r
for Copyright in EccGlobalData.gConfig.Copyright:\r