8

I want to write my code more cleaner. For this purpose I'm looking for a tool to generate code metrics in Xcode. I'd like to have a statistic showing me how many tests, classes etc. were added. And the main goal is retrieving cyclomatic complexity of a program.

Does anyone know a good Xcode tools or plugin that could provide me some code metrics?

jww
  • 97,681
  • 90
  • 411
  • 885
Igor
  • 4,235
  • 3
  • 34
  • 32

2 Answers2

3

Have a look at Xcode Statistician.

Tim
  • 1,659
  • 1
  • 21
  • 33
  • Nice! Any idea what they mean by "Main File" as used in the "Count code in main files only"? – Monolo Jun 20 '12 at 11:02
  • I think it means to count in implementation files (.m extension) only, while skipping header files (.h extension). – Tim Jun 20 '12 at 11:38
  • 2
    Thank you, but what about retrieving cyclomatic complexity of application? – Igor Jun 20 '12 at 15:06
  • If you use it, you should group your classes inside folders in the `Project Navigator` inside `xCode`. If you use folders inside your project `Xcode Statistician` won't be able to give you stats of all files. – Alex Cio Feb 27 '14 at 16:38
1

A paying (~$5) but good solution: Project Statistics for Xcode.

jww
  • 97,681
  • 90
  • 411
  • 885
Axel Guilmin
  • 11,454
  • 9
  • 54
  • 64