I've been using some tools to measure code quality and CCN (Cyclomatic Complexity Number)
and some of those tools provides a count for tokens in functions what does that count says about my function or method? What is it used for?
Cyclomatic Complexity Number is a metric to indicate complexity of function, procedure or program. The best (large enough and intuitive) explanation I have found is provided here.
I think that tokens
refer to conditional statements tokens
that actually are taken into account to compute the cyclomatic complexity.
[later edit]
A high CCN means complex code that:
CCN can be reduced using various techniques. Some examples can be seen here or here.
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