广告合作
  • 今日头条

    今日头条

  • 百度一下

    百度一下,你就知道

  • 新浪网

    新浪网 - 提供新闻线索,重大新闻爆料

  • 搜狐

    搜狐

  • 豆瓣

    豆瓣

  • 百度贴吧

    百度贴吧——全球领先的中文社区

  • 首页 尚未审核订阅工具 订阅

    统计两个版本之间代码变更行数

    来源:网络收集  点击:  时间:2024-04-25
    【导读】:
    使用工具diffcount可以统计一个项目之间两个版本的代码变动量。新版本较老版本有多少新增、修改、删除、有效代码量等。工具/原料morediffcount两个差异代码版本方法/步骤1/8分步阅读

    解压diffcount压缩包,将其放在C盘。

    2/8

    在C:\diffcount\diffcount\test下建立两个文件夹,old,new.

    3/8

    将需要比较的未改动之前版本的代码分别复制到两个文件夹。

    4/8

    使用改动完成的代码将new文件夹中的代码覆盖,得到两个差异版本。

    5/8

    打开cmd窗口,输入cd c:\diffcount\diffcount进入diffcount.exe文件夹。

    6/8

    输入 diffcount test\old test\new --print-files-info result.txt将比较结果输出到“C:\diffcount\diffcount\result.txt”

    (注:如果文件较多执行时间较长)

    7/8

    执行完毕后得到比较结果文件,可使用excel默认分隔设定打开。也可以使用其它文本编辑器打开。

    LANG:语言或配置文件类型

    ADD:新增代码行数

    MOD:修改代码行数

    DEL:删除代码行数

    AM:新增与修改代码行数之和

    BLK:空行数

    CMT:注释行数

    NBNC:非空非注释行数

    RATE:标准C折算率

    8/8

    帮助

    C:\diffcount\diffcountdiffcount.exe --help

    Usage: diffcount.exe ... (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、本文系转载,版权归原作者所有,旨在传递信息,不代表看本站的观点和立场。

    2、本站仅提供信息发布平台,不承担相关法律责任。

    3、若侵犯您的版权或隐私,请联系本站管理员删除。

    4、文章链接:http://www.1haoku.cn/art_592291.html

    相关资讯

    ©2019-2020 http://www.1haoku.cn/ 国ICP备20009186号05-07 01:54:29  耗时:0.025
    0.0254s