diff options
author | Hess Chen <hesheng.chen@intel.com> | 2015-09-14 07:12:29 +0000 |
---|---|---|
committer | hchen30 <hchen30@Edk2> | 2015-09-14 07:12:29 +0000 |
commit | 00261e1dc62ec078391f0239683ba7a709d3122d (patch) | |
tree | 137febfad73000eec5fc17e57d693f05bf685633 /BaseTools/Source/Python/Ecc/Check.py | |
parent | 2e7b7ce31300bf8bda89ed14c07a5f68e5cc1e9c (diff) | |
download | edk2-00261e1dc62ec078391f0239683ba7a709d3122d.tar.gz |
BaseTools/Ecc: Remove checkpoint for STATIC modifier
1. Fix a bug of removing the checkpoint for STATIC modifier
2. Fix a bug of parsing CONST variable
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: YangX Li <yangx.li@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18446 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/Ecc/Check.py')
-rw-r--r-- | BaseTools/Source/Python/Ecc/Check.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Ecc/Check.py b/BaseTools/Source/Python/Ecc/Check.py index 7932fb3394..c2be1b01d3 100644 --- a/BaseTools/Source/Python/Ecc/Check.py +++ b/BaseTools/Source/Python/Ecc/Check.py @@ -1223,7 +1223,10 @@ class Check(object): SqlCommand = """select ID, Name from %s where Model = %s""" % (FileTable, MODEL_IDENTIFIER_VARIABLE)
RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)
for Record in RecordSet:
- if not Pattern.match(Record[1]):
+ Var = Record[1]
+ if Var.startswith('CONST'):
+ Var = Var[5:].lstrip()
+ if not Pattern.match(Var):
if not EccGlobalData.gException.IsException(ERROR_NAMING_CONVENTION_CHECK_VARIABLE_NAME, Record[1]):
EccGlobalData.gDb.TblReport.Insert(ERROR_NAMING_CONVENTION_CHECK_VARIABLE_NAME, OtherMsg="The variable name [%s] does not follow the rules" % (Record[1]), BelongsToTable=FileTable, BelongsToItem=Record[0])
|