]> git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/Python/Ecc/config.ini
Sync EDKII BaseTools to BaseTools project r2042.
[mirror_edk2.git] / BaseTools / Source / Python / Ecc / config.ini
1 ## @file
2 # This file is used to set configuration of ECC tool
3 # For the items listed below, 1 means valid, 0 means invalid
4 #
5 # Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
6 # This program and the accompanying materials
7 # are licensed and made available under the terms and conditions of the BSD License
8 # which accompanies this distribution. The full text of the license may be found at
9 # http://opensource.org/licenses/bsd-license.php
10 #
11 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 #
14
15 #
16 # Identify the version of current configuration
17 #
18 Version = 0.1
19
20 #
21 # Identify to if check all items
22 # 1 - Check all items and ignore all other detailed items
23 # 0 - Not check all items, the tool will go through all other detailed items to decide to check or not
24 #
25 CheckAll = 0
26
27 #
28 # Identify to if automatically correct mistakes
29 # 1 - Automatically correct
30 # 0 - Not automatically correct
31 # Only the following check points can be automatically corrected, others not listed below are not supported even it is 1
32 #
33 # GeneralCheckTab
34 # GeneralCheckIndentation
35 # GeneralCheckLine
36 # GeneralCheckCarriageReturn
37 # SpaceCheckAll
38 #
39 AutoCorrect = 1
40
41 #
42 # List customized Modifer here, split with ','
43 #
44 ModifierList = IN, OUT, OPTIONAL, UNALIGNED, EFI_RUNTIMESERVICE, EFI_BOOTSERVICE, EFIAPI, TPMINTERNALAPI
45
46 #
47 # General Checking
48 #
49 GeneralCheckAll = 0
50
51 # Check whether NO Tab is used, replaced with spaces
52 GeneralCheckNoTab = 1
53 # The width of Tab
54 GeneralCheckTabWidth = 2
55 # Check whether the indentation is followed coding style
56 GeneralCheckIndentation = 1
57 # The width of indentation
58 GeneralCheckIndentationWidth = 2
59 # Check whether no line is exceeding defined widty
60 GeneralCheckLine = 1
61 # The width of a line
62 GeneralCheckLineWidth = 120
63 # Check whether no use of _asm in the source file
64 GeneralCheckNo_Asm = 1
65 # Check whether no use of "#progma" in source file except "#pragma pack(#)".
66 GeneralCheckNoProgma = 1
67 # Check whether there is a carriage return at the end of the file
68 GeneralCheckCarriageReturn = 1
69 # Check whether the file exists
70 GeneralCheckFileExistence = 1
71 # Check whether file has non ACSII char
72 GeneralCheckNonAcsii = 1
73
74 #
75 # Space Checking
76 #
77 SpaceCheckAll = 1
78
79 #
80 # Predicate Expression Checking
81 #
82 PredicateExpressionCheckAll = 0
83
84 # Check whether Boolean values, variable type BOOLEAN not use explicit comparisons to TRUE or FALSE
85 PredicateExpressionCheckBooleanValue = 1
86 # Check whether Non-Boolean comparisons use a compare operator (==, !=, >, < >=, <=).
87 PredicateExpressionCheckNonBooleanOperator = 1
88 # Check whether a comparison of any pointer to zero must be done via the NULL type
89 PredicateExpressionCheckComparisonNullType = 1
90
91 #
92 # Headers Checking
93 #
94 HeaderCheckAll = 0
95
96 # Check whether File header exists
97 HeaderCheckFile = 1
98 # Check whether Function header exists
99 HeaderCheckFunction = 1
100
101 #
102 # C Function Layout Checking
103 #
104 CFunctionLayoutCheckAll = 0
105
106 # Check whether return type exists and in the first line
107 CFunctionLayoutCheckReturnType = 1
108 # Check whether any optional functional modifiers exist and next to the return type
109 CFunctionLayoutCheckOptionalFunctionalModifier = 1
110 # Check whether the next line contains the function name, left justified, followed by the beginning of the parameter list
111 # Check whether the closing parenthesis is on its own line and also indented two spaces
112 CFunctionLayoutCheckFunctionName = 1
113 # Check whether the function prototypes in include files have the same form as function definitions
114 CFunctionLayoutCheckFunctionPrototype = 1
115 # Check whether the body of a function is contained by open and close braces that must be in the first column
116 CFunctionLayoutCheckFunctionBody = 1
117 # Check whether the data declarations is the first code in a module.
118 CFunctionLayoutCheckDataDeclaration = 1
119 # Check whether no initialization of a variable as part of its declaration
120 CFunctionLayoutCheckNoInitOfVariable = 1
121 # Check whether no use of STATIC for functions
122 CFunctionLayoutCheckNoStatic = 1
123
124 #
125 # Include Files Checking
126 #
127 IncludeFileCheckAll = 0
128
129 #Check whether having include files with same name
130 IncludeFileCheckSameName = 1
131 # Check whether all include file contents is guarded by a #ifndef statement.
132 # the #ifndef must be the first line of code following the file header comment
133 # the #endif must appear on the last line in the file
134 IncludeFileCheckIfndefStatement = 1
135 # Check whether include files contain only public or only private data
136 # Check whether include files NOT contain code or define data variables
137 IncludeFileCheckData = 1
138
139 #
140 # Declarations and Data Types Checking
141 #
142 DeclarationDataTypeCheckAll = 0
143
144 # Check whether no use of int, unsigned, char, void, static, long in any .c, .h or .asl files.
145 DeclarationDataTypeCheckNoUseCType = 1
146 # Check whether the modifiers IN, OUT, OPTIONAL, and UNALIGNED are used only to qualify arguments to a function and should not appear in a data type declaration
147 DeclarationDataTypeCheckInOutModifier = 1
148 # Check whether the EFIAPI modifier should be used at the entry of drivers, events, and member functions of protocols
149 DeclarationDataTypeCheckEFIAPIModifier = 1
150 # Check whether Enumerated Type has a 'typedef' and the name is capital
151 DeclarationDataTypeCheckEnumeratedType = 1
152 # Check whether Structure Type has a 'typedef' and the name is capital
153 DeclarationDataTypeCheckStructureDeclaration = 1
154 # Check whether having same Structure
155 DeclarationDataTypeCheckSameStructure = 1
156 # Check whether Union Type has a 'typedef' and the name is capital
157 DeclarationDataTypeCheckUnionType = 1
158
159
160 #
161 # Naming Conventions Checking
162 #
163 NamingConventionCheckAll = 0
164
165 # Check whether only capital letters are used for #define declarations
166 NamingConventionCheckDefineStatement = 1
167 # Check whether only capital letters are used for typedef declarations
168 NamingConventionCheckTypedefStatement = 1
169 # Check whether the #ifndef at the start of an include file uses both prefix and postfix underscore characters, '_'.
170 NamingConventionCheckIfndefStatement = 1
171 # Rule for path name, variable name and function name
172 # 1. First character should be upper case
173 # 2. Existing lower case in a word
174 # 3. No space existence
175 # 4. Global variable name must start by a 'g'
176 # Check whether the path name followed the rule
177 NamingConventionCheckPathName = 1
178 # Check whether the variable name followed the rule
179 NamingConventionCheckVariableName = 1
180 # Check whether the function name followed the rule
181 NamingConventionCheckFunctionName = 1
182 # Check whether NO use short variable name with single character
183 NamingConventionCheckSingleCharacterVariable = 1
184
185 #
186 # Doxygen Checking
187 #
188 DoxygenCheckAll = 0
189
190 # Check whether the file headers are followed Doxygen special documentation blocks in section 2.3.5
191 DoxygenCheckFileHeader = 1
192 # Check whether the function headers are followed Doxygen special documentation blocks in section 2.3.5
193 DoxygenCheckFunctionHeader = 1
194 # Check whether the first line of text in a comment block is a brief description of the element being documented.
195 # The brief description must end with a period.
196 DoxygenCheckCommentDescription = 1
197 # Check whether comment lines with '///< ... text ...' format, if it is used, it should be after the code section.
198 DoxygenCheckCommentFormat = 1
199 # Check whether only Doxygen commands allowed to mark the code are @bug and @todo.
200 DoxygenCheckCommand = 1
201
202 #
203 # Meta-Data File Processing Checking
204 #
205 MetaDataFileCheckAll = 0
206
207 # Check whether each file defined in meta-data exists
208 MetaDataFileCheckPathName = 1
209 # Generate a list for all files defined in meta-data files
210 MetaDataFileCheckGenerateFileList = 1
211 # The path of log file
212 MetaDataFileCheckPathOfGenerateFileList = File.log
213 # Check whether all Library Instances defined for a given module (or dependent library instance) match the module's type.
214 # Each Library Instance must specify the Supported Module Types in its INF file,
215 # and any module specifying the library instance must be one of the supported types.
216 MetaDataFileCheckLibraryInstance = 1
217 # Check whether a Library Instance has been defined for all dependent library classes
218 MetaDataFileCheckLibraryInstanceDependent = 1
219 # Check whether the Library Instances specified by the LibraryClasses sections are listed in order of dependencies
220 MetaDataFileCheckLibraryInstanceOrder = 1
221 # Check whether the unnecessary inclusion of library classes in the INF file
222 MetaDataFileCheckLibraryNoUse = 1
223 # Check whether an INF file is specified in the FDF file, but not in the DSC file, then the INF file must be for a Binary module only
224 MetaDataFileCheckBinaryInfInFdf = 1
225 # Not to report error and warning related OS include file such as "windows.h" and "stdio.h".
226 # Check whether a PCD is set in a DSC file or the FDF file, but not in both.
227 MetaDataFileCheckPcdDuplicate = 1
228 # Check whether PCD settings in the FDF file can only be related to flash.
229 MetaDataFileCheckPcdFlash = 1
230 # Check whether PCDs used in INF files but not specified in DSC or FDF files
231 MetaDataFileCheckPcdNoUse = 1
232 # Check whether having duplicate guids defined for Guid/Protocol/Ppi
233 MetaDataFileCheckGuidDuplicate = 1
234 # Check whether all files under module directory are described in INF files
235 MetaDataFileCheckModuleFileNoUse = 1
236 # Check whether the PCD is correctly used in C function via its type
237 MetaDataFileCheckPcdType = 1
238 # Check whether there are FILE_GUID duplication among different INF files
239 MetaDataFileCheckModuleFileGuidDuplication = 1
240
241 #
242 # The check points in this section are reserved
243 #
244 # GotoStatementCheckAll = 0
245 # SpellingCheckAll = 0
246 #
247
248 # A list for binary file ext name
249 BinaryExtList = EXE, EFI, FV, ROM, DLL, COM, BMP, GIF, PYD, CMP, BIN, JPG, UNI, RAW, COM2, LIB, DEPEX, SYS, DB