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:
I would be grateful for any help
3) Cyclomatic complexity V(G) = P +1 V (G) = 2 + 1 = 3 Where P is predicate nodes (node 1 and node 2) are predicate nodes because from these nodes only the decision of which path is to be followed is taken. Thus Cyclomatic complexity is 3 for given code.
Cyclomatic complexity of a code section is the quantitative measure of the number of linearly independent paths in it. It is a software metric used to indicate the complexity of a program. It is computed using the Control Flow Graph of the program.
Three methods of evaluating the cyclomatic complexity of the graph.
There is Eclipse metriculator plugin.
There is also cccc - an open source program to analyze code.
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