## @file\r
# This file is used to define checkpoints used by ECC tool\r
#\r
-# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2020, Intel Corporation. All rights reserved.<BR>\r
# SPDX-License-Identifier: BSD-2-Clause-Patent\r
#\r
from __future__ import absolute_import\r
EdkLogger.quiet("Checking naming convention of variable name ...")\r
Pattern = re.compile(r'^[A-Zgm]+\S*[a-z]\S*$')\r
\r
- SqlCommand = """select ID, Name from %s where Model = %s""" % (FileTable, MODEL_IDENTIFIER_VARIABLE)\r
+ SqlCommand = """select ID, Name, Modifier from %s where Model = %s""" % (FileTable, MODEL_IDENTIFIER_VARIABLE)\r
RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)\r
for Record in RecordSet:\r
Var = Record[1]\r
+ Modifier = Record[2]\r
if Var.startswith('CONST'):\r
Var = Var[5:].lstrip()\r
- if not Pattern.match(Var):\r
+ if not Pattern.match(Var) and not (Modifier.endswith('*') and Var.startswith('p')):\r
if not EccGlobalData.gException.IsException(ERROR_NAMING_CONVENTION_CHECK_VARIABLE_NAME, Record[1]):\r
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])\r
\r