RA2 - activity report
1. Working on plugins - according to the plan agreed on all-hands meeting 2. Analysing two tools for replacing CodeWizard. The conclusion is that these two tools just provide two required metrics. The other ones relevance should be verified by the consultant.
As plugin implementation, it is quite hard and time consuming, requires at least one month or more. See the detailed analysis below.
András will participate on today's meeting, he can provide more technical details. Eva will update the current metrics-plugins mapping document and will circulate soon.
Cppcheck
http://cppcheck.wiki.sourceforge.net/
A tool for static C++ analysis. It is a new tool appeared recently in sourceforge. This program tries to detect bugs that your C/C++ compiler don't see. The goal is no false positives. No xml, html reports.
It is easy to use, but the reports should be implemented.
It provides just one metric: “No null pointers”. The others are just similar ones and there relevance should be verified by the consultant.
Vera++
http://www.inspirel.com/vera/
Vera++ is a programmable tool for verification, analysis and
transformation of C++ source code. It is just a framework, not really a tool. Provides quite few default rules. It parses the C++ code and present it in the form of collections of various objects to user provideds scripts that will define the concrete actions to be executed.
Practically, the user has to write the rules checks.
It is hard to compile and build. It depends on the Boost libraries.
Requires tcl scripting language.
Additionally, it is quite hard to run. It does not produce reports: xml or html. It is just possible to redirect the output in a text file.
It provides just one metric: “Curly Brackets positioning”. The others are just similar ones and there relevance should be verified by the consultant.
*Metrics*
Filename in lowercase
File names should be well-formed (Vera++)
No C instruction (in C++ programming) à language dependent
C-style pointer cast in cpp file (Cppcheck)
Curly Brackets positioning
Curly brackets from the same pair should be either in the same line or in the same column (Vera++) Control structures should have complete curly-braced block of code
(Vera++)
*First character in variables names *
No never used variables
Check for functions that are never called (Cppcheck) Unused struct member (Cppcheck) Are all variables initialized by the constructors? (Cppcheck) Are there unused private functions (Cppcheck)
Too frequent “breaks” use – rule to be defined *No not variables de-allocation* *No null pointers*
dereferencing a null pointer (Cppcheck)
*Management of one instruction long “if” or one instruction long “cycle”
(parenthesis..)*