1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <ConventionConfigurations>
4 <ALICECodingRules check = "true">
5 <Rules category = "NamingRules" check = "true">
8 <Description>@ No special characters in names are allowed (_,#,$,&,@,-,%).</Description>
12 <Description>@ Header file names are derived from the
13 @ class name and have the suffix ".h" (Classname.h).</Description>
17 <Description>@ Implementation file names are derived from
18 @ the class name and have the suffix ".cxx" (Classname.cxx).</Description>
22 <Description>@ Class name starts with the prefix "Ali".</Description>
26 <Description>@ Class names follow the general rule RN3.</Description>
30 <Description>@ Member function names start with a capital.</Description>
34 <Description>@ Member function names follow the general rule RN3.</Description>
38 <Description>@ Data member names start with a prefix "f".</Description>
42 <Description>@ Data member names follow the general rule RN3.</Description>
46 <Description>@ Local variables names start with a lower case letter.</Description>
50 <Description>@ Local variable names follow the general rule RN3.</Description>
54 <Description>@ Global non-constant, objects names start with a
55 @ prefix "gAli". Global constant objects names start
56 @ with a prefix "k".</Description>
60 <Description>@ Global variables names follow the general rule RN3.</Description>
64 <Description>@ Constants, including names in enumeration
65 @ types and constant statics start with a prefix "k".</Description>
69 <Description>@ Constant names follow the general rule RN3.</Description>
73 <Description>@ Static data members names start with a prefix "fg",
74 @ constant data members names start with a prefix "fk",
75 @ static constant data members start with a prefix "fgk".</Description>
79 <Description>@ Special data member names follow the general rule RN3.</Description>
82 <Rules category = "CodingRules" check = "true">
85 <Description>@ Header files begin and end with multiple-inclusion
86 @ protection, as follows:
91 @ where CLASSNAME is constructed from the name of
92 @ class by converting all letters to capitals.</Description>
96 <Description>@ Header files should hold the definition of a single
97 @ class. It is possible to define more classes in one
98 @ header file only if these classes are embedded.</Description>
100 <Rule check = "true">
102 <Description>@ Implementation files should hold all the member
103 @ function definitions for a single class (or embedded
104 @ classes) as defined in the corresponding header file.</Description>
106 <Rule check = "true">
108 <Description>@ All declarations are declared with friend first
109 @ (if there are any), then public, protected and private.</Description>
111 <Rule check = "true">
113 <Description>@ Usage of global variables should be avoided: they
114 @ should be encapsulated in a class. However global
115 @ variables pointing to the main object of a package can occur
116 @ (e.g. gAlice in AliRoot package).</Description>
118 <Rule check = "true">
120 <Description>@ The usage of friend classes should be avoided apart
121 @ from I/O overloading where it is needed.</Description>
123 <Rule check = "true">
125 <Description>@ All classes containing at least on virtual function
126 @ MUST have a virtual destractor.</Description>
128 <Rule check = "true">
130 <Description>@ A class that has a member datum with a type which is
131 @ a built-in pointer should have a copy constructor and
132 @ an assignment operator.</Description>
134 <Rule check = "true">
136 <Description>@ Make const all member functions that are not supposed
137 @ to change member data.</Description>
139 <Rule check = "true">
141 <Description>@ Dummy argument names in member function declarations
142 @ should be always provided, apart from arguments that are not used.</Description>
144 <Rule check = "true">
146 <Description>@ All class data members should be declared as
147 @ "private" or "protected".</Description>
149 <Rule check = "true">
151 <Description>@ Structures can be used only for accessing FORTRAN
152 @ common blocks, functions from external libraries, or internally
153 @ within a class. They can have only data members and eventually a
154 @ default constructor, member functions are not allowed. Classes
155 @ should be used instead in all other cases.</Description>
157 <Rule check = "true">
159 <Description>@ Using the following words or phrases
160 @ is not allowed in output statements.
161 @ Segmentation violation
165 @ Floating point exception
167 @ Busy flag cleared</Description>
169 <Rule check = "true">
171 <Description>@ Floating point numbers must not be compared
172 @ with the "==" or "!=" operators , but with
173 @ an appropriate function that calculates
174 @ how close the two values are to each other.
175 @ If the two numbers are "close enough",
176 @ then we call them equal. This rule does
177 @ not apply to the variables just after
178 @ initialization whose value is not
179 @ affected by rounding errors.</Description>
181 <Rule check = "true">
183 <Description>@ Data members of a class must not be redefined
184 @ in derived classes.</Description>
186 <Rule check = "true">
188 <Description>@ In parameters of a method, objects that are
189 @ passed by pointer or by reference and that are not
190 @ modified should be declared const.</Description>
192 <Rule check = "true">
194 <Description>@ The constructors used in Root I/O should not
195 @ allocate memory to data members. These constructors
196 @ are either the constructors which have TRootIOCtor*
197 @ as parameter type, or the default constructors. The
198 @ rule does not apply to classes excluded from Root
199 @ I/0 with ClassDef(ClassName,0).</Description>
201 <Rule check = "false">
203 <Description>@ The constant static data members of the basic
204 @ types should be initialized in the header file
205 @ and static data members in the implementation file.</Description>
207 <Rule check = "true">
209 <Description>@ The static data members of the object types
210 @ should be avoided. A static access function
211 @ returning a reference to the local static
212 @ variable should be used instead.</Description>
214 <Rule check = "true">
216 <Description>@ In the destructor, its not necessary to check
217 @ if a data member pointer is zero before
218 @ deleting it and/or to set it to zero.</Description>
220 <Rule check = "true">
222 <Description>@ When using math routines, use Root::TMath:: versions.</Description>
225 <Rules category = "Guidelines" check = "true">
226 <Rule check = "true">
228 <Description>@ To be careful especially with using exceptions,
229 @ and templates</Description>
231 <Rule check = "true">
233 <Description>@ When only referring to pointers or references to
234 @ types defined in the header file its often not necessary to
235 @ include that file. It may be sufficient to use forward declaration.</Description>
238 <Rules category = "StyleRules" check = "true">
239 <Rule check = "true">
241 <Description>@ Each class contains a description of the class
242 @ functionality placed at the beginning of the class header
243 @ file and an extensive description at the beginning of the
244 @class implementation file.</Description>
246 <Rule check = "true">
248 <Description>@ All data members of a class are described by a short
249 @comment following the data member declaration on the same line.</Description>
251 <Rule check = "true">
253 <Description>@ Member functions comments in implementation files should
254 @ be put on the new line after the first "{".</Description>
256 <Rule check = "true">
258 <Description>@ Header files should not have method body inside the class
259 @ definitions in case they do not fit on one or two lines or when the
260 @ inline function has unused arguments. The bodies of "inline" functions
261 @ should go to the end of the header file after the class definition.</Description>
263 <Rule check = "true">
265 <Description>@ There is no need to use the keyword "inline" when defining
266 @ the body of a function in the class definition.</Description>
271 <String>Segmentation violation</String>
272 <String>Segmentation fault</String>
273 <String>Bus error</String>
274 <String>Abort</String>
275 <String>Floating point exception</String>
276 <String>Segmentation fault</String>
277 <String>Killed</String>
278 <String>Busy flag cleared</String>
282 <ROOTCodingRules check = "true">
283 <Rules category = "NamingRules" check = "true">
284 <Rule check = "true">
286 <Description>@ No special characters in names are allowed (_,#,$,&,@,-,%).</Description>
288 <Rule check = "true">
290 <Description>@ Types begin with a capital letter and end with '_t'.</Description>
292 <Rule check = "true">
294 <Description>@ Base classes begin with 'T'.</Description>
296 <Rule check = "true">
298 <Description>@ Enumeration types begin with 'E'.</Description>
300 <Rule check = "true">
302 <Description>@ Avoid raw C types, we check for the non-portable (memory-wise) types
303 @ 'long', 'unsigned long', 'long double', 'bool', 'long long' and
304 @ 'unsigned long long'.</Description>
306 <Rule check = "true">
308 <Description>@ Attributes begin with 'f' and function begin with a capital letter.</Description>
310 <Rule check = "true">
312 <Description>@ Global static variables begin with 'g'.</Description>
314 <Rule check = "true">
316 <Description>@ Static data members begin with 'fg'.</Description>
318 <Rule check = "true">
320 <Description>@ Local variables and parameters begin with a lowercase word.</Description>
322 <Rule check = "true">
324 <Description>@ Constants begin with 'k', including names of enumeration,
325 @ constants and constant statics.</Description>
328 <Rules category = "StyleRules" check = "true">
329 <Rule check = "true">
331 <Description>@ <TAB> used for indentation.</Description>
333 <Rule check = "true">
335 <Description>@ <SPACE> of 3 should be used for indentation.</Description>
337 <Rule check = "true">
339 <Description>@ Comments should be written after ClassDef(...,#).</Description>
341 <Rule check = "true">
343 <Description>@ Member functions' comments should be put on the new line after the first "{".</Description>
348 </ConventionConfigurations>