|
1 Nokia CodeScanner Command Line Tool Release Notes |
|
2 ================================================= |
|
3 |
|
4 Version 2.1.1 |
|
5 ============= |
|
6 - Added support for user-defined rules. This can be done by |
|
7 adding a <customrules> element to the configuration file. |
|
8 Example : |
|
9 <codescannerConfig> |
|
10 <customrules> |
|
11 <customrule> |
|
12 <name>myOwnRule</name> |
|
13 <keyword type=”class”>CMyOwnClass</keyword> |
|
14 <filetype>h</filetype> |
|
15 <severity>low</severity> |
|
16 <title>My CodeScanner rule targeting CMyOwnClass</title> |
|
17 <description>Locate definition of CMyOwnClass</description> |
|
18 </customrule> |
|
19 </customrules> |
|
20 </codescannerConfig> |
|
21 Please refer to the document "CodeScanner XML Configuration File |
|
22 Specification" (CodeScanner_XML_ConfigFile_Spec.doc) for more |
|
23 information on this new element. |
|
24 |
|
25 - When scanning with low severity rules, CodeScanner now |
|
26 generates informative messages instead of warnings when the |
|
27 StdOut output format is selected. |
|
28 |
|
29 - Added support to disable individual error/warning via |
|
30 CodeScanner command embedded in comments. The format of this |
|
31 command : |
|
32 codescanner(::<rule name>)+ |
|
33 Example : |
|
34 void CTestCase::Foo() |
|
35 { |
|
36 array->At(a); // codescanner::accessArrayElementWithoutCheck |
|
37 User::Leave(KErrNone); /* codescanner::LeaveNoError */ |
|
38 } |
|
39 A complete list of CodeScanner rule names can be found in the |
|
40 document "CodeScanner_Rules.doc". |
|
41 |
|
42 - Added new rule to check whether Cancel() function is called |
|
43 in active object's destructor. |
|
44 Cancel() should always be called in active object's destructor |
|
45 to cancel an outstanding request if there is one. If there is |
|
46 no request pending then Cancel() just does nothing, but if we |
|
47 do not call Cancel() when having an outstanding request a panic |
|
48 will be raised. |
|
49 This new rule is set to low severity in the "Coding Standards" |
|
50 category by default. It can be configured by adding a |
|
51 <missingcancel> script element in the configuration |
|
52 file. |
|
53 Example : |
|
54 <codescannerConfig> |
|
55 <scripts> |
|
56 <missingcancel category="codingstandards" |
|
57 enable="true" |
|
58 severity="low"/> |
|
59 </scripts> |
|
60 </codescannerConfig> |
|
61 |
|
62 - Updated active object checking rule to ignore After() from |
|
63 RTimer type member variables. |
|
64 |
|
65 - Updated to skip excluded folders specified in configuration file |
|
66 when generating component summary reports. |
|
67 |
|
68 |
|
69 Version 2.1.0 |
|
70 ============= |
|
71 - Previously CodeScanner has been distributed as a single-file |
|
72 executable which packs all the DLLs and library modules it needed |
|
73 into an archive attached to itself. During runtime, it creates a |
|
74 directory (_MEI<id>) in the user's temp directory, and extract |
|
75 these files there. When execution is complete, it recursively |
|
76 removes the entire directory it created. |
|
77 Unfortunately the cleanup process sometimes fail. So over time |
|
78 user's temp directory can be littered with these directories, |
|
79 which can cause CodeScanner to fail if it tries to reuse a |
|
80 directory that was created from a previous run. |
|
81 To address this problem, we separated all these modules from |
|
82 CodeScanner.exe and shipping them "as is". This change should be |
|
83 transparent from user's point of view, except when copying |
|
84 CodeScanner to other locations on user's system. |
|
85 |
|
86 - Updated configuration file format to allow passing arguments |
|
87 to CodeScanner. One can now add an <arguments> element to the |
|
88 configuration file with one or more of the following |
|
89 child elements : |
|
90 <input> - specify additional directory/file to scan |
|
91 <outputformat> (html|xml|std) - specify output format |
|
92 <lxr> - url to lxr site |
|
93 <lxrversion> - lxr version |
|
94 <timestampedoutput> (on/off) - create time-stamped output directory |
|
95 Example: |
|
96 <codescannerConfig> |
|
97 <arguments> |
|
98 <input>C:\Testing\CodeScanner_Tests\Bug_6393\Includes</input> |
|
99 <outputformat>html|xml</outputformat> |
|
100 <lxr>http://s60lxr/source/</lxr> |
|
101 <lxrversion>S60_3_2_200736</lxrversion> |
|
102 <timestampedoutput>on</timestampedoutput> |
|
103 </arguments> |
|
104 </codescannerConfig> |
|
105 |
|
106 - Added new rule to check stack-based resource objects not put |
|
107 on the cleanup stack. |
|
108 If a stack-based resource object is not put on the cleanup stack |
|
109 with CleanupClosePushL() or CleanupResetAndDestroyPushL(), and |
|
110 a leaving function or ELeave is called, a memory leak occurs. |
|
111 CodeScanner occasionally gives false positives for this issue. |
|
112 Individual cases should be investigated. |
|
113 This new rule is set to low severity in the "Code Review" |
|
114 category by default. It can be configured by adding a |
|
115 <resourcenotoncleanupstack> script element in the configuration |
|
116 file. |
|
117 Example : |
|
118 <codescannerConfig> |
|
119 <scripts> |
|
120 <resourcenotoncleanupstack category="codereview" |
|
121 enable="true" |
|
122 severity="low"/> |
|
123 </scripts> |
|
124 </codescannerConfig> |
|
125 |
|
126 - Added new rule to check inheritance order of M and C classes. |
|
127 If a C class inherits first from an M class and then a C class, |
|
128 a panic can occur when trying to pop a CBase pointer pointing |
|
129 to such a class from the cleanup stack when in fact a pointer |
|
130 pointing to the first predecessor, the mixin class, was popped |
|
131 instead. |
|
132 This new rule is set to high severity in the "Can Panic" |
|
133 category by default. It can be configured by adding a |
|
134 <inheritanceorder> script element in the configuration file. |
|
135 Example : |
|
136 <codescannerConfig> |
|
137 <scripts> |
|
138 <inheritanceorder category="canpanic" |
|
139 enable="true" |
|
140 severity="high"/> |
|
141 </scripts> |
|
142 </codescannerConfig> |
|
143 |
|
144 - Updated rule for L-functions that cannot leave. It is now |
|
145 possible to specify functions to be ignored by this rule in the |
|
146 configuration file. This is done by adding a <LFunctionIgnoreRE> |
|
147 element to the <LFunctionCantLeave> script element. |
|
148 Example: |
|
149 <codescannerConfig> |
|
150 <scripts> |
|
151 <LFunctionCantLeave enable="true"> |
|
152 <LFunctionIgnoreRE>RunL</LFunctionIgnoreRE> |
|
153 </LFunctionCantLeave> |
|
154 </scripts> |
|
155 </codescannerConfig> |
|
156 |
|
157 - Updated description of rule for badly-named enum members. |
|
158 |
|
159 - Updated NULL equality check rule to ignore pointer comparisons |
|
160 with NULL inside various __ASSERT_XXX() macros. |
|
161 |
|
162 - Removed duplicate rule for hard-coded external drive letters. |
|
163 There is now only 1 rule that check for this problem and it is |
|
164 a low severity rule in the Coding Standard category. |
|
165 |
|
166 - Improved rule for accessing array element by [] without |
|
167 checking range. |
|
168 |
|
169 |
|
170 Version 2.0.9 |
|
171 ============= |
|
172 - Updated check for Open() to allow assignment of return value on |
|
173 a different line. |
|
174 Example : |
|
175 TInt error = |
|
176 myFile.Open(); |
|
177 |
|
178 |
|
179 Version 2.0.8 |
|
180 ============= |
|
181 - Updated check for C class not inheriting from another C class. |
|
182 It is now possible to specify C class that does not inherit from |
|
183 another C class in the configuration file. This is done by adding |
|
184 a <cclassIgnoreRE> element to the <missingcclass> script element. |
|
185 Example : |
|
186 <missingcclass enable="true"> |
|
187 <cclassIgnoreRE>CLogger|CKeypadData</cclassIgnoreRE> |
|
188 </missingcclass> |
|
189 |
|
190 - Updated check for ignored Open() return value. |
|
191 It is now possible to specify object or class with Open() method |
|
192 that does not return any value in the configuration file. |
|
193 This is done by adding an <openIgnoreRE> element to the |
|
194 <open> script element. For a local variable, one can specify |
|
195 either the type or variable name in the <openIgnoreRE> element. |
|
196 For other types of object, one should specify the object name in |
|
197 the <openIgnoreRE> element. |
|
198 Example: |
|
199 <open enable="true"> |
|
200 <openIgnoreRE>CKeyStore|iKeyStore|lKeyStore</openIgnoreRE> |
|
201 </open> |
|
202 |
|
203 - Fixed a bug where some scripts cannot be disabled from the |
|
204 configuration file. |
|
205 |
|
206 |
|
207 Version 2.0.7 |
|
208 ============= |
|
209 - Updated standard console output to include severity level and |
|
210 category information in the error/warning messages. |
|
211 |
|
212 - Incorporated Psyco module to improve scanning performance. Please |
|
213 refer to the document "MIT license.txt" for licensing info. |
|
214 |
|
215 |
|
216 Version 2.0.6 |
|
217 ============= |
|
218 - Updated check for CleanupStack::Pop(AndDestroy)() to ignore |
|
219 CleanupStack::Pop(TInt, TAny*) and |
|
220 CleanupStack::PopAndDestroy(TInt, TAny*) |
|
221 |
|
222 - Updated check for Open() to allow handler of return value on a |
|
223 different line. |
|
224 Example : |
|
225 User::LeaveIfError( |
|
226 myFile.Open()); |
|
227 |
|
228 - Updated check for At() to ignore timer objects. |
|
229 Example : |
|
230 TTime now; |
|
231 iTimer.At(iStatus, now); |
|
232 |
|
233 - Improved handling of scanning of code with #ifdef/#else/#endif |
|
234 preprocessor commands. CodeScanner sometimes can be confused by |
|
235 code surrounded by these preprocessor commands, e.g. generating |
|
236 warnings on member variable deleted incorrectly, even when it |
|
237 happens inside a destructor. This has been fixed. |
|
238 |
|
239 |
|
240 Version 2.0.5 |
|
241 ============= |
|
242 - Added new option to specify additional source directory/file : |
|
243 "-i <source dir/file>" -- specify additional directory/file to scan |
|
244 Example : codescanner -i C:\resources -i C:\includes |
|
245 C:\sources C:\results |
|
246 |
|
247 |
|
248 Version 2.0.4 |
|
249 ============= |
|
250 - Updated HTML generation to use '/' instead of '\' when generating |
|
251 links; this change is needed for Mozilla Firefox compatibility. |
|
252 |
|
253 - Added new option to toggle creation of time-stamped directory for |
|
254 results : |
|
255 "-t on/off" -- create a time-stamped directory for results; default |
|
256 is on |
|
257 Example : codescanner -t off C:\sources C:\results |
|
258 |
|
259 - Added new option to configure output format of results: |
|
260 "-o html|xml|std" -- specify output format : HTML, XML or StdOut; |
|
261 default output format is HTML |
|
262 Multiple output formats can be specified at the same time. |
|
263 Example : codescanner -o xml,html C:\sources C:\results |
|
264 |
|
265 - Updated configuration file format to allow user setting the |
|
266 category and severity of scripts individually. Each <scripts> element |
|
267 contains one or more Script elements, each of which corresponds to a |
|
268 CodeScanner rule. Each Script element has the following attributes: |
|
269 enable (boolean) – specifies whether a script is enabled by CodeScanner. |
|
270 severity (string) – specifies the severity level of a script. |
|
271 category (string) – specifies the category of a script. |
|
272 Example : |
|
273 <codescannerConfig> |
|
274 <scripts> |
|
275 <baddefines enable="true" severity="low" category="codingstandards"/> |
|
276 <friend enable="true" severity="low" category="codereview"/> |
|
277 <leave enable="true" severity="high" category="canpanic"/> |
|
278 </scripts> |
|
279 </codescannerConfig> |
|
280 |
|
281 |
|
282 Version 2.0.3 |
|
283 ============= |
|
284 - Updated HTML generation so that links with the '#' character can be |
|
285 opened by Mozilla Firefox correctly. |
|
286 |
|
287 - Added new options to generate links to LXR server instead of local |
|
288 file system. The new options are : |
|
289 "-x" -- specify URL of LXR site |
|
290 "-r" -- specify LXR version |
|
291 |
|
292 Example : codescanner -x http://some.lxr.server/sources/ -r S60_3_2_12 |
|
293 C:\sources C:\results |
|
294 |
|
295 Once scanning is completed, the results will point to the remote |
|
296 LXR server instead of the local "C:\sources" folder. |
|
297 *****This new feature has been contributed by James Uther of Nokia***** |
|
298 |
|
299 |
|
300 Version 2.0.2 |
|
301 ============= |
|
302 - Updated HTML generation so that source file links can be opened by |
|
303 Mozilla Firefox. |
|
304 |
|
305 - Improved handling of function parameter list spanning multiple lines. |
|
306 Example : |
|
307 void CMenuBar::MyMenu (const HBufC* a, |
|
308 const TDesC& b) |
|
309 { ... } |
|
310 |
|
311 - Improved handling of TRAP block spanning multiple lines. |
|
312 Example : |
|
313 TRAPD( |
|
314 err, |
|
315 WaitDialogL(aErrorCode) |
|
316 ); |
|
317 |
|
318 - Updated handling of NULL equality check to allow comparison with NULL |
|
319 in return statement. |
|
320 Example : |
|
321 return (ptr != NULL); |
|
322 |
|
323 - Updated handling of hard-coded numbers so that '2' is no longer |
|
324 considered a 'magic number'. |
|
325 |
|
326 |
|
327 Version 2.0.1b |
|
328 ============== |
|
329 - When checking for leaving functions called in non-leaving functions, |
|
330 Cases where macros are used for class declarations are now filtered out. |
|
331 Example : |
|
332 NONSHARABLE_CLASS(CMyClass) : public CActive |
|
333 { ... } |
|
334 |
|
335 - When generating individual component report, text containing HTML tags |
|
336 (eg. <s>, <i>) are now cleaned up before written to file. This |
|
337 prevents unintended text formatting. |
|
338 |
|
339 - Corrected spelling mistake in usage info. |
|
340 |
|
341 |
|
342 Version 2.0.0a |
|
343 ============== |
|
344 - This is the first development release of Nokia's version of CodeScanner CLI. |
|
345 Our goals for this release are to : |
|
346 1) support feature-functions available in Mobile Innovation's CodeScanner v 1.11 |
|
347 2) address reported issues |
|
348 |
|
349 The following are known issues from CodeScanner v 1.11 : |
|
350 1) CodeScanner output is not entirely compatible with Mozilla Firefox. |
|
351 For security reasons, Mozila Firefox and Mozilla Suite do not allow links to |
|
352 local files (and directories). This includes linking to files on the hard drive, |
|
353 on mapped network drives, and those accessible via UNC paths. |
|
354 2) CodeScanner treats 2 as a ‘magic number’. In User Interface code, '2' is |
|
355 often used to calculate offsets and should not always be replaced by variable. |
|
356 3) CodeScanner does not ignore CleanupStack::Pop() without parameters |
|
357 if CleanupClosePushL() or similar utility is used. |
|
358 4) CodeScanner flags all use of #if in .h files irrespective of context. |
|
359 |
|
360 Licensing Notes |
|
361 =============== |
|
362 CodeScanner is built with Python 2.5.1 but does NOT use any of the following |
|
363 files or modules : |
|
364 python2.5-2.5.1/Lib/test/decimaltestdata/abs.decTest |
|
365 python2.5-2.5.1/Lib/test/decimaltestdata/add.decTest |
|
366 python2.5-2.5.1/Lib/test/decimaltestdata/base.decTest |
|
367 python2.5-2.5.1/Lib/test/decimaltestdata/clamp.decTest |
|
368 python2.5-2.5.1/Lib/test/decimaltestdata/compare.decTest |
|
369 python2.5-2.5.1/Lib/test/decimaltestdata/decimal128.decTest |
|
370 python2.5-2.5.1/Lib/test/decimaltestdata/decimal32.decTest |
|
371 python2.5-2.5.1/Lib/test/decimaltestdata/decimal64.decTest |
|
372 python2.5-2.5.1/Lib/test/decimaltestdata/divide.decTest |
|
373 python2.5-2.5.1/Lib/test/decimaltestdata/divideint.decTest |
|
374 python2.5-2.5.1/Lib/test/decimaltestdata/inexact.decTest |
|
375 python2.5-2.5.1/Lib/test/decimaltestdata/max.decTest |
|
376 python2.5-2.5.1/Lib/test/decimaltestdata/min.decTest |
|
377 python2.5-2.5.1/Lib/test/decimaltestdata/minus.decTest |
|
378 python2.5-2.5.1/Lib/test/decimaltestdata/multiply.decTest |
|
379 python2.5-2.5.1/Lib/test/decimaltestdata/normalize.decTest |
|
380 python2.5-2.5.1/Lib/test/decimaltestdata/plus.decTest |
|
381 python2.5-2.5.1/Lib/test/decimaltestdata/power.decTest |
|
382 python2.5-2.5.1/Lib/test/decimaltestdata/quantize.decTest |
|
383 python2.5-2.5.1/Lib/test/decimaltestdata/randomBound32.decTest |
|
384 python2.5-2.5.1/Lib/test/decimaltestdata/randoms.decTest |
|
385 python2.5-2.5.1/Lib/test/decimaltestdata/remainder.decTest |
|
386 python2.5-2.5.1/Lib/test/decimaltestdata/remainderNear.decTest |
|
387 python2.5-2.5.1/Lib/test/decimaltestdata/rescale.decTest |
|
388 python2.5-2.5.1/Lib/test/decimaltestdata/rounding.decTest |
|
389 python2.5-2.5.1/Lib/test/decimaltestdata/samequantum.decTest |
|
390 python2.5-2.5.1/Lib/test/decimaltestdata/squareroot.decTest |
|
391 python2.5-2.5.1/Lib/test/decimaltestdata/subtract.decTest |
|
392 python2.5-2.5.1/Lib/test/decimaltestdata/testall.decTest |
|
393 python2.5-2.5.1/Lib/test/decimaltestdata/tointegral.decTest |
|
394 /Demo/curses/tclock.py python2.5-2.5.1/Modules/expat/ascii.h |
|
395 python2.5-2.5.1/Modules/expat/asciitab.h |
|
396 python2.5-2.5.1/Modules/expat/expat.h |
|
397 python2.5-2.5.1/Modules/expat/expat_external.h |
|
398 python2.5-2.5.1/Modules/expat/iasciitab.h |
|
399 python2.5-2.5.1/Modules/expat/latin1tab.h |
|
400 python2.5-2.5.1/Modules/expat/utf8tab.h |
|
401 python2.5-2.5.1/Modules/expat/xmlparse.c |
|
402 python2.5-2.5.1/Modules/expat/xmlrole.c |
|
403 python2.5-2.5.1/Modules/expat/xmlrole.h |
|
404 python2.5-2.5.1/Modules/expat/xmltok.c |
|
405 python2.5-2.5.1/Modules/expat/xmltok.h |
|
406 python2.5-2.5.1/Modules/expat/xmltok_impl.c |
|
407 python2.5-2.5.1/Modules/expat/xmltok_impl.h |
|
408 python2.5-2.5.1/Doc/html/about.dat |
|
409 python2.5-2.5.1/Doc/html/stdabout.dat |
|
410 python2.5-2.5.1/Modules/expat/pyexpatns.h |
|
411 python2.5-2.5.1/Lib/robotparser.py |
|
412 python2.5-2.5.1/Lib/ctypes/macholib/README.ctypes |
|
413 python2.5-2.5.1/Lib/wsgiref.egg-info |
|
414 |
|
415 Please refer to the document "python 2_5_1 licenses.txt" for licensing info. |
|
416 |
|
417 |
|
418 This version of CodeScanner is intended for Nokia internal use only. |
|
419 |
|
420 Please report any problems found to : |
|
421 support.carbide@nokia.com |
|
422 |
|
423 |
|
424 Stephen Chong |
|
425 Nokia Corporation |
|
426 stephen.chong@nokia.com |