代码行差异统计工具统计代码修改等

上传者: vaqeteart | 上传时间: 2021-07-01 14:13:38 | 文件大小: 81KB | 文件类型: ZIP
代码行差异统计工具,用于比较两个代码包的新增,修改,删除的代码量. diffcount 的可执行程序名为 diffcount.exe 本程序在sourceforge上面有相应的开源项目。 想查询参数信息,请使用 diffcount --help 查询帮助 diffcount --cn-help 可以查询中文帮助, 也可以查看doc下的"命令行参数说明.txt" 通过例子介绍使用方法如下: 1.差异统计 统计某一个版本的代码包相对于一个原始的基线代码包,变动的代码量 以及变动的代码量中各语言非空非注释行(NBNC)的结果 diffcount 缺省执行的就是差异统计,直接跟上两个代码包的目录即可 在diffcount目录下执行: diffcount test\sp1 test\sp2 实际使用中,可能会有文件名和目录名大小写不一致的情况,如果希望忽略 文件名大小写的差异,需要使用 --ignore-case 参数,否则两个一样的文件 一个会算作删除,一个会算作新增 G:\diffcount>diffcount test\sp1 test\sp2 Diffcount [test\sp1] and [test\sp2] result: LANG ADD MOD DEL A&M BLK CMT NBNC RATE ----------------------------------------------------------------------- C 44 7 26 51 8 11 35 1.00 Pascal 0 0 25 0 0 0 0 0.23 Java 7 4 11 11 0 3 9 0.41 Config 31 4 0 35 1 0 34 0.12 XML 126 0 0 126 2 0 124 0.12 ----------------------------------------------------------------------- Convert all NBNC lines to standard C Total: 57.65 (standard C lines) ADD MOD DEL A&M BLK CMT NBNC RATE 的 含义分别为: 新增、修改、删除、新增+修改、空行、注释、非空非注释行、标准C折算率 2.代码统计: 如果需要,可以把diffcount当作普通的代码行统计工具,统计一个代码包 代码统计使用 -c (或者--count-only)参数, 在diffcount目录下执行 diffcount -c test\count 执行结果如下: G:\diffcount>diffcount -c test\count Counting package [test\count] result: LANG TOTAL BLK CMT NBNC RATE ----------------------------------------------------------------------- C 203 46 61 101 1.00 C++ 57 7 25 25 0.42 Pascal 117 24 17 79 0.23 Java 71 7 24 40 0.41 ASM 129 34 12 85 2.50 C# 18 1 1 17 0.20 Basic 447 140 20 295 0.21 Perl 97 4 26 74 0.16 TCL/TK 91 12 26 5

文件下载

资源详情

[{"title":"( 45 个子文件 81KB ) 代码行差异统计工具统计代码修改等","children":[{"title":"diffcount","children":[{"title":"test","children":[{"title":"sp2","children":[{"title":"db_milestone.xml <span style='color:#111;'> 2.46KB </span>","children":null,"spread":false},{"title":"AB","children":[{"title":"Proc.asl <span style='color:#111;'> 1.72KB </span>","children":null,"spread":false},{"title":"test.c <span style='color:#111;'> 510B </span>","children":null,"spread":false}],"spread":true},{"title":"中文","children":[{"title":"代码.c <span style='color:#111;'> 1.79KB </span>","children":null,"spread":false}],"spread":true},{"title":"confg.ini <span style='color:#111;'> 900B </span>","children":null,"spread":false},{"title":"folder","children":[{"title":"lash.c <span style='color:#111;'> 437B </span>","children":null,"spread":false}],"spread":true},{"title":"binary form","children":[{"title":"Earning.java <span style='color:#111;'> 751B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"count","children":[{"title":"tcl","children":[{"title":"comdlg.tcl <span style='color:#111;'> 1.97KB </span>","children":null,"spread":false}],"spread":true},{"title":"xml","children":[{"title":"db_milestone.xml <span style='color:#111;'> 2.46KB </span>","children":null,"spread":false}],"spread":true},{"title":"chip","children":[{"title":"mcs_app_aal2_in.fpl <span style='color:#111;'> 7.89KB </span>","children":null,"spread":false},{"title":"mcs_app_PduInfo_Proc.asl <span style='color:#111;'> 1.78KB </span>","children":null,"spread":false}],"spread":true},{"title":"pas","children":[{"title":"setalarm.pas <span style='color:#111;'> 1.54KB </span>","children":null,"spread":false},{"title":"seldbtype.pas <span style='color:#111;'> 1.40KB </span>","children":null,"spread":false}],"spread":true},{"title":"java","children":[{"title":"Earning.java <span style='color:#111;'> 807B </span>","children":null,"spread":false},{"title":"FluxSearch.java <span style='color:#111;'> 377B </span>","children":null,"spread":false},{"title":"PDFUtil.sqlj <span style='color:#111;'> 2.50KB </span>","children":null,"spread":false},{"title":"boxSettings.js <span style='color:#111;'> 347B </span>","children":null,"spread":false}],"spread":true},{"title":"Verilog","children":[{"title":"clock_check.v <span style='color:#111;'> 2.36KB </span>","children":null,"spread":false}],"spread":true},{"title":"basic","children":[{"title":"contweb.vbs <span style='color:#111;'> 2.54KB </span>","children":null,"spread":false},{"title":"clearquest.bas <span style='color:#111;'> 10.33KB </span>","children":null,"spread":false}],"spread":true},{"title":"cpp","children":[{"title":"libmng_cms.c <span style='color:#111;'> 4.56KB </span>","children":null,"spread":false},{"title":"previewframe.cpp <span style='color:#111;'> 1.93KB </span>","children":null,"spread":false},{"title":"widgetaction.h <span style='color:#111;'> 2.22KB </span>","children":null,"spread":false}],"spread":true},{"title":"config","children":[{"title":"qmake.conf <span style='color:#111;'> 2.99KB </span>","children":null,"spread":false},{"title":"ship.ini <span style='color:#111;'> 165B </span>","children":null,"spread":false}],"spread":true},{"title":"csharp","children":[{"title":"FPUTIL.CS <span style='color:#111;'> 534B </span>","children":null,"spread":false}],"spread":true},{"title":"perl","children":[{"title":"getopts.pl <span style='color:#111;'> 1.35KB </span>","children":null,"spread":false},{"title":"hostname.pl <span style='color:#111;'> 727B </span>","children":null,"spread":false}],"spread":false},{"title":"asm","children":[{"title":"editbin.asm <span style='color:#111;'> 1.88KB </span>","children":null,"spread":false},{"title":"memsrch.asm <span style='color:#111;'> 1.10KB </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"sp1","children":[{"title":"code","children":[{"title":"setalarm.pas <span style='color:#111;'> 402B </span>","children":null,"spread":false}],"spread":true},{"title":"AB","children":[{"title":"Proc.asl <span style='color:#111;'> 1.78KB </span>","children":null,"spread":false},{"title":"test.c <span style='color:#111;'> 432B </span>","children":null,"spread":false}],"spread":true},{"title":"中文","children":[{"title":"代码.c <span style='color:#111;'> 1.14KB </span>","children":null,"spread":false}],"spread":true},{"title":"confg.ini <span style='color:#111;'> 166B </span>","children":null,"spread":false},{"title":"FOLDER","children":[{"title":"lash.c <span style='color:#111;'> 415B </span>","children":null,"spread":false}],"spread":true},{"title":"binary form","children":[{"title":"Earning.java <span style='color:#111;'> 807B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"ChangeLog <span style='color:#111;'> 1.16KB </span>","children":null,"spread":false},{"title":"diffcount.exe <span style='color:#111;'> 95.63KB </span>","children":null,"spread":false},{"title":"Readme <span style='color:#111;'> 490B </span>","children":null,"spread":false},{"title":"说明文件","children":[{"title":"第三方程序调用接口.txt <span style='color:#111;'> 2.06KB </span>","children":null,"spread":false},{"title":"编译方法.txt <span style='color:#111;'> 1.21KB </span>","children":null,"spread":false},{"title":"程序语言类型.txt <span style='color:#111;'> 4.15KB </span>","children":null,"spread":false},{"title":"演示例子.txt <span style='color:#111;'> 2.60KB </span>","children":null,"spread":false},{"title":"命令行参数.txt <span style='color:#111;'> 1.75KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}]

评论信息

  • it_duly :
    很好用,内容才82K
    2015-08-01
  • cpttptp :
    不错,工具分析挺好用的,可以统计文件修改的差异数
    2015-03-23
  • funi16 :
    资源挺好的,统计出来的结果和我自己统计的有些差异。可以统计的文件类型有些少,而且偏后端语言。另外,在windows下使用的时候,直接敲命令行即可。
    2014-06-19
  • vityzeng :
    很不错的资源,可用。
    2014-06-10
  • yuzhoufeng888 :
    谢谢,没有图形界面,上手比较慢,呵呵!
    2014-05-02

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明