views:

7177

answers:

8

Can you recommend free tools for calcualting cyclomatic complexity. Looking for all languages.

One tool/language per answer please.

+1  A: 

For C# I use Dev Metrics.

Simon Johnson
it only supports .net 1.x... are you still using that old of a .net version?
Max Schmeling
the company is no longer doing business, and only .NET 1.x is supported. this tool is probably not relevant anymore
Marchy
+3  A: 

Sounds like you're asking for the Wikipedia link ;)

VVS
davenpcj
+3  A: 

I very good tool for .NET platform is NDepend and you also have a option in Visual Studio Team Systems (Under the Analyze menu in VS.NET)

Fossmo
+3  A: 

For C# I use SourceMonitor. It's not as elegant as I would like (it doesn't look at project files; it only looks at directories so if you've got old unused files lying there SourceMonitor will still pick it up and measure its CC) but it's free!

cruizer
+12  A: 

I use the metrics plugin for eclipse which calculates the complexity of your code. besides the cyclomatic complexity it can handle:

  • McCabe's Cyclomatic Complexity
  • Efferent Couplings
  • Lack of Cohesion in Methods
  • Lines Of Code in Method
  • Number Of Fields
  • Number Of Levels
  • Number Of Locals In Scope
  • Number Of Parameters
  • Number Of Statements
  • Weighted Methods Per Class
Sven
There! I was going to ask whether there is perhaps an Eclipse plugin that would do just that. Thanks for this tip. +1
Peter Perháč
Very good plugin.
fastcodejava
+1  A: 

A rather old free command line tool for C++ is cyclo I have used it succesfully on Linux and Windows for listing up the complexity of source files.

David Dibben
+3  A: 

Checkstyle plugin for Eclipse (Java)

Drejc
A: 

For both C++ and C#, I use http://www.blunck.info/ccm.html. Can run either from the command prompt or integrated with Visual Studio 2008/2010.

JB