* [PATCH] BaseTools/ECC: Add a new exception support
@ 2018-03-21 8:22 Yonghong Zhu
2018-03-27 0:57 ` Zhu, Yonghong
0 siblings, 1 reply; 2+ messages in thread
From: Yonghong Zhu @ 2018-03-21 8:22 UTC (permalink / raw)
To: edk2-devel; +Cc: Hess Chen
From: Hess Chen <hesheng.chen@intel.com>
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>
---
BaseTools/Source/Python/Ecc/c.py | 10 ++++++++--
1 file 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
--
2.14.2.windows.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] BaseTools/ECC: Add a new exception support
2018-03-21 8:22 [PATCH] BaseTools/ECC: Add a new exception support Yonghong Zhu
@ 2018-03-27 0:57 ` Zhu, Yonghong
0 siblings, 0 replies; 2+ messages in thread
From: Zhu, Yonghong @ 2018-03-27 0:57 UTC (permalink / raw)
To: Zhu, Yonghong, edk2-devel@lists.01.org; +Cc: Chen, Hesheng, Zhu, Yonghong
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Best Regards,
Zhu Yonghong
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Yonghong Zhu
Sent: Wednesday, March 21, 2018 4:23 PM
To: edk2-devel@lists.01.org
Cc: Chen, Hesheng <hesheng.chen@intel.com>
Subject: [edk2] [PATCH] BaseTools/ECC: Add a new exception support
From: Hess Chen <hesheng.chen@intel.com>
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>
---
BaseTools/Source/Python/Ecc/c.py | 10 ++++++++--
1 file 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
--
2.14.2.windows.2
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-27 0:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-21 8:22 [PATCH] BaseTools/ECC: Add a new exception support Yonghong Zhu
2018-03-27 0:57 ` Zhu, Yonghong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox