summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Ecc
diff options
context:
space:
mode:
authorHess Chen <hesheng.chen@intel.com>2018-03-21 16:07:45 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-03-27 08:58:30 +0800
commitdbc85eb993439a7006bb20091c1cc6de43d19e80 (patch)
treedaa036e4c23abb0ebe4410b666942d05898a3703 /BaseTools/Source/Python/Ecc
parente1fb441624cdb50bdf7b45afdb8071534e2cdbc3 (diff)
downloadedk2-dbc85eb993439a7006bb20091c1cc6de43d19e80.tar.gz
edk2-dbc85eb993439a7006bb20091c1cc6de43d19e80.tar.bz2
edk2-dbc85eb993439a7006bb20091c1cc6de43d19e80.zip
BaseTools/ECC: Add a new exception support
Add a new exception support for the checkPoint of no use C type. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Ecc')
-rw-r--r--BaseTools/Source/Python/Ecc/c.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Ecc/c.py b/BaseTools/Source/Python/Ecc/c.py
index 35b7405e55..39a9d8ac36 100644
--- a/BaseTools/Source/Python/Ecc/c.py
+++ b/BaseTools/Source/Python/Ecc/c.py
@@ -1,7 +1,7 @@
## @file
# This file is used to be the c coding style checking of ECC tool
#
-# Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2009 - 2018, 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
@@ -1858,7 +1858,13 @@ def CheckDeclNoUseCType(FullFileName):
for Result in ResultSet:
for Type in CTypeTuple:
if PatternInModifier(Result[0], Type):
- PrintErrorMsg(ERROR_DECLARATION_DATA_TYPE_CHECK_NO_USE_C_TYPE, 'Variable type %s' % Type, FileTable, Result[2])
+ if EccGlobalData.gException.IsException(ERROR_DECLARATION_DATA_TYPE_CHECK_NO_USE_C_TYPE,
+ Result[0] + ' ' + Result[1]):
+ continue
+ PrintErrorMsg(ERROR_DECLARATION_DATA_TYPE_CHECK_NO_USE_C_TYPE,
+ 'Invalid variable type (%s) in definition [%s]' % (Type, Result[0] + ' ' + Result[1]),
+ FileTable,
+ Result[2])
break
SqlStatement = """ select Modifier, Name, ID, Value