用于计算 Bob 叔叔的 "Agile PPP" C# 代码指标的脚本

Script to calculate Uncle Bob's "Agile PPP" code metrics for C#

我正在阅读 Agile PPP for C#,Bob 叔叔在某些时候提出了有趣的设计质量指标:

这些是:

最有趣的部分是这个(直接来自书中):

The metrics we describe have been successfully applied to a number of projects since 1994.

Several automatic tools will calculate them for you, and they are not difficult to calculate by hand.

It is also not difficult to write a simple shell, Python, or Ruby script to walk through your source files and calculate them.

For an example of a shell script, you can download depend.sh from the freeware section of objectmentor.

我找不到这个 depend.sh 脚本,我不确定我是否同意这些指标很容易手工计算,或者通过一些脚本(我想使用 Python为此,如果是这样的话)。

所以,问题是:

工具 NDepend 计算 these metrics and it makes easy to write your custom metrics through C# Linq Queries

它集成在 Visual Studio 中,还生成 report 与 Uncle Bob 的指标图。

download.

提供 14 天全功能试用版