## @file\r
# This file is used to define checkpoints used by ECC tool\r
#\r
+# Copyright (c) 2021, Arm Limited. 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
RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)\r
for Record in RecordSet:\r
Name = Record[1].replace('#ifndef', '').strip()\r
- if Name[-1] != '_':\r
+ if Name[0] == '_' or Name[-1] != '_' or Name[-2] == '_':\r
if not EccGlobalData.gException.IsException(ERROR_NAMING_CONVENTION_CHECK_IFNDEF_STATEMENT, Name):\r
EccGlobalData.gDb.TblReport.Insert(ERROR_NAMING_CONVENTION_CHECK_IFNDEF_STATEMENT, OtherMsg="The #ifndef name [%s] does not follow the rules" % (Name), BelongsToTable=FileTable, BelongsToItem=Record[0])\r
\r