Open Source or Freeware C Code Metrics tools?

1.9k Views Asked by At

I have been trying to find a tool (hopefully for MAC OS X but I don't mind migrating) -- that works -- for those dimensions but I had no luck. Maultech mention some, and so does this page but I was unable to make them work. Metre and ccount (listed on that page) seems to cover most of what I wanted. The tools also seem not up to date no anymore with makes me unsure if the outputs can still be trusted.

Is there any current C tool that can do this that is free or open source? Most of what I found is for Java or OO.

By simple metrics I mean for example calculating amount of, characters, blanks, functions, methods, amount of statements, depth of nests, etc.

By Size I mean line of code, and comments.

By Complexity I mean mccabe and halstead metric at the very least.

By Couple and Cohesion I mean interaction between function calls etc (this is a known SE principle).

1

There are 1 best solutions below

0
On

I usually use Frama-c.

You may want to take a look at its metrics plugin (McCabe's cyclomatic complexity, Halstead complexity, Value analysis coverage estimate, etc)

What is Frama-C ?

Frama-C is an extensible and collaborative platform dedicated to source-code analysis of C software.