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