如何降低Cyclomatic复杂性 [英] how to reduce the Cyclomatic Complexity

查看:59
本文介绍了如何降低Cyclomatic复杂性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi


i有一个方法,其圈复数为146如何减少它..

hi
i have a method whose cyclomatic complex of 146 how to reduce it..

推荐答案

我会< a href =https://www.google.co.uk/#q=reducing+cyclomatic+complexity> Google for the [ ^ ],搜索在您的情况下可能有用的一般方法。
I would Google for that[^], searching for a general method that could be useful in your case.


不是一个有效的问题,因为它取决于你没有提供的信息,一般来说:



1)将你的方法分解成小块。







2)用更简单的算法重写你的方法。



更多的是,上面几乎没有人可以帮助你。
Not a valid question since it depends on information you have not supplied, generally :

1) break your method down into smaller pieces.

or

2) rewrite your method with a simpler algorithm.

More that the above there is very little anybody can help you with further.


这篇关于如何降低Cyclomatic复杂性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆