Tool to calculate Cyclomatic Complexity for C code

Olppah picture Olppah · Mar 19, 2014 · Viewed 14.9k times · Source

I want a tool to analyse my code quality and after a bit of googling I think I understand that Cyclomatic Complexity could be something to start with here. I have tried to get several tools working but without success (found out that most are developed for Java). My requirements are:

  • Should work on C code
  • Should work on Ubuntu (12.04)
  • Should be free
  • (Optional) Plugin for eclipse

I would be grateful for any help

Answer

BЈовић picture BЈовић · Mar 19, 2014

There is Eclipse metriculator plugin.

There is also cccc - an open source program to analyze code.