## @file\r
# Standardized Error Hanlding infrastructures.\r
#\r
-# Copyright (c) 20087, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2008 - 2017, 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
# http://opensource.org/licenses/bsd-license.php\r
ERROR_GENERAL_CHECK_NO_PROGMA = 1005\r
ERROR_GENERAL_CHECK_CARRIAGE_RETURN = 1006\r
ERROR_GENERAL_CHECK_FILE_EXISTENCE = 1007\r
+ERROR_GENERAL_CHECK_NON_ACSII = 1008\r
+ERROR_GENERAL_CHECK_UNI = 1009\r
+ERROR_GENERAL_CHECK_UNI_HELP_INFO = 1010\r
\r
ERROR_SPACE_CHECK_ALL = 2000\r
\r
ERROR_C_FUNCTION_LAYOUT_CHECK_DATA_DECLARATION = 5006\r
ERROR_C_FUNCTION_LAYOUT_CHECK_NO_INIT_OF_VARIABLE = 5007\r
ERROR_C_FUNCTION_LAYOUT_CHECK_NO_STATIC = 5008\r
+ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_2 = 5009\r
+ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_3 = 5010\r
\r
ERROR_INCLUDE_FILE_CHECK_ALL = 6000\r
ERROR_INCLUDE_FILE_CHECK_IFNDEF_STATEMENT_1 = 6001\r
ERROR_META_DATA_FILE_CHECK_DUPLICATE_PPI = 10013\r
ERROR_META_DATA_FILE_CHECK_MODULE_FILE_NO_USE = 10014\r
ERROR_META_DATA_FILE_CHECK_PCD_TYPE = 10015\r
+ERROR_META_DATA_FILE_CHECK_MODULE_FILE_GUID_DUPLICATION = 10016\r
+ERROR_META_DATA_FILE_CHECK_LIBRARY_NAME_DUPLICATE = 10017\r
+ERROR_META_DATA_FILE_CHECK_FORMAT_GUID = 10018\r
+ERROR_META_DATA_FILE_CHECK_FORMAT_PROTOCOL = 10019\r
+ERROR_META_DATA_FILE_CHECK_FORMAT_PPI = 10020\r
+ERROR_META_DATA_FILE_CHECK_FORMAT_PCD = 10021\r
+ERROR_META_DATA_FILE_CHECK_LIBRARY_NOT_DEFINED = 10022\r
\r
ERROR_SPELLING_CHECK_ALL = 11000\r
\r
+ERROR_SMM_COMM_PARA_CHECK_BUFFER_TYPE = 12001\r
+\r
gEccErrorMessage = {\r
ERROR_GENERAL_CHECK_ALL : "",\r
ERROR_GENERAL_CHECK_NO_TAB : "'TAB' character is not allowed in source code, please replace each 'TAB' with two spaces",\r
ERROR_GENERAL_CHECK_NO_PROGMA : """There should be no use of "#progma" in source file except "#pragma pack(#)\"""",\r
ERROR_GENERAL_CHECK_CARRIAGE_RETURN : "There should be a carriage return at the end of the file",\r
ERROR_GENERAL_CHECK_FILE_EXISTENCE : "File not found",\r
- \r
+ ERROR_GENERAL_CHECK_NON_ACSII : "File has invalid Non-ACSII char",\r
+ ERROR_GENERAL_CHECK_UNI : "File is not a valid UTF-16 UNI file",\r
+ ERROR_GENERAL_CHECK_UNI_HELP_INFO : "UNI file that is associated by INF or DEC file need define the prompt and help information.",\r
+\r
ERROR_SPACE_CHECK_ALL : "",\r
- \r
+\r
ERROR_PREDICATE_EXPRESSION_CHECK_ALL : "",\r
ERROR_PREDICATE_EXPRESSION_CHECK_BOOLEAN_VALUE : "Boolean values and variable type BOOLEAN should not use explicit comparisons to TRUE or FALSE",\r
ERROR_PREDICATE_EXPRESSION_CHECK_NO_BOOLEAN_OPERATOR : "Non-Boolean comparisons should use a compare operator (==, !=, >, < >=, <=)",\r
ERROR_PREDICATE_EXPRESSION_CHECK_COMPARISON_NULL_TYPE : "A comparison of any pointer to zero must be done via the NULL type",\r
- \r
+\r
ERROR_HEADER_CHECK_ALL : "",\r
ERROR_HEADER_CHECK_FILE : "File header doesn't exist",\r
ERROR_HEADER_CHECK_FUNCTION : "Function header doesn't exist",\r
- \r
+\r
ERROR_C_FUNCTION_LAYOUT_CHECK_ALL : "",\r
ERROR_C_FUNCTION_LAYOUT_CHECK_RETURN_TYPE : "Return type of a function should exist and in the first line",\r
ERROR_C_FUNCTION_LAYOUT_CHECK_OPTIONAL_FUNCTIONAL_MODIFIER : "Any optional functional modifiers should exist and next to the return type",\r
ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_NAME : """Function name should be left justified, followed by the beginning of the parameter list, with the closing parenthesis on its own line, indented two spaces""",\r
ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE : "Function prototypes in include files have the same form as function definitions",\r
+ ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_2 : "Function prototypes in include files have different parameter number with function definitions",\r
+ ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_PROTO_TYPE_3 : "Function prototypes in include files have different parameter modifier with function definitions",\r
ERROR_C_FUNCTION_LAYOUT_CHECK_FUNCTION_BODY : "The body of a function should be contained by open and close braces that must be in the first column",\r
ERROR_C_FUNCTION_LAYOUT_CHECK_DATA_DECLARATION : "The data declarations should be the first code in a module",\r
ERROR_C_FUNCTION_LAYOUT_CHECK_NO_INIT_OF_VARIABLE : "There should be no initialization of a variable as part of its declaration",\r
ERROR_C_FUNCTION_LAYOUT_CHECK_NO_STATIC : "There should be no use of STATIC for functions",\r
- \r
+\r
ERROR_INCLUDE_FILE_CHECK_ALL : "",\r
ERROR_INCLUDE_FILE_CHECK_IFNDEF_STATEMENT_1 : "All include file contents should be guarded by a #ifndef statement.",\r
ERROR_INCLUDE_FILE_CHECK_IFNDEF_STATEMENT_2 : "The #ifndef must be the first line of code following the file header comment",\r
ERROR_INCLUDE_FILE_CHECK_IFNDEF_STATEMENT_3 : "The #endif must appear on the last line in the file",\r
ERROR_INCLUDE_FILE_CHECK_DATA : "Include files should contain only public or only private data and cannot contain code or define data variables",\r
ERROR_INCLUDE_FILE_CHECK_NAME : "No permission for the inlcude file with same names",\r
- \r
+\r
ERROR_DECLARATION_DATA_TYPE_CHECK_ALL : "",\r
ERROR_DECLARATION_DATA_TYPE_CHECK_NO_USE_C_TYPE : "There should be no use of int, unsigned, char, void, static, long in any .c, .h or .asl files",\r
ERROR_DECLARATION_DATA_TYPE_CHECK_IN_OUT_MODIFIER : """The modifiers IN, OUT, OPTIONAL, and UNALIGNED should be used only to qualify arguments to a function and should not appear in a data type declaration""",\r
ERROR_DECLARATION_DATA_TYPE_CHECK_SAME_STRUCTURE : "No permission for the structure with same names",\r
ERROR_DECLARATION_DATA_TYPE_CHECK_UNION_TYPE : "Union Type should have a 'typedef' and the name must be in capital letters",\r
ERROR_DECLARATION_DATA_TYPE_CHECK_NESTED_STRUCTURE : "Complex types should be typedef-ed",\r
- \r
+\r
ERROR_NAMING_CONVENTION_CHECK_ALL : "",\r
ERROR_NAMING_CONVENTION_CHECK_DEFINE_STATEMENT : "Only capital letters are allowed to be used for #define declarations",\r
ERROR_NAMING_CONVENTION_CHECK_TYPEDEF_STATEMENT : "Only capital letters are allowed to be used for typedef declarations",\r
ERROR_NAMING_CONVENTION_CHECK_VARIABLE_NAME : """Variable name does not follow the rules: 1. First character should be upper case 2. Must contain lower case characters 3. No white space characters 4. Global variable name must start with a 'g'""",\r
ERROR_NAMING_CONVENTION_CHECK_FUNCTION_NAME : """Function name does not follow the rules: 1. First character should be upper case 2. Must contain lower case characters 3. No white space characters""",\r
ERROR_NAMING_CONVENTION_CHECK_SINGLE_CHARACTER_VARIABLE : "There should be no use of short (single character) variable names",\r
- \r
+\r
ERROR_DOXYGEN_CHECK_ALL : "",\r
ERROR_DOXYGEN_CHECK_FILE_HEADER : "The file headers should follow Doxygen special documentation blocks in section 2.3.5",\r
ERROR_DOXYGEN_CHECK_FUNCTION_HEADER : "The function headers should follow Doxygen special documentation blocks in section 2.3.5",\r
ERROR_DOXYGEN_CHECK_COMMENT_DESCRIPTION : """The first line of text in a comment block should be a brief description of the element being documented and the brief description must end with a period.""",\r
ERROR_DOXYGEN_CHECK_COMMENT_FORMAT : "For comment line with '///< ... text ...' format, if it is used, it should be after the code section",\r
- ERROR_DOXYGEN_CHECK_COMMAND : "Only Doxygen commands @bug and @todo are allowed to mark the code",\r
- \r
+ ERROR_DOXYGEN_CHECK_COMMAND : "Only Doxygen commands '@bug', '@todo', '@example', '@file', '@attention', '@param', '@post', '@pre', '@retval', '@return', '@sa', '@since', '@test', '@note', '@par', '@endcode', '@code', '@{', '@}' are allowed to mark the code",\r
+\r
ERROR_META_DATA_FILE_CHECK_ALL : "",\r
ERROR_META_DATA_FILE_CHECK_PATH_NAME : "The file defined in meta-data does not exist",\r
- ERROR_META_DATA_FILE_CHECK_LIBRARY_INSTANCE_1 : "A library instances defined for a given module (or dependent library instance) doesn't match the module's type.", \r
+ ERROR_META_DATA_FILE_CHECK_LIBRARY_INSTANCE_1 : "A library instances defined for a given module (or dependent library instance) doesn't match the module's type.",\r
ERROR_META_DATA_FILE_CHECK_LIBRARY_INSTANCE_2 : "A library instance must specify the Supported Module Types in its INF file",\r
ERROR_META_DATA_FILE_CHECK_LIBRARY_INSTANCE_DEPENDENT : "A library instance must be defined for all dependent library classes",\r
ERROR_META_DATA_FILE_CHECK_LIBRARY_INSTANCE_ORDER : "The library Instances specified by the LibraryClasses sections should be listed in order of dependencies",\r
ERROR_META_DATA_FILE_CHECK_LIBRARY_NO_USE : "There should be no unnecessary inclusion of library classes in the INF file",\r
+ ERROR_META_DATA_FILE_CHECK_LIBRARY_NAME_DUPLICATE : "Duplicate Library Class Name found",\r
ERROR_META_DATA_FILE_CHECK_BINARY_INF_IN_FDF : "An INF file is specified in the FDF file, but not in the DSC file, therefore the INF file must be for a Binary module only",\r
ERROR_META_DATA_FILE_CHECK_PCD_DUPLICATE : "Duplicate PCDs found",\r
ERROR_META_DATA_FILE_CHECK_PCD_FLASH : "PCD settings in the FDF file should only be related to flash",\r
ERROR_META_DATA_FILE_CHECK_DUPLICATE_GUID : "Duplicate GUID found",\r
ERROR_META_DATA_FILE_CHECK_DUPLICATE_PROTOCOL : "Duplicate PROTOCOL found",\r
ERROR_META_DATA_FILE_CHECK_DUPLICATE_PPI : "Duplicate PPI found",\r
- ERROR_META_DATA_FILE_CHECK_MODULE_FILE_NO_USE : "No used module files found", \r
+ ERROR_META_DATA_FILE_CHECK_MODULE_FILE_NO_USE : "No used module files found",\r
ERROR_META_DATA_FILE_CHECK_PCD_TYPE : "Wrong C code function used for this kind of PCD",\r
- \r
+ ERROR_META_DATA_FILE_CHECK_MODULE_FILE_GUID_DUPLICATION : "Module file has FILE_GUID collision with other module file",\r
+ ERROR_META_DATA_FILE_CHECK_FORMAT_GUID : "Wrong GUID Format used in Module file",\r
+ ERROR_META_DATA_FILE_CHECK_FORMAT_PROTOCOL : "Wrong Protocol Format used in Module file",\r
+ ERROR_META_DATA_FILE_CHECK_FORMAT_PPI : "Wrong Ppi Format used in Module file",\r
+ ERROR_META_DATA_FILE_CHECK_FORMAT_PCD : "Wrong Pcd Format used in Module file",\r
+ ERROR_META_DATA_FILE_CHECK_LIBRARY_NOT_DEFINED : "Not defined LibraryClass used in the Module file.",\r
ERROR_SPELLING_CHECK_ALL : "",\r
+\r
+ ERROR_SMM_COMM_PARA_CHECK_BUFFER_TYPE : "SMM communication function may use wrong parameter type",\r
}\r
\r