Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java tool for calculating cyclomatic complexity [closed]

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!

like image 443
lucian.marcuta Avatar asked Aug 29 '26 00:08

lucian.marcuta


2 Answers

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.

like image 195
Mick Mnemonic Avatar answered Aug 31 '26 12:08

Mick Mnemonic


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

like image 32
John Avatar answered Aug 31 '26 13:08

John



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!