public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [patch] BaseTools/Ecc
@ 2017-05-10  1:29 hesschen
  2017-05-11  1:24 ` Zhu, Yonghong
  0 siblings, 1 reply; 4+ messages in thread
From: hesschen @ 2017-05-10  1:29 UTC (permalink / raw)
  To: edk2-devel

Add line break support for exception list.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: hesschen <hesheng.chen@intel.com>
---
 BaseTools/Source/Python/Ecc/Exception.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/Ecc/Exception.py b/BaseTools/Source/Python/Ecc/Exception.py
index fffbf30..b0882af 100644
--- a/BaseTools/Source/Python/Ecc/Exception.py
+++ b/BaseTools/Source/Python/Ecc/Exception.py
@@ -1,7 +1,7 @@
 ## @file
 # This file is used to parse exception items found by ECC tool
 #
-# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2009 - 2017, 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 accompanies this distribution.  The full text of the license may be found at
@@ -72,7 +72,7 @@ class ExceptionCheck(object):
             self.ExceptionList = self.ExceptionListXml.ToList()
     
     def IsException(self, ErrorID, KeyWord, FileID=-1):
-        if (str(ErrorID), KeyWord) in self.ExceptionList:
+        if (str(ErrorID), KeyWord.replace('\r\n', '\n')) in self.ExceptionList:
             return True
         else:
             return False
-- 
2.7.2.windows.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [patch] BaseTools/Ecc
@ 2016-12-27 10:10 hesschen
  2016-12-28  9:47 ` Zhu, Yonghong
  0 siblings, 1 reply; 4+ messages in thread
From: hesschen @ 2016-12-27 10:10 UTC (permalink / raw)
  To: edk2-devel; +Cc: yonghong.zhu, Hess Chen

Fix the issue of not recognizing "FILE_GUID"

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Signed-off-by: hesschen <hesheng.chen@intel.com>
---
 BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py
index aaea1ab..ba478f9 100644
--- a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py
+++ b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py
@@ -783,6 +783,10 @@ class DscParser(MetaFileParser):
         "FIX_LOAD_TOP_MEMORY_ADDRESS"
     ]
 
+    SubSectionDefineKeywords = [
+        "FILE_GUID"
+    ]
+
     SymbolPattern = ValueExpression.SymbolPattern
 
     ## Constructor of DscParser
@@ -993,7 +997,8 @@ class DscParser(MetaFileParser):
         if not self._ValueList[2]:
             EdkLogger.error('Parser', FORMAT_INVALID, "No value specified",
                             ExtraData=self._CurrentLine, File=self.MetaFile, Line=self._LineIndex+1)
-        if not self._ValueList[1] in self.DefineKeywords:
+        if (not self._ValueList[1] in self.DefineKeywords and
+            (self._InSubsection and self._ValueList[1] not in self.SubSectionDefineKeywords)):
             EdkLogger.error('Parser', FORMAT_INVALID,
                             "Unknown keyword found: %s. "
                             "If this is a macro you must "
-- 
2.7.2.windows.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-05-11  1:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-10  1:29 [patch] BaseTools/Ecc hesschen
2017-05-11  1:24 ` Zhu, Yonghong
  -- strict thread matches above, loose matches on Subject: below --
2016-12-27 10:10 hesschen
2016-12-28  9:47 ` Zhu, Yonghong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox