代码指标工具-任何想法 [英] Code Metrics Tool - Any Ideas

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

问题描述

任何人都可以推荐一种基于Windows的软件度量工具,该工具能够:

计算特定软件项目中的代码行.我想将其指向一个文件夹,该工具应递归所有子文件夹并搜索所有源文件(例如,*.cpp,*.c,* h,如指定),然后提供以下指标:

* .cpp,*.c,*.h模块的数量,每个模块一行,带有一些统计信息,如下所示
代码行数
注释行数和注释与源代码的比率
以及该项目的一些总计

无需进行棉绒类型检查.

显然,我的示例涉及C/C ++文件类型,但它也适用于其他语言.

我不一定认为这应该与任何IDE集成(并处理项目文件),而是应该考虑将特定文件夹下的所有文件都包括在内的想法.这是因为我们使用了几种不同的工具链.

这当然很容易编写,但是我敢肯定某个地方有可用.

Can anyone recommend a Windows-based software metric tool that is able to:

Calculate lines of code in a particular software project. I would like to point it to a folder and the tool should recurse through all subfolders and search through all source files (e.g. *.cpp, *.c, *h, as specified), then provide the following metrics:

Number of *.cpp, *.c, *.h modules, with a line per module with some stats as below
Number of lines of code
Number of lines of comments and ratio of comments to source code
And some totals for the project

There is no need to do lint-type checking.

Obviously my example refers to C/C++ file types but it would also apply to other languages.

I don''t necessarily think this should integrate with any IDE (and work off project files) - rather work on the idea that all files under certain folder should be included. This is because we are using several different tool chains.

This is of course something easy enough to write but I am sure there is something available somewhere.

推荐答案

我使用了^ ],它是一个不错的工具.我在C#中使用了它,但我认为它也可以在其他语言中使用.
I used Microsoft Line of Code Counter[^], it''s a decent tool. I used it with C#, but I think it works with other languages as well.


Michael,

我使用SourceMonitor http://www.campwoodsw.com/sourcemonitor.html [
Michael,

I use SourceMonitor http://www.campwoodsw.com/sourcemonitor.html[^]
.


Oz Solomon的"Project Line Counter"怎么样?不久前,我们在VC6中的几个项目上对此进行了尝试.效果很好.

用于VS.NET和VC6的项目行计数器插件v2.10 [
Well how about Oz Solomon''s "Project Line Counter"? We tried this on few projects a while ago in VC6. It worked pretty good.

Project Line Counter Add-In v2.10 for VS.NET and VC6[^]


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

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