## @file\r
# This file is used to be the c coding style checking of ECC tool\r
#\r
-# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
\r
FileTable = 'Identifier' + str(FileID)\r
Db = GetDB()\r
- SqlStatement = """ select BodyStartColumn, EndColumn, ID\r
+ SqlStatement = """ select BodyStartColumn, EndColumn, ID, Name\r
from Function\r
where BelongsToFile = %d\r
""" % (FileID)\r
return ErrorMsgList\r
for Result in ResultSet:\r
if Result[0] != 0:\r
- PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_BODY, 'open brace should be at the very beginning of a line.', 'Function', Result[2])\r
+ if not EccGlobalData.gException.IsException(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_BODY, Result[3]):\r
+ PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_BODY,\r
+ 'The open brace should be at the very beginning of a line for the function [%s].' % Result[3],\r
+ 'Function', Result[2])\r
if Result[1] != 0:\r
- PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_BODY, 'close brace should be at the very beginning of a line.', 'Function', Result[2])\r
+ if not EccGlobalData.gException.IsException(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_BODY, Result[3]):\r
+ PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_BODY,\r
+ 'The close brace should be at the very beginning of a line for the function [%s].' % Result[3],\r
+ 'Function', Result[2])\r
\r
def CheckFuncLayoutLocalVariable(FullFileName):\r
ErrorMsgList = []\r