计算代码指标 [英] Calculate code metrics

查看:121
本文介绍了计算代码指标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可用的工具来为您的项目计算代码量度(例如,代码行数,圈复杂度,耦合,内聚性),并随时间生成显示趋势的图形?

Are there any tools available that will calculate code metrics (for example number of code lines, cyclomatic complexity, coupling, cohesion) for your project and over time produce a graph showing the trends?

推荐答案

在我的最新项目中,我使用了 SourceMonitor .这是一个用于代码指标分析的不错的免费工具.
这是SourceMonitor官方网站的摘录:

On my latest project I used SourceMonitor. It's a nice free tool for code metrics analysis.
Here is an excerpt from SourceMonitor official site:

  • 快速,单一地收集指标 传递源文件.
  • 衡量源代码的指标 用C ++,C,C#,VB.NET,Java, Delphi,Visual Basic(VB6)或HTML.
  • 包括方法和功能级别 C ++,C,C#,VB.NET, Java和Delphi.
  • 将指标保存在检查点中 软件期间的比较 开发项目.
  • 在以下位置显示和打印指标 表格和图表.
  • 在标准Windows中运行 GUI或使用XML的脚本内部 命令文件.
  • 将指标导出为XML或CSV (逗号分隔值)文件用于 使用其他工具进行进一步处理.
  • Collects metrics in a fast, single pass through source files.
  • Measures metrics for source code written in C++, C, C#, VB.NET, Java, Delp Visual Basic (VB6) or HTML.
  • Includes method and function level metrics for C++, C, C#, VB.NET, Java, and Delphi.
  • Saves metrics in checkpoints for comparison during software development projects.
  • Displays and prints metrics in tables and charts.
  • Operates within a standard Windows GUI or inside your scripts using XML command files.
  • Exports metrics to XML or CSV (comma-separated-value) files for further processing with other tools.

对于 NDepend 旁边的.NET(它只是最好的工具),我可以推荐

For .NET beside NDepend which is simply the best tool, I can recommend vil.

以下工具可以执行趋势分析:

Following tools can perform trend analysis:

  • CAST
  • Klocwork Insight

这篇关于计算代码指标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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