On Mon, 3 Mar 2008, Bhagwat Masalkar wrote: > Date: Mon, 3 Mar 2008 10:08:44 +0530 > From: Bhagwat Masalkar <[EMAIL PROTECTED]> > Reply-To: <[email protected]> > To: <[email protected]> > Subject: [twincling] Looking for open source static code analysis tool > > Dear all > > This is my first post to this community, I am looking for a open source tool > for static analysis. We mainly work on C language, C++ is not mandatory. > I got Splint from tool, I had downloaded it and working on from last one > week, I was not able to locate some points in this tool, which commercial > tools provide > ie > using Splint how to check the cyclometric complexity or Macabe's > complexity . > Also does not provide for how comment density in code ie no count for > minimum code comment availability. > > please suggest some tool . > > thanks > bhagwat. >
Hi Bhagwat: First of all a very warm welcome. Hope you have a good time here. Tools like Splint or CQUAL are type-based analysis tools. Cyclometric complexity or more correctly 'conditional complexity' of the source code is calculated by creating a graph of the source, wherein each statement is a node. The arrows between the nodes are potential execution routes. Thus the tool needs to ascertain: 1. branch coverage 2. path coverage while gcov does coverage analysis, it does not calculate conditional complexity. Tim Littlefair started an Open Source project as part of his MS project. You can see it here http://cccc.sourceforge.net/ It works both on Linux and MS operating systems. Tim's MS and PhD thesis is available at http://www.chs.ecu.edu.au/~tlittlef/index.html Perhaps this can get you started in the right direction. thanks Saifi.

