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