Do you find cyclomatic complexity a useful measure?

后端 未结 15 1287
傲寒
傲寒 2020-12-12 22:03

I\'ve been playing around with measuring the cyclomatic complexity of a big code base.

Cyclomatic complexity is the number of linearly independent paths through a pr

15条回答
  •  醉酒成梦
    2020-12-12 22:22

    After understanding what it means, I now have started to use it on a "trial" basis. So far I have found it to be useful, because usually high CC goes hand in hand with the Arrow Anti-Pattern, which makes code harder to read and understand. I do not have a fixed number yet, but NDepend is alerting for everything above 5, which looks like a good start to investigate methods.

提交回复
热议问题