]> git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/Python/Ecc/config.ini
BaseTools/Capsule: Do not support -o with --dump-info
[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 - 2015, 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, STATIC
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 # Check whether UNI file is valid
74 GeneralCheckUni = 1
75 # Check Only use CRLF (Carriage Return Line Feed) line endings.
76 self.GeneralCheckLineEnding = 1
77 # Check if there is no trailing white space in one line.
78 self.GeneralCheckTrailingWhiteSpaceLine = 1
79
80 #
81 # Space Checking
82 #
83 SpaceCheckAll = 1
84
85 #
86 # Predicate Expression Checking
87 #
88 PredicateExpressionCheckAll = 0
89
90 # Check whether Boolean values, variable type BOOLEAN not use explicit comparisons to TRUE or FALSE
91 PredicateExpressionCheckBooleanValue = 1
92 # Check whether Non-Boolean comparisons use a compare operator (==, !=, >, < >=, <=).
93 PredicateExpressionCheckNonBooleanOperator = 1
94 # Check whether a comparison of any pointer to zero must be done via the NULL type
95 PredicateExpressionCheckComparisonNullType = 1
96
97 #
98 # Headers Checking
99 #
100 HeaderCheckAll = 0
101
102 # Check whether File header exists
103 HeaderCheckFile = 1
104 # Check whether Function header exists
105 HeaderCheckFunction = 1
106 # Check whether Meta data File header Comment End with '##'
107 HeaderCheckFileCommentEnd = 0
108 # Check whether C File header Comment content start with two spaces
109 HeaderCheckCFileCommentStartSpacesNum = 0
110 # Check whether C File header Comment's each reference at list should begin with a bullet character '-'
111 HeaderCheckCFileCommentReferenceFormat = 0
112 # Check whether C File header Comment have the License immediately after the ""Copyright"" line
113 HeaderCheckCFileCommentLicenseFormat = 0
114
115 #
116 # C Function Layout Checking
117 #
118 CFunctionLayoutCheckAll = 0
119
120 # Check whether return type exists and in the first line
121 CFunctionLayoutCheckReturnType = 1
122 # Check whether any optional functional modifiers exist and next to the return type
123 CFunctionLayoutCheckOptionalFunctionalModifier = 1
124 # Check whether the next line contains the function name, left justified, followed by the beginning of the parameter list
125 # Check whether the closing parenthesis is on its own line and also indented two spaces
126 CFunctionLayoutCheckFunctionName = 1
127 # Check whether the function prototypes in include files have the same form as function definitions
128 CFunctionLayoutCheckFunctionPrototype = 1
129 # Check whether the body of a function is contained by open and close braces that must be in the first column
130 CFunctionLayoutCheckFunctionBody = 1
131 # Check whether the data declarations is the first code in a module.
132 CFunctionLayoutCheckDataDeclaration = 1
133 # Check whether no initialization of a variable as part of its declaration
134 CFunctionLayoutCheckNoInitOfVariable = 1
135 # Check whether no use of STATIC for functions
136 CFunctionLayoutCheckNoStatic = 1
137
138 #
139 # Include Files Checking
140 #
141 IncludeFileCheckAll = 0
142
143 #Check whether having include files with same name
144 IncludeFileCheckSameName = 1
145 # Check whether all include file contents is guarded by a #ifndef statement.
146 # the #ifndef must be the first line of code following the file header comment
147 # the #endif must appear on the last line in the file
148 IncludeFileCheckIfndefStatement = 1
149 # Check whether include files contain only public or only private data
150 # Check whether include files NOT contain code or define data variables
151 IncludeFileCheckData = 1
152
153 #
154 # Declarations and Data Types Checking
155 #
156 DeclarationDataTypeCheckAll = 0
157
158 # Check whether no use of int, unsigned, char, void, static, long in any .c, .h or .asl files.
159 DeclarationDataTypeCheckNoUseCType = 1
160 # 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
161 DeclarationDataTypeCheckInOutModifier = 1
162 # Check whether the EFIAPI modifier should be used at the entry of drivers, events, and member functions of protocols
163 DeclarationDataTypeCheckEFIAPIModifier = 1
164 # Check whether Enumerated Type has a 'typedef' and the name is capital
165 DeclarationDataTypeCheckEnumeratedType = 1
166 # Check whether Structure Type has a 'typedef' and the name is capital
167 DeclarationDataTypeCheckStructureDeclaration = 1
168 # Check whether having same Structure
169 DeclarationDataTypeCheckSameStructure = 1
170 # Check whether Union Type has a 'typedef' and the name is capital
171 DeclarationDataTypeCheckUnionType = 1
172
173
174 #
175 # Naming Conventions Checking
176 #
177 NamingConventionCheckAll = 0
178
179 # Check whether only capital letters are used for #define declarations
180 NamingConventionCheckDefineStatement = 1
181 # Check whether only capital letters are used for typedef declarations
182 NamingConventionCheckTypedefStatement = 1
183 # Check whether the #ifndef at the start of an include file uses both prefix and postfix underscore characters, '_'.
184 NamingConventionCheckIfndefStatement = 1
185 # Rule for path name, variable name and function name
186 # 1. First character should be upper case
187 # 2. Existing lower case in a word
188 # 3. No space existence
189 # 4. Global variable name must start by a 'g'
190 # Check whether the path name followed the rule
191 NamingConventionCheckPathName = 1
192 # Check whether the variable name followed the rule
193 NamingConventionCheckVariableName = 1
194 # Check whether the function name followed the rule
195 NamingConventionCheckFunctionName = 1
196 # Check whether NO use short variable name with single character
197 NamingConventionCheckSingleCharacterVariable = 1
198
199 #
200 # Doxygen Checking
201 #
202 DoxygenCheckAll = 0
203
204 # Check whether the file headers are followed Doxygen special documentation blocks in section 2.3.5
205 DoxygenCheckFileHeader = 1
206 # Check whether the function headers are followed Doxygen special documentation blocks in section 2.3.5
207 DoxygenCheckFunctionHeader = 1
208 # Check whether the first line of text in a comment block is a brief description of the element being documented.
209 # The brief description must end with a period.
210 DoxygenCheckCommentDescription = 1
211 # Check whether comment lines with '///< ... text ...' format, if it is used, it should be after the code section.
212 DoxygenCheckCommentFormat = 1
213 # Check whether only Doxygen commands allowed to mark the code are @bug and @todo.
214 DoxygenCheckCommand = 1
215
216 #
217 # Meta-Data File Processing Checking
218 #
219 MetaDataFileCheckAll = 0
220
221 # Check whether each file defined in meta-data exists
222 MetaDataFileCheckPathName = 1
223 # Generate a list for all files defined in meta-data files
224 MetaDataFileCheckGenerateFileList = 1
225 # The path of log file
226 MetaDataFileCheckPathOfGenerateFileList = File.log
227 # Check whether all Library Instances defined for a given module (or dependent library instance) match the module's type.
228 # Each Library Instance must specify the Supported Module Types in its INF file,
229 # and any module specifying the library instance must be one of the supported types.
230 MetaDataFileCheckLibraryInstance = 1
231 # Check whether a Library Instance has been defined for all dependent library classes
232 MetaDataFileCheckLibraryInstanceDependent = 1
233 # Check whether the Library Instances specified by the LibraryClasses sections are listed in order of dependencies
234 MetaDataFileCheckLibraryInstanceOrder = 1
235 # Check whether the unnecessary inclusion of library classes in the INF file
236 MetaDataFileCheckLibraryNoUse = 1
237 # Check the header file in Include\Library directory whether be defined in the package DEC file.
238 MetaDataFileCheckLibraryDefinedInDec = 1
239 # 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
240 MetaDataFileCheckBinaryInfInFdf = 1
241 # Not to report error and warning related OS include file such as "windows.h" and "stdio.h".
242 # Check whether a PCD is set in a DSC file or the FDF file, but not in both.
243 MetaDataFileCheckPcdDuplicate = 1
244 # Check whether PCD settings in the FDF file can only be related to flash.
245 MetaDataFileCheckPcdFlash = 1
246 # Check whether PCDs used in INF files but not specified in DSC or FDF files
247 MetaDataFileCheckPcdNoUse = 0
248 # Check whether having duplicate guids defined for Guid/Protocol/Ppi
249 MetaDataFileCheckGuidDuplicate = 1
250 # Check whether all files under module directory are described in INF files
251 MetaDataFileCheckModuleFileNoUse = 1
252 # Check whether the PCD is correctly used in C function via its type
253 MetaDataFileCheckPcdType = 1
254 # Check whether there are FILE_GUID duplication among different INF files
255 MetaDataFileCheckModuleFileGuidDuplication = 1
256
257 #
258 # Uni File Processing Checking
259 #
260 UniCheckAll = 0
261 # Check INF or DEC file whether defined the localized information in the associated UNI file.
262 UniCheckHelpInfo = 1
263 # Check PCD whether defined the prompt, help in the DEC file and localized information in the associated UNI file.
264 UniCheckPCDInfo = 1
265 # Uncheck whether UNI file is in UTF-16 format
266 GeneralCheckUni = -1
267
268 #
269 # SMM Communicate Function Parameter Checking
270 #
271 SmmCommParaCheckAll = 0
272 # Check if the EFI_SMM_COMMUNICATION_PROTOCOL parameter buffer type is Reserved / ACPI NVS or UEFI RT code/data
273 SmmCommParaCheckBufferType = 1
274
275 #
276 # The check points in this section are reserved
277 #
278 # GotoStatementCheckAll = 0
279 # SpellingCheckAll = 0
280 #
281
282 # A list for binary file ext name
283 BinaryExtList = EXE, EFI, FV, ROM, DLL, COM, BMP, GIF, PYD, CMP, BIN, JPG, UNI, RAW, COM2, LIB, DEPEX, SYS, DB
284 # A list for only scanning dirs, the dirs should be the top folder(s) under workspace
285 ScanOnlyDirList = ScanFolder1 ScanFolder2