I want to know that what should be the standard range of cyclomatic complexity?
And does it depends on language or platform or it is common for all?
I am using State of Flow - EclipseMetrics which is a Eclipse plugin calculates various metrics for your code during build cycles and warns you, via the Problems view, of ‘range violations’ for each metric.
As low as possible, just like any other code. Generally it's recommended to keep the cyclomatic complexity below 5.
In reality, that's easier said than done though. Good luck!
I have refered this link - http://www.javaworld.com/community/node/1005
Cyclocmatic complexity = Number of decision points + 1
The decision points may be your conditional statements like if, if … else, switch , for loop, while loop etc.
The following chart describes the type of the application.
Cyclomatic Complexity lies 1 – 10 To be considered Normal applicatinon
Cyclomatic Complexity lies 11 – 20 Moderate application
Cyclomatic Complexity lies 21 – 50 Risky application
Cyclomatic Complexity lies more than 50 Unstable application
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