I need a tool that allows me to calculate cyclomatic complexity for methods of a given class. Also, I need to do this thing from Linux command line. Until now, I read about Source Monitor, Gmetrics and Sonar, but as far as I know these tools are not providing command line usage. Thanks!
Checkstyle computes cyclomatic complexity metrics and you can run it from command line.
Another great tool for static code analysis is PMD, which can also be used from the console.
You can use JArchitect tool, a pretty complete static analysis tool available on windows and linux, and it allows you to calculate the cyclomatic complexity and many other metrics from command line
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