## @file\r
# This file is used to be the c coding style checking of ECC tool\r
#\r
-# Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2016, 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
Fields = Value[LBPos + 1 : RBPos]\r
Fields = StripComments(Fields).strip()\r
NestPos = Fields.find ('struct')\r
- if NestPos != -1 and (NestPos + len('struct') < len(Fields)):\r
+ if NestPos != -1 and (NestPos + len('struct') < len(Fields)) and ModelId != DataClass.MODEL_IDENTIFIER_UNION:\r
if not Fields[NestPos + len('struct') + 1].isalnum():\r
if not EccGlobalData.gException.IsException(ERROR_DECLARATION_DATA_TYPE_CHECK_NESTED_STRUCTURE, Name):\r
PrintErrorMsg(ERROR_DECLARATION_DATA_TYPE_CHECK_NESTED_STRUCTURE, 'Nested struct in [%s].' % (Name), FileTable, TdId)\r
where Model = %d or Model = %d\r
""" % (FileTable, DataClass.MODEL_IDENTIFIER_COMMENT, DataClass.MODEL_IDENTIFIER_FUNCTION_HEADER)\r
ResultSet = Db.TblFile.Exec(SqlStatement)\r
- DoxygenCommandList = ['bug', 'todo', 'example', 'file', 'attention', 'param', 'post', 'pre', 'retval', 'return', 'sa', 'since', 'test', 'note', 'par']\r
+ DoxygenCommandList = ['bug', 'todo', 'example', 'file', 'attention', 'param', 'post', 'pre', 'retval',\r
+ 'return', 'sa', 'since', 'test', 'note', 'par', 'endcode', 'code']\r
for Result in ResultSet:\r
CommentStr = Result[0]\r
CommentPartList = CommentStr.split()\r
if Part.startswith('@'):\r
if EccGlobalData.gException.IsException(ERROR_DOXYGEN_CHECK_COMMAND, Part):\r
continue\r
+ if not Part.replace('@', '').strip():\r
+ continue\r
+ if Part.lstrip('@') in ['{', '}']:\r
+ continue\r
if Part.lstrip('@').isalpha():\r
if Part.lstrip('@') not in DoxygenCommandList:\r
PrintErrorMsg(ERROR_DOXYGEN_CHECK_COMMAND, 'Unknown doxygen command %s' % Part, FileTable, Result[1])\r