如何衡量 C# 代码的可靠性?
有哪些指标和工具可以衡量 C# 代码的SOLID?或者有工具来表明哪些地方违反了原则造成的危害最大?
Which metrics are there and which tools exist to measure the SOLIDness of C# code? Or tools to indicate where the principles are violated most harmfully?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Scott Hanselman 有一篇关于 NDepend 的精彩文章。另外,为了查看违规情况,您还可以使用 Visual Studio 附带的代码分析;您可以使用代码分析策略编辑器来选择规则。
Scott Hanselman has an excellent article on NDepend. Also to see violation you can also use Code Analysis that comes with Visual Studio; you can use Code Analysis Policy Editor to choose rules.
您可以使用静态分析工具(有些工具内置于 Visual Studio 2008 及更高版本、专业版及更高版本中),或 NDepend< /a>.
通过 NDepend,您可以了解不同类的耦合程度、代码库的内聚程度等等。
You can use a static analysis tool (some are built into Visual Studio 2008 and above, professional editions and higher), or NDepend.
With NDepend, you can see how tightly coupled different classes are, what the cohesion of your codebase is like and more.