* [PATCH] BaseTools/ECC: Add a checkpoint to check no usage for deprecated functions.
@ 2018-10-17 2:25 Yonghong Zhu
2018-10-17 15:48 ` Carsey, Jaben
0 siblings, 1 reply; 3+ messages in thread
From: Yonghong Zhu @ 2018-10-17 2:25 UTC (permalink / raw)
To: edk2-devel; +Cc: Hess Chen
From: Hess Chen <hesheng.chen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
---
BaseTools/Source/Python/Ecc/Check.py | 60 ++++++++++++++++++++++++++++
BaseTools/Source/Python/Ecc/Configuration.py | 3 ++
BaseTools/Source/Python/Ecc/EccToolError.py | 2 +
BaseTools/Source/Python/Ecc/config.ini | 2 +
4 files changed, 67 insertions(+)
diff --git a/BaseTools/Source/Python/Ecc/Check.py b/BaseTools/Source/Python/Ecc/Check.py
index eb086362bd..3baf81fa44 100644
--- a/BaseTools/Source/Python/Ecc/Check.py
+++ b/BaseTools/Source/Python/Ecc/Check.py
@@ -270,6 +270,66 @@ class Check(object):
self.FunctionLayoutCheckPrototype()
self.FunctionLayoutCheckBody()
self.FunctionLayoutCheckLocalVariable()
+ self.FunctionLayoutCheckDeprecated()
+
+ # To check if the deprecated functions are used
+ def FunctionLayoutCheckDeprecated(self):
+ if EccGlobalData.gConfig.CFunctionLayoutCheckNoDeprecated == '1' or EccGlobalData.gConfig.CFunctionLayoutCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
+ EdkLogger.quiet("Checking function no deprecated one being used ...")
+
+ DeprecatedFunctionList = ['UnicodeValueToString',
+ 'AsciiValueToString',
+ 'StrCpy',
+ 'StrnCpy',
+ 'StrCat',
+ 'StrnCat',
+ 'UnicodeStrToAsciiStr',
+ 'AsciiStrCpy',
+ 'AsciiStrnCpy',
+ 'AsciiStrCat',
+ 'AsciiStrnCat',
+ 'AsciiStrToUnicodeStr',
+ 'PcdSet8',
+ 'PcdSet16',
+ 'PcdSet32',
+ 'PcdSet64',
+ 'PcdSetPtr',
+ 'PcdSetBool',
+ 'PcdSetEx8',
+ 'PcdSetEx16',
+ 'PcdSetEx32',
+ 'PcdSetEx64',
+ 'PcdSetExPtr',
+ 'PcdSetExBool',
+ 'LibPcdSet8',
+ 'LibPcdSet16',
+ 'LibPcdSet32',
+ 'LibPcdSet64',
+ 'LibPcdSetPtr',
+ 'LibPcdSetBool',
+ 'LibPcdSetEx8',
+ 'LibPcdSetEx16',
+ 'LibPcdSetEx32',
+ 'LibPcdSetEx64',
+ 'LibPcdSetExPtr',
+ 'LibPcdSetExBool',
+ 'GetVariable',
+ 'GetEfiGlobalVariable',
+ ]
+
+ for IdentifierTable in EccGlobalData.gIdentifierTableList:
+ SqlCommand = """select ID, Name, BelongsToFile from %s
+ where Model = %s """ % (IdentifierTable, MODEL_IDENTIFIER_FUNCTION_CALLING)
+ RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)
+ for Record in RecordSet:
+ for Key in DeprecatedFunctionList:
+ if Key == Record[1]:
+ if not EccGlobalData.gException.IsException(ERROR_C_FUNCTION_LAYOUT_CHECK_NO_DEPRECATE, Key):
+ OtherMsg = 'The function [%s] is deprecated which should NOT be used' % Key
+ EccGlobalData.gDb.TblReport.Insert(ERROR_C_FUNCTION_LAYOUT_CHECK_NO_DEPRECATE,
+ OtherMsg=OtherMsg,
+ BelongsToTable=IdentifierTable,
+ BelongsToItem=Record[0])
def WalkTree(self):
IgnoredPattern = c.GetIgnoredDirListPattern()
diff --git a/BaseTools/Source/Python/Ecc/Configuration.py b/BaseTools/Source/Python/Ecc/Configuration.py
index c19a3990c7..8f6886169c 100644
--- a/BaseTools/Source/Python/Ecc/Configuration.py
+++ b/BaseTools/Source/Python/Ecc/Configuration.py
@@ -34,6 +34,7 @@ _ConfigFileToInternalTranslation = {
"CFunctionLayoutCheckFunctionBody":"CFunctionLayoutCheckFunctionBody",
"CFunctionLayoutCheckFunctionName":"CFunctionLayoutCheckFunctionName",
"CFunctionLayoutCheckFunctionPrototype":"CFunctionLayoutCheckFunctionPrototype",
+ "CFunctionLayoutCheckNoDeprecated":"CFunctionLayoutCheckNoDeprecated",
"CFunctionLayoutCheckNoInitOfVariable":"CFunctionLayoutCheckNoInitOfVariable",
"CFunctionLayoutCheckNoStatic":"CFunctionLayoutCheckNoStatic",
"CFunctionLayoutCheckOptionalFunctionalModifier":"CFunctionLayoutCheckOptionalFunctionalModifier",
@@ -242,6 +243,8 @@ class Configuration(object):
self.CFunctionLayoutCheckNoInitOfVariable = 1
# Check whether no use of STATIC for functions
self.CFunctionLayoutCheckNoStatic = 1
+ # Check whether no use of Deprecated functions
+ self.CFunctionLayoutCheckNoDeprecated = 1
## Include Files Checking
self.IncludeFileCheckAll = 0
diff --git a/BaseTools/Source/Python/Ecc/EccToolError.py b/BaseTools/Source/Python/Ecc/EccToolError.py
index e327a7888d..7663e90d7e 100644
--- a/BaseTools/Source/Python/Ecc/EccToolError.py
+++ b/BaseTools/Source/Python/Ecc/EccToolError.py
@@ -47,6 +47,7 @@ ERROR_C_FUNCTION_LAYOUT_CHECK_NO_INIT_OF_VARIABLE = 5007
ERROR_C_FUNCTION_LAYOUT_CHECK_NO_STATIC = 5008
ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_2 = 5009
ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_3 = 5010
+ERROR_C_FUNCTION_LAYOUT_CHECK_NO_DEPRECATE = 5011
ERROR_INCLUDE_FILE_CHECK_ALL = 6000
ERROR_INCLUDE_FILE_CHECK_IFNDEF_STATEMENT_1 = 6001
@@ -146,6 +147,7 @@ gEccErrorMessage = {
ERROR_C_FUNCTION_LAYOUT_CHECK_DATA_DECLARATION : "The data declarations should be the first code in a module",
ERROR_C_FUNCTION_LAYOUT_CHECK_NO_INIT_OF_VARIABLE : "There should be no initialization of a variable as part of its declaration",
ERROR_C_FUNCTION_LAYOUT_CHECK_NO_STATIC : "There should be no use of STATIC for functions",
+ ERROR_C_FUNCTION_LAYOUT_CHECK_NO_DEPRECATE : "The deprecated function should NOT be used",
ERROR_INCLUDE_FILE_CHECK_ALL : "",
ERROR_INCLUDE_FILE_CHECK_IFNDEF_STATEMENT_1 : "All include file contents should be guarded by a #ifndef statement.",
diff --git a/BaseTools/Source/Python/Ecc/config.ini b/BaseTools/Source/Python/Ecc/config.ini
index 00c98c6232..663ae293bd 100644
--- a/BaseTools/Source/Python/Ecc/config.ini
+++ b/BaseTools/Source/Python/Ecc/config.ini
@@ -134,6 +134,8 @@ CFunctionLayoutCheckDataDeclaration = 1
CFunctionLayoutCheckNoInitOfVariable = 1
# Check whether no use of STATIC for functions
CFunctionLayoutCheckNoStatic = 1
+# Check whether no use of Deprecated functions
+CFunctionLayoutCheckNoDeprecated = 1
#
# Include Files Checking
--
2.14.2.windows.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] BaseTools/ECC: Add a checkpoint to check no usage for deprecated functions.
2018-10-17 2:25 [PATCH] BaseTools/ECC: Add a checkpoint to check no usage for deprecated functions Yonghong Zhu
@ 2018-10-17 15:48 ` Carsey, Jaben
2018-10-18 0:44 ` Chen, Hesheng
0 siblings, 1 reply; 3+ messages in thread
From: Carsey, Jaben @ 2018-10-17 15:48 UTC (permalink / raw)
To: Zhu, Yonghong; +Cc: edk2-devel@lists.01.org, Chen, Hesheng
Propose to use a set not a list when the data is unordered and unique names of functions.
With that: reviewed-by:Jaben.carsey <Jaben.carsey@intel.com>
> On Oct 16, 2018, at 7:25 PM, Yonghong Zhu <yonghong.zhu@intel.com> wrote:
>
> From: Hess Chen <hesheng.chen@intel.com>
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Hess Chen <hesheng.chen@intel.com>
> ---
> BaseTools/Source/Python/Ecc/Check.py | 60 ++++++++++++++++++++++++++++
> BaseTools/Source/Python/Ecc/Configuration.py | 3 ++
> BaseTools/Source/Python/Ecc/EccToolError.py | 2 +
> BaseTools/Source/Python/Ecc/config.ini | 2 +
> 4 files changed, 67 insertions(+)
>
> diff --git a/BaseTools/Source/Python/Ecc/Check.py b/BaseTools/Source/Python/Ecc/Check.py
> index eb086362bd..3baf81fa44 100644
> --- a/BaseTools/Source/Python/Ecc/Check.py
> +++ b/BaseTools/Source/Python/Ecc/Check.py
> @@ -270,6 +270,66 @@ class Check(object):
> self.FunctionLayoutCheckPrototype()
> self.FunctionLayoutCheckBody()
> self.FunctionLayoutCheckLocalVariable()
> + self.FunctionLayoutCheckDeprecated()
> +
> + # To check if the deprecated functions are used
> + def FunctionLayoutCheckDeprecated(self):
> + if EccGlobalData.gConfig.CFunctionLayoutCheckNoDeprecated == '1' or EccGlobalData.gConfig.CFunctionLayoutCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
> + EdkLogger.quiet("Checking function no deprecated one being used ...")
> +
> + DeprecatedFunctionList = ['UnicodeValueToString',
> + 'AsciiValueToString',
> + 'StrCpy',
> + 'StrnCpy',
> + 'StrCat',
> + 'StrnCat',
> + 'UnicodeStrToAsciiStr',
> + 'AsciiStrCpy',
> + 'AsciiStrnCpy',
> + 'AsciiStrCat',
> + 'AsciiStrnCat',
> + 'AsciiStrToUnicodeStr',
> + 'PcdSet8',
> + 'PcdSet16',
> + 'PcdSet32',
> + 'PcdSet64',
> + 'PcdSetPtr',
> + 'PcdSetBool',
> + 'PcdSetEx8',
> + 'PcdSetEx16',
> + 'PcdSetEx32',
> + 'PcdSetEx64',
> + 'PcdSetExPtr',
> + 'PcdSetExBool',
> + 'LibPcdSet8',
> + 'LibPcdSet16',
> + 'LibPcdSet32',
> + 'LibPcdSet64',
> + 'LibPcdSetPtr',
> + 'LibPcdSetBool',
> + 'LibPcdSetEx8',
> + 'LibPcdSetEx16',
> + 'LibPcdSetEx32',
> + 'LibPcdSetEx64',
> + 'LibPcdSetExPtr',
> + 'LibPcdSetExBool',
> + 'GetVariable',
> + 'GetEfiGlobalVariable',
> + ]
> +
> + for IdentifierTable in EccGlobalData.gIdentifierTableList:
> + SqlCommand = """select ID, Name, BelongsToFile from %s
> + where Model = %s """ % (IdentifierTable, MODEL_IDENTIFIER_FUNCTION_CALLING)
> + RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)
> + for Record in RecordSet:
> + for Key in DeprecatedFunctionList:
> + if Key == Record[1]:
> + if not EccGlobalData.gException.IsException(ERROR_C_FUNCTION_LAYOUT_CHECK_NO_DEPRECATE, Key):
> + OtherMsg = 'The function [%s] is deprecated which should NOT be used' % Key
> + EccGlobalData.gDb.TblReport.Insert(ERROR_C_FUNCTION_LAYOUT_CHECK_NO_DEPRECATE,
> + OtherMsg=OtherMsg,
> + BelongsToTable=IdentifierTable,
> + BelongsToItem=Record[0])
>
> def WalkTree(self):
> IgnoredPattern = c.GetIgnoredDirListPattern()
> diff --git a/BaseTools/Source/Python/Ecc/Configuration.py b/BaseTools/Source/Python/Ecc/Configuration.py
> index c19a3990c7..8f6886169c 100644
> --- a/BaseTools/Source/Python/Ecc/Configuration.py
> +++ b/BaseTools/Source/Python/Ecc/Configuration.py
> @@ -34,6 +34,7 @@ _ConfigFileToInternalTranslation = {
> "CFunctionLayoutCheckFunctionBody":"CFunctionLayoutCheckFunctionBody",
> "CFunctionLayoutCheckFunctionName":"CFunctionLayoutCheckFunctionName",
> "CFunctionLayoutCheckFunctionPrototype":"CFunctionLayoutCheckFunctionPrototype",
> + "CFunctionLayoutCheckNoDeprecated":"CFunctionLayoutCheckNoDeprecated",
> "CFunctionLayoutCheckNoInitOfVariable":"CFunctionLayoutCheckNoInitOfVariable",
> "CFunctionLayoutCheckNoStatic":"CFunctionLayoutCheckNoStatic",
> "CFunctionLayoutCheckOptionalFunctionalModifier":"CFunctionLayoutCheckOptionalFunctionalModifier",
> @@ -242,6 +243,8 @@ class Configuration(object):
> self.CFunctionLayoutCheckNoInitOfVariable = 1
> # Check whether no use of STATIC for functions
> self.CFunctionLayoutCheckNoStatic = 1
> + # Check whether no use of Deprecated functions
> + self.CFunctionLayoutCheckNoDeprecated = 1
>
> ## Include Files Checking
> self.IncludeFileCheckAll = 0
> diff --git a/BaseTools/Source/Python/Ecc/EccToolError.py b/BaseTools/Source/Python/Ecc/EccToolError.py
> index e327a7888d..7663e90d7e 100644
> --- a/BaseTools/Source/Python/Ecc/EccToolError.py
> +++ b/BaseTools/Source/Python/Ecc/EccToolError.py
> @@ -47,6 +47,7 @@ ERROR_C_FUNCTION_LAYOUT_CHECK_NO_INIT_OF_VARIABLE = 5007
> ERROR_C_FUNCTION_LAYOUT_CHECK_NO_STATIC = 5008
> ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_2 = 5009
> ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_3 = 5010
> +ERROR_C_FUNCTION_LAYOUT_CHECK_NO_DEPRECATE = 5011
>
> ERROR_INCLUDE_FILE_CHECK_ALL = 6000
> ERROR_INCLUDE_FILE_CHECK_IFNDEF_STATEMENT_1 = 6001
> @@ -146,6 +147,7 @@ gEccErrorMessage = {
> ERROR_C_FUNCTION_LAYOUT_CHECK_DATA_DECLARATION : "The data declarations should be the first code in a module",
> ERROR_C_FUNCTION_LAYOUT_CHECK_NO_INIT_OF_VARIABLE : "There should be no initialization of a variable as part of its declaration",
> ERROR_C_FUNCTION_LAYOUT_CHECK_NO_STATIC : "There should be no use of STATIC for functions",
> + ERROR_C_FUNCTION_LAYOUT_CHECK_NO_DEPRECATE : "The deprecated function should NOT be used",
>
> ERROR_INCLUDE_FILE_CHECK_ALL : "",
> ERROR_INCLUDE_FILE_CHECK_IFNDEF_STATEMENT_1 : "All include file contents should be guarded by a #ifndef statement.",
> diff --git a/BaseTools/Source/Python/Ecc/config.ini b/BaseTools/Source/Python/Ecc/config.ini
> index 00c98c6232..663ae293bd 100644
> --- a/BaseTools/Source/Python/Ecc/config.ini
> +++ b/BaseTools/Source/Python/Ecc/config.ini
> @@ -134,6 +134,8 @@ CFunctionLayoutCheckDataDeclaration = 1
> CFunctionLayoutCheckNoInitOfVariable = 1
> # Check whether no use of STATIC for functions
> CFunctionLayoutCheckNoStatic = 1
> +# Check whether no use of Deprecated functions
> +CFunctionLayoutCheckNoDeprecated = 1
>
> #
> # Include Files Checking
> --
> 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 [flat|nested] 3+ messages in thread
* Re: [PATCH] BaseTools/ECC: Add a checkpoint to check no usage for deprecated functions.
2018-10-17 15:48 ` Carsey, Jaben
@ 2018-10-18 0:44 ` Chen, Hesheng
0 siblings, 0 replies; 3+ messages in thread
From: Chen, Hesheng @ 2018-10-18 0:44 UTC (permalink / raw)
To: Carsey, Jaben, Zhu, Yonghong; +Cc: edk2-devel@lists.01.org
Good suggestion, will update the patch.
Chen, Hess
Intel China Software Center
Tel: +86-21-6116-6740
Email: hesheng.chen@intel.com
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Carsey, Jaben
Sent: Wednesday, October 17, 2018 11:49 PM
To: Zhu, Yonghong <yonghong.zhu@intel.com>
Cc: edk2-devel@lists.01.org; Chen, Hesheng <hesheng.chen@intel.com>
Subject: Re: [edk2] [PATCH] BaseTools/ECC: Add a checkpoint to check no usage for deprecated functions.
Propose to use a set not a list when the data is unordered and unique names of functions.
With that: reviewed-by:Jaben.carsey <Jaben.carsey@intel.com>
> On Oct 16, 2018, at 7:25 PM, Yonghong Zhu <yonghong.zhu@intel.com> wrote:
>
> From: Hess Chen <hesheng.chen@intel.com>
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Hess Chen <hesheng.chen@intel.com>
> ---
> BaseTools/Source/Python/Ecc/Check.py | 60 ++++++++++++++++++++++++++++
> BaseTools/Source/Python/Ecc/Configuration.py | 3 ++
> BaseTools/Source/Python/Ecc/EccToolError.py | 2 +
> BaseTools/Source/Python/Ecc/config.ini | 2 +
> 4 files changed, 67 insertions(+)
>
> diff --git a/BaseTools/Source/Python/Ecc/Check.py
> b/BaseTools/Source/Python/Ecc/Check.py
> index eb086362bd..3baf81fa44 100644
> --- a/BaseTools/Source/Python/Ecc/Check.py
> +++ b/BaseTools/Source/Python/Ecc/Check.py
> @@ -270,6 +270,66 @@ class Check(object):
> self.FunctionLayoutCheckPrototype()
> self.FunctionLayoutCheckBody()
> self.FunctionLayoutCheckLocalVariable()
> + self.FunctionLayoutCheckDeprecated()
> +
> + # To check if the deprecated functions are used
> + def FunctionLayoutCheckDeprecated(self):
> + if EccGlobalData.gConfig.CFunctionLayoutCheckNoDeprecated == '1' or EccGlobalData.gConfig.CFunctionLayoutCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
> + EdkLogger.quiet("Checking function no deprecated one
> + being used ...")
> +
> + DeprecatedFunctionList = ['UnicodeValueToString',
> + 'AsciiValueToString',
> + 'StrCpy',
> + 'StrnCpy',
> + 'StrCat',
> + 'StrnCat',
> + 'UnicodeStrToAsciiStr',
> + 'AsciiStrCpy',
> + 'AsciiStrnCpy',
> + 'AsciiStrCat',
> + 'AsciiStrnCat',
> + 'AsciiStrToUnicodeStr',
> + 'PcdSet8',
> + 'PcdSet16',
> + 'PcdSet32',
> + 'PcdSet64',
> + 'PcdSetPtr',
> + 'PcdSetBool',
> + 'PcdSetEx8',
> + 'PcdSetEx16',
> + 'PcdSetEx32',
> + 'PcdSetEx64',
> + 'PcdSetExPtr',
> + 'PcdSetExBool',
> + 'LibPcdSet8',
> + 'LibPcdSet16',
> + 'LibPcdSet32',
> + 'LibPcdSet64',
> + 'LibPcdSetPtr',
> + 'LibPcdSetBool',
> + 'LibPcdSetEx8',
> + 'LibPcdSetEx16',
> + 'LibPcdSetEx32',
> + 'LibPcdSetEx64',
> + 'LibPcdSetExPtr',
> + 'LibPcdSetExBool',
> + 'GetVariable',
> + 'GetEfiGlobalVariable',
> + ]
> +
> + for IdentifierTable in EccGlobalData.gIdentifierTableList:
> + SqlCommand = """select ID, Name, BelongsToFile from %s
> + where Model = %s """ % (IdentifierTable, MODEL_IDENTIFIER_FUNCTION_CALLING)
> + RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)
> + for Record in RecordSet:
> + for Key in DeprecatedFunctionList:
> + if Key == Record[1]:
> + if not EccGlobalData.gException.IsException(ERROR_C_FUNCTION_LAYOUT_CHECK_NO_DEPRECATE, Key):
> + OtherMsg = 'The function [%s] is deprecated which should NOT be used' % Key
> + EccGlobalData.gDb.TblReport.Insert(ERROR_C_FUNCTION_LAYOUT_CHECK_NO_DEPRECATE,
> + OtherMsg=OtherMsg,
> + BelongsToTable=IdentifierTable,
> +
> + BelongsToItem=Record[0])
>
> def WalkTree(self):
> IgnoredPattern = c.GetIgnoredDirListPattern() diff --git
> a/BaseTools/Source/Python/Ecc/Configuration.py
> b/BaseTools/Source/Python/Ecc/Configuration.py
> index c19a3990c7..8f6886169c 100644
> --- a/BaseTools/Source/Python/Ecc/Configuration.py
> +++ b/BaseTools/Source/Python/Ecc/Configuration.py
> @@ -34,6 +34,7 @@ _ConfigFileToInternalTranslation = {
> "CFunctionLayoutCheckFunctionBody":"CFunctionLayoutCheckFunctionBody",
> "CFunctionLayoutCheckFunctionName":"CFunctionLayoutCheckFunctionName",
>
> "CFunctionLayoutCheckFunctionPrototype":"CFunctionLayoutCheckFunctionP
> rototype",
> +
> + "CFunctionLayoutCheckNoDeprecated":"CFunctionLayoutCheckNoDeprecated
> + ",
> "CFunctionLayoutCheckNoInitOfVariable":"CFunctionLayoutCheckNoInitOfVariable",
> "CFunctionLayoutCheckNoStatic":"CFunctionLayoutCheckNoStatic",
>
> "CFunctionLayoutCheckOptionalFunctionalModifier":"CFunctionLayoutCheck
> OptionalFunctionalModifier", @@ -242,6 +243,8 @@ class
> Configuration(object):
> self.CFunctionLayoutCheckNoInitOfVariable = 1
> # Check whether no use of STATIC for functions
> self.CFunctionLayoutCheckNoStatic = 1
> + # Check whether no use of Deprecated functions
> + self.CFunctionLayoutCheckNoDeprecated = 1
>
> ## Include Files Checking
> self.IncludeFileCheckAll = 0
> diff --git a/BaseTools/Source/Python/Ecc/EccToolError.py
> b/BaseTools/Source/Python/Ecc/EccToolError.py
> index e327a7888d..7663e90d7e 100644
> --- a/BaseTools/Source/Python/Ecc/EccToolError.py
> +++ b/BaseTools/Source/Python/Ecc/EccToolError.py
> @@ -47,6 +47,7 @@ ERROR_C_FUNCTION_LAYOUT_CHECK_NO_INIT_OF_VARIABLE =
> 5007 ERROR_C_FUNCTION_LAYOUT_CHECK_NO_STATIC = 5008
> ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_2 = 5009
> ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_3 = 5010
> +ERROR_C_FUNCTION_LAYOUT_CHECK_NO_DEPRECATE = 5011
>
> ERROR_INCLUDE_FILE_CHECK_ALL = 6000
> ERROR_INCLUDE_FILE_CHECK_IFNDEF_STATEMENT_1 = 6001 @@ -146,6 +147,7 @@
> gEccErrorMessage = {
> ERROR_C_FUNCTION_LAYOUT_CHECK_DATA_DECLARATION : "The data declarations should be the first code in a module",
> ERROR_C_FUNCTION_LAYOUT_CHECK_NO_INIT_OF_VARIABLE : "There should be no initialization of a variable as part of its declaration",
> ERROR_C_FUNCTION_LAYOUT_CHECK_NO_STATIC : "There should be no use
> of STATIC for functions",
> + ERROR_C_FUNCTION_LAYOUT_CHECK_NO_DEPRECATE : "The deprecated
> + function should NOT be used",
>
> ERROR_INCLUDE_FILE_CHECK_ALL : "",
> ERROR_INCLUDE_FILE_CHECK_IFNDEF_STATEMENT_1 : "All include file
> contents should be guarded by a #ifndef statement.", diff --git
> a/BaseTools/Source/Python/Ecc/config.ini
> b/BaseTools/Source/Python/Ecc/config.ini
> index 00c98c6232..663ae293bd 100644
> --- a/BaseTools/Source/Python/Ecc/config.ini
> +++ b/BaseTools/Source/Python/Ecc/config.ini
> @@ -134,6 +134,8 @@ CFunctionLayoutCheckDataDeclaration = 1
> CFunctionLayoutCheckNoInitOfVariable = 1 # Check whether no use of
> STATIC for functions CFunctionLayoutCheckNoStatic = 1
> +# Check whether no use of Deprecated functions
> +CFunctionLayoutCheckNoDeprecated = 1
>
> #
> # Include Files Checking
> --
> 2.14.2.windows.2
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-18 0:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-17 2:25 [PATCH] BaseTools/ECC: Add a checkpoint to check no usage for deprecated functions Yonghong Zhu
2018-10-17 15:48 ` Carsey, Jaben
2018-10-18 0:44 ` Chen, Hesheng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox