diffcount统计两个版本之间代码变更行数
2016-06-22 19:00
761 查看
使用工具diffcount可以统计一个项目之间两个版本的代码变动量。新版本较老版本有多少新增、修改、删除、有效代码量等。
方法和步骤:
1.解压diffcount压缩包,将其放在C盘。
2.在C:\diffcount\diffcount\test下建立两个文件夹,old,new.
3.将需要比较的未改动之前版本的代码分别复制到两个文件夹。
4.使用改动完成的代码将new文件夹中的代码覆盖,得到两个差异版本。
5.打开cmd窗口,输入"cd
c:\diffcount\diffcount"进入diffcount.exe文件夹。
6.输入
"diffcount test\old test\new --print-files-info > result.txt"将比较结果输出到“C:\diffcount\diffcount\result.txt”
(注:如果文件较多执行时间较长)
7.执行完毕后得到比较结果文件,可使用excel默认分隔设定打开。也可以使用其它文本编辑器打开。
LANG:语言或配置文件类型
ADD:新增代码行数
MOD:修改代码行数
DEL:删除代码行数
A&M:新增与修改代码行数之和
BLK:空行数
CMT:注释行数
NBNC:非空非注释行数
RATE:标准C折算率
8.
帮助
C:\diffcount\diffcount>diffcount.exe --help
Usage: diffcount.exe [OPTION]... (Baseline) Target
Compare and diff two packages or only couting one code package
OPTIONS:
-c --count-only
Only counting one code package
--ignore-case
Ignore the difference of file name case
--print-lines-info
Print detailed information of every diffed lines
Slow, Debug use only
--print-files-info
Print every diffed file result information.
--force-parse-all
Parsing all diffed files(default: skip same file)
--for-program-reading
Change result output style for Third-party program reading
Will disable --print-lines-info automaticly
-v --version
Output current version.
--help
Show this page
--cn-help
Show Chinese help page
方法和步骤:
1.解压diffcount压缩包,将其放在C盘。
2.在C:\diffcount\diffcount\test下建立两个文件夹,old,new.
3.将需要比较的未改动之前版本的代码分别复制到两个文件夹。
4.使用改动完成的代码将new文件夹中的代码覆盖,得到两个差异版本。
5.打开cmd窗口,输入"cd
c:\diffcount\diffcount"进入diffcount.exe文件夹。
6.输入
"diffcount test\old test\new --print-files-info > result.txt"将比较结果输出到“C:\diffcount\diffcount\result.txt”
(注:如果文件较多执行时间较长)
7.执行完毕后得到比较结果文件,可使用excel默认分隔设定打开。也可以使用其它文本编辑器打开。
LANG:语言或配置文件类型
ADD:新增代码行数
MOD:修改代码行数
DEL:删除代码行数
A&M:新增与修改代码行数之和
BLK:空行数
CMT:注释行数
NBNC:非空非注释行数
RATE:标准C折算率
8.
帮助
C:\diffcount\diffcount>diffcount.exe --help
Usage: diffcount.exe [OPTION]... (Baseline) Target
Compare and diff two packages or only couting one code package
OPTIONS:
-c --count-only
Only counting one code package
--ignore-case
Ignore the difference of file name case
--print-lines-info
Print detailed information of every diffed lines
Slow, Debug use only
--print-files-info
Print every diffed file result information.
--force-parse-all
Parsing all diffed files(default: skip same file)
--for-program-reading
Change result output style for Third-party program reading
Will disable --print-lines-info automaticly
-v --version
Output current version.
--help
Show this page
--cn-help
Show Chinese help page
相关文章推荐
- YII 框架学习[1] —— 引入Yii框架
- 线性表的链式存储C语言版
- Python正则表达式
- Java中OutOfMemoryError(内存溢出)的三种情况及解决办法
- (java 一) 断言 assert的使用
- 解决weblogic错误:java.sql.SQLRecoverableException: IO Error: Broken pipe
- Python 描述符(descriptor) 杂记
- Geekban极客班C++STL与泛型编程 第二周
- java 正则表达式
- python mysql
- 一:Java 并发和多线程的介绍
- java端RESTful web services的几种实现方式
- Teechart在VC++中使用的碎碎念
- Spring IOC为什么可以实现解耦
- Android Eclipse 导入 AS Gradle AAR 库手册
- 使用Spring框架实现RESTful
- python之路基础篇
- laravel5.2.36 Request验证类错误输出不显示问题
- thinkphp 笔记
- Java 常用排序算法/Java经典问题算法