I want to know is there any way to find the cyclomatic complexity of the project created in Xcode.
Thanks
You can use Static Analyzer for CLang, it can be integrated with Xcode and it'll perform some basic analysis to produce quality indices (such as cyclomatic compexity) and more advanced static analysis (to detect possible bugs, defects, hard to maintain code).
See this tutorial for instruction about integration.
From website:
The Clang Static Analyzer is a source code analysis tool that finds bugs in C, C++, and Objective-C programs.
If you don't really need a full static analysis tool you may consider to use a more simple program to just calculate cyclomatic complexity. HFCCA is a simple Phyton script that can be used from command line and produces some very basic indices (lines of code without comments, cyclomatic complexity, token count of functions and parameter count of functions).
It's a command line tool but it can be integrated in XCode (take a start from CLang analyzer to see how).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With