]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/Source/Python/Ecc/config.ini
BaseTools:ECC report errors on account of analyze special characters
[mirror_edk2.git] / BaseTools / Source / Python / Ecc / config.ini
CommitLineData
30fdf114
LG
1## @file\r
2# This file is used to set configuration of ECC tool\r
3# For the items listed below, 1 means valid, 0 means invalid\r
4#\r
1b2467c5 5# Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>\r
2e351cbe 6# SPDX-License-Identifier: BSD-2-Clause-Patent\r
30fdf114
LG
7#\r
8\r
9#\r
10# Identify the version of current configuration\r
11#\r
12Version = 0.1\r
13\r
14#\r
15# Identify to if check all items\r
16# 1 - Check all items and ignore all other detailed items\r
17# 0 - Not check all items, the tool will go through all other detailed items to decide to check or not\r
e56468c0 18#\r
30fdf114
LG
19CheckAll = 0\r
20\r
21#\r
22# Identify to if automatically correct mistakes\r
23# 1 - Automatically correct\r
24# 0 - Not automatically correct\r
25# Only the following check points can be automatically corrected, others not listed below are not supported even it is 1\r
26#\r
27# GeneralCheckTab\r
28# GeneralCheckIndentation\r
29# GeneralCheckLine\r
30# GeneralCheckCarriageReturn\r
31# SpaceCheckAll\r
32#\r
33AutoCorrect = 1\r
34\r
35#\r
36# List customized Modifer here, split with ','\r
37#\r
72358997 38ModifierList = IN, OUT, OPTIONAL, UNALIGNED, EFI_RUNTIMESERVICE, EFI_BOOTSERVICE, EFIAPI, TPMINTERNALAPI, STATIC\r
30fdf114
LG
39\r
40#\r
41# General Checking\r
42#\r
43GeneralCheckAll = 0\r
44\r
45# Check whether NO Tab is used, replaced with spaces\r
46GeneralCheckNoTab = 1\r
47# The width of Tab\r
48GeneralCheckTabWidth = 2\r
49# Check whether the indentation is followed coding style\r
50GeneralCheckIndentation = 1\r
51# The width of indentation\r
52GeneralCheckIndentationWidth = 2\r
53# Check whether no line is exceeding defined widty\r
54GeneralCheckLine = 1\r
55# The width of a line\r
56GeneralCheckLineWidth = 120\r
57# Check whether no use of _asm in the source file\r
58GeneralCheckNo_Asm = 1\r
59# Check whether no use of "#progma" in source file except "#pragma pack(#)".\r
60GeneralCheckNoProgma = 1\r
61# Check whether there is a carriage return at the end of the file\r
62GeneralCheckCarriageReturn = 1\r
63# Check whether the file exists\r
64GeneralCheckFileExistence = 1\r
e56468c0 65# Check whether file has non ACSII char\r
66GeneralCheckNonAcsii = 1\r
b3d07ff8
HC
67# Check whether UNI file is valid\r
68GeneralCheckUni = 1\r
a1583a87 69# Check Only use CRLF (Carriage Return Line Feed) line endings.\r
855698fb 70GeneralCheckLineEnding = 1\r
a1583a87 71# Check if there is no trailing white space in one line.\r
855698fb 72GeneralCheckTrailingWhiteSpaceLine = 1\r
30fdf114
LG
73\r
74#\r
75# Space Checking\r
76#\r
77SpaceCheckAll = 1\r
78\r
79#\r
80# Predicate Expression Checking\r
81#\r
82PredicateExpressionCheckAll = 0\r
83\r
84# Check whether Boolean values, variable type BOOLEAN not use explicit comparisons to TRUE or FALSE\r
85PredicateExpressionCheckBooleanValue = 1\r
e56468c0 86# Check whether Non-Boolean comparisons use a compare operator (==, !=, >, < >=, <=).\r
30fdf114
LG
87PredicateExpressionCheckNonBooleanOperator = 1\r
88# Check whether a comparison of any pointer to zero must be done via the NULL type\r
89PredicateExpressionCheckComparisonNullType = 1\r
90\r
91#\r
92# Headers Checking\r
93#\r
94HeaderCheckAll = 0\r
95\r
96# Check whether File header exists\r
97HeaderCheckFile = 1\r
98# Check whether Function header exists\r
99HeaderCheckFunction = 1\r
d0acc87a
LG
100# Check whether Meta data File header Comment End with '##'\r
101HeaderCheckFileCommentEnd = 0\r
102# Check whether C File header Comment content start with two spaces\r
103HeaderCheckCFileCommentStartSpacesNum = 0\r
104# Check whether C File header Comment's each reference at list should begin with a bullet character '-'\r
105HeaderCheckCFileCommentReferenceFormat = 0\r
106# Check whether C File header Comment have the License immediately after the ""Copyright"" line\r
107HeaderCheckCFileCommentLicenseFormat = 0\r
30fdf114
LG
108\r
109#\r
110# C Function Layout Checking\r
111#\r
112CFunctionLayoutCheckAll = 0\r
113\r
114# Check whether return type exists and in the first line\r
115CFunctionLayoutCheckReturnType = 1\r
116# Check whether any optional functional modifiers exist and next to the return type\r
117CFunctionLayoutCheckOptionalFunctionalModifier = 1\r
118# Check whether the next line contains the function name, left justified, followed by the beginning of the parameter list\r
119# Check whether the closing parenthesis is on its own line and also indented two spaces\r
120CFunctionLayoutCheckFunctionName = 1\r
121# Check whether the function prototypes in include files have the same form as function definitions\r
122CFunctionLayoutCheckFunctionPrototype = 1\r
123# Check whether the body of a function is contained by open and close braces that must be in the first column\r
124CFunctionLayoutCheckFunctionBody = 1\r
125# Check whether the data declarations is the first code in a module.\r
126CFunctionLayoutCheckDataDeclaration = 1\r
127# Check whether no initialization of a variable as part of its declaration\r
128CFunctionLayoutCheckNoInitOfVariable = 1\r
129# Check whether no use of STATIC for functions\r
130CFunctionLayoutCheckNoStatic = 1\r
131\r
132#\r
133# Include Files Checking\r
134#\r
135IncludeFileCheckAll = 0\r
136\r
137#Check whether having include files with same name\r
138IncludeFileCheckSameName = 1\r
139# Check whether all include file contents is guarded by a #ifndef statement.\r
140# the #ifndef must be the first line of code following the file header comment\r
141# the #endif must appear on the last line in the file\r
142IncludeFileCheckIfndefStatement = 1\r
143# Check whether include files contain only public or only private data\r
144# Check whether include files NOT contain code or define data variables\r
145IncludeFileCheckData = 1\r
146\r
147#\r
148# Declarations and Data Types Checking\r
149#\r
150DeclarationDataTypeCheckAll = 0\r
151\r
152# Check whether no use of int, unsigned, char, void, static, long in any .c, .h or .asl files.\r
153DeclarationDataTypeCheckNoUseCType = 1\r
154# 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\r
155DeclarationDataTypeCheckInOutModifier = 1\r
156# Check whether the EFIAPI modifier should be used at the entry of drivers, events, and member functions of protocols\r
157DeclarationDataTypeCheckEFIAPIModifier = 1\r
158# Check whether Enumerated Type has a 'typedef' and the name is capital\r
159DeclarationDataTypeCheckEnumeratedType = 1\r
160# Check whether Structure Type has a 'typedef' and the name is capital\r
161DeclarationDataTypeCheckStructureDeclaration = 1\r
162# Check whether having same Structure\r
163DeclarationDataTypeCheckSameStructure = 1\r
164# Check whether Union Type has a 'typedef' and the name is capital\r
165DeclarationDataTypeCheckUnionType = 1\r
166\r
167\r
168#\r
169# Naming Conventions Checking\r
170#\r
171NamingConventionCheckAll = 0\r
172\r
173# Check whether only capital letters are used for #define declarations\r
174NamingConventionCheckDefineStatement = 1\r
175# Check whether only capital letters are used for typedef declarations\r
176NamingConventionCheckTypedefStatement = 1\r
177# Check whether the #ifndef at the start of an include file uses both prefix and postfix underscore characters, '_'.\r
178NamingConventionCheckIfndefStatement = 1\r
179# Rule for path name, variable name and function name\r
180# 1. First character should be upper case\r
181# 2. Existing lower case in a word\r
182# 3. No space existence\r
183# 4. Global variable name must start by a 'g'\r
184# Check whether the path name followed the rule\r
185NamingConventionCheckPathName = 1\r
186# Check whether the variable name followed the rule\r
187NamingConventionCheckVariableName = 1\r
188# Check whether the function name followed the rule\r
189NamingConventionCheckFunctionName = 1\r
190# Check whether NO use short variable name with single character\r
191NamingConventionCheckSingleCharacterVariable = 1\r
192\r
193#\r
194# Doxygen Checking\r
195#\r
196DoxygenCheckAll = 0\r
197\r
198# Check whether the file headers are followed Doxygen special documentation blocks in section 2.3.5\r
199DoxygenCheckFileHeader = 1\r
200# Check whether the function headers are followed Doxygen special documentation blocks in section 2.3.5\r
201DoxygenCheckFunctionHeader = 1\r
e56468c0 202# Check whether the first line of text in a comment block is a brief description of the element being documented.\r
30fdf114
LG
203# The brief description must end with a period.\r
204DoxygenCheckCommentDescription = 1\r
205# Check whether comment lines with '///< ... text ...' format, if it is used, it should be after the code section.\r
206DoxygenCheckCommentFormat = 1\r
207# Check whether only Doxygen commands allowed to mark the code are @bug and @todo.\r
208DoxygenCheckCommand = 1\r
209\r
210#\r
211# Meta-Data File Processing Checking\r
212#\r
213MetaDataFileCheckAll = 0\r
214\r
215# Check whether each file defined in meta-data exists\r
216MetaDataFileCheckPathName = 1\r
217# Generate a list for all files defined in meta-data files\r
218MetaDataFileCheckGenerateFileList = 1\r
219# The path of log file\r
220MetaDataFileCheckPathOfGenerateFileList = File.log\r
e56468c0 221# Check whether all Library Instances defined for a given module (or dependent library instance) match the module's type.\r
222# Each Library Instance must specify the Supported Module Types in its INF file,\r
30fdf114
LG
223# and any module specifying the library instance must be one of the supported types.\r
224MetaDataFileCheckLibraryInstance = 1\r
225# Check whether a Library Instance has been defined for all dependent library classes\r
226MetaDataFileCheckLibraryInstanceDependent = 1\r
227# Check whether the Library Instances specified by the LibraryClasses sections are listed in order of dependencies\r
228MetaDataFileCheckLibraryInstanceOrder = 1\r
229# Check whether the unnecessary inclusion of library classes in the INF file\r
230MetaDataFileCheckLibraryNoUse = 1\r
14239f66
HC
231# Check the header file in Include\Library directory whether be defined in the package DEC file.\r
232MetaDataFileCheckLibraryDefinedInDec = 1\r
30fdf114
LG
233# 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\r
234MetaDataFileCheckBinaryInfInFdf = 1\r
235# Not to report error and warning related OS include file such as "windows.h" and "stdio.h".\r
236# Check whether a PCD is set in a DSC file or the FDF file, but not in both.\r
237MetaDataFileCheckPcdDuplicate = 1\r
238# Check whether PCD settings in the FDF file can only be related to flash.\r
239MetaDataFileCheckPcdFlash = 1\r
240# Check whether PCDs used in INF files but not specified in DSC or FDF files\r
b3d07ff8 241MetaDataFileCheckPcdNoUse = 0\r
30fdf114
LG
242# Check whether having duplicate guids defined for Guid/Protocol/Ppi\r
243MetaDataFileCheckGuidDuplicate = 1\r
244# Check whether all files under module directory are described in INF files\r
245MetaDataFileCheckModuleFileNoUse = 1\r
246# Check whether the PCD is correctly used in C function via its type\r
247MetaDataFileCheckPcdType = 1\r
40d841f6
LG
248# Check whether there are FILE_GUID duplication among different INF files\r
249MetaDataFileCheckModuleFileGuidDuplication = 1\r
30fdf114 250\r
1b2467c5
HC
251#\r
252# Uni File Processing Checking\r
253#\r
254UniCheckAll = 0\r
255# Check INF or DEC file whether defined the localized information in the associated UNI file.\r
256UniCheckHelpInfo = 1\r
257# Check PCD whether defined the prompt, help in the DEC file and localized information in the associated UNI file.\r
258UniCheckPCDInfo = 1\r
b739e14d
HC
259# Uncheck whether UNI file is in UTF-16 format\r
260GeneralCheckUni = -1\r
1b2467c5 261\r
703ef6cf
HC
262#\r
263# SMM Communicate Function Parameter Checking\r
264#\r
265SmmCommParaCheckAll = 0\r
266# Check if the EFI_SMM_COMMUNICATION_PROTOCOL parameter buffer type is Reserved / ACPI NVS or UEFI RT code/data\r
267SmmCommParaCheckBufferType = 1\r
268\r
30fdf114
LG
269#\r
270# The check points in this section are reserved\r
271#\r
272# GotoStatementCheckAll = 0\r
273# SpellingCheckAll = 0\r
274#\r
e56468c0 275\r
276# A list for binary file ext name\r
277BinaryExtList = EXE, EFI, FV, ROM, DLL, COM, BMP, GIF, PYD, CMP, BIN, JPG, UNI, RAW, COM2, LIB, DEPEX, SYS, DB\r
e4ac870f
LG
278# A list for only scanning dirs, the dirs should be the top folder(s) under workspace\r
279ScanOnlyDirList = ScanFolder1 ScanFolder2\r
0cb3f771
FZ
280# A list for Used to circumvent special strings\r
281TokenReleaceList = L'', L'\"', L"\"", L''', L""", L"\"\"", L"\"^", L" \"", L"\" \""\r