统计项目代码行数Count Lines of Code(CLOC)
2012-08-14 11:42
337 查看
统计代码总行数挺麻烦的 VS2010里虽然有Code Metrics Analyze 但这个工具只能用在托管的项目中 于是在这里找到一个小的命令行工具统计代码行数
用法很简单 如下(转自Wiki)
(1) Download the program
(2) Open command prompt
(3) Run program with syntax: <exe program> <code file dir>
(4) Program will print out a table with statictics on every programming language it can recognise in the given directory
(5) -> SLOC is the amount of "code" lines
(6) -> LOC is the sum of "blank" + "comment" + "code" lines
用法很简单 如下(转自Wiki)
How to use CLOC in Windows
(1) Download the program(2) Open command prompt
(3) Run program with syntax: <exe program> <code file dir>
(4) Program will print out a table with statictics on every programming language it can recognise in the given directory
(5) -> SLOC is the amount of "code" lines
(6) -> LOC is the sum of "blank" + "comment" + "code" lines
Simple Example
cloc-1.08.exe D:\Users\temp\code_files\my_program 21 text files. 21 unique files. 0 files ignored. http://cloc.sourceforge.net v 1.08 T=0.5 s (42.0 files/s, 9658.0 lines/s) ------------------------------------------------------------------------------- Language files blank comment code scale 3rd gen. equiv ------------------------------------------------------------------------------- Java 10 518 164 1979 x 1.36 = 2691.44 CSS 3 129 28 739 x 1.00 = 739.00 PHP 5 176 128 505 x 3.50 = 1767.50 HTML 3 60 34 369 x 1.90 = 701.10 ------------------------------------------------------------------------------- SUM: 21 883 354 3592 x 1.64 = 5899.04 -------------------------------------------------------------------------------
相关文章推荐
- cloc--Count Lines of Code 统计代码数量
- diffcount:统计工程代码变动行数
- IOS统计项目中代码行数
- 统计iOS项目的总代码行数方法
- Android Stduio统计项目的代码行数
- (转)vs2010 vs2013等vs中如何统计整个项目的代码行数
- 分享统计Java web项目的行数的代码
- 统计Xcode项目代码行数
- 统计项目代码行数程序
- [JAVA实用应用] 项目代码行数统计器,帮助你统计项目一共有多少行代码
- iOS xcode 工程 项目 代码行数统计
- 【原】Mac下统计任意文件夹中代码行数的工具——cloc
- iOS项目代码行数统计
- Mac下统计任意文件夹中代码行数的工具——cloc
- 如何优雅的统计Visual Studio项目的代码行数
- iOS项目代码行数统计
- Atitit.Gui按钮与面板---项目规模的评估----文件数统计,结构,代码行数,每类型文件行数.
- Android Stduio统计项目的代码行数
- Atitit.Guibutton与面板---项目规模的评估----文件数统计,结构,代码行数,每类型文件行数.
- Android Stduio统计项目的代码行数