Difference between revisions of "Static Code Analysis"

From Gcube Wiki
Jump to: navigation, search
(Created page with '__TOC__ Static Code Analysis is a testing methodology that tests software's source code, without actually running the program. Aspects checked by static analysis are: syntax cor…')
 
Line 10: Line 10:
  
 
== Checkstyle ==
 
== Checkstyle ==
[http://checkstyle.sourceforge.net/ Checkstyle] is one of the most famous java code analysis tool. It is capable of checking
+
Checkstyle tool is automatically run by ETICS at the end of each gCube integration build (see [[Continuous Integration procedure]] and reports are published in [[BTRT|BTRT]] along with other reports. Checkstyle reports are used as input for the [[Documentation Validation procedure]].
 +
 
 +
The default checkstyle configuration used is on the subversion repository at:
 +
 
 +
http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/Common/javadoc-checks/javadoc_checks.xml
 +
 
 +
It checks gCube components against official Javadoc Conventions [http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html], the presence of methods and class javadoc documentation, some programming best practice.

Revision as of 11:45, 15 January 2012

Contents

Static Code Analysis is a testing methodology that tests software's source code, without actually running the program. Aspects checked by static analysis are: syntax correctness of source code, compliance with formatting guidelines, correctness of algorithms, probable bugs, presence of a proper code documentation.


gCube System exploits the ETICS building tool to carry out static analysis of code. Indeed, ETICS System offers to its users the capability of running a large set of static code analysis tools during ETICS builds. This is made possible by the ETICS plugin mechanism: users choose the set of plugins to run during builds of their project and ETICS will run those plugins at every build; reports of plugins executions will be made available along with other build reports. In particular, gCube project in ETICS is configured to run two famous static code analysis tools for java software:


Checkstyle

Checkstyle tool is automatically run by ETICS at the end of each gCube integration build (see Continuous Integration procedure and reports are published in BTRT along with other reports. Checkstyle reports are used as input for the Documentation Validation procedure.

The default checkstyle configuration used is on the subversion repository at:

http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/Common/javadoc-checks/javadoc_checks.xml

It checks gCube components against official Javadoc Conventions [1], the presence of methods and class javadoc documentation, some programming best practice.