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