V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
TIGERB
V2EX  ›  问与答

我的 2018 新增代码行数,你们的呢?

  •  
  •   TIGERB · 2019 年 1 月 24 日 · 4480 次点击
    这是一个创建于 2547 天前的主题,其中的信息可能已经有所发展或是发生改变。
    18 条回复    2019-01-26 08:30:07 +08:00
    RoyLeong
        1
    RoyLeong  
       2019 年 1 月 24 日 via Android
    敢问楼主是怎么统计自己的代码行数的?
    AEANWspPmj3FUhDc
        2
    AEANWspPmj3FUhDc  
       2019 年 1 月 24 日
    @RoyLeong
    如果使用了 git 进行管理,可以计算出指定日期内的增删代码行数。
    AEANWspPmj3FUhDc
        3
    AEANWspPmj3FUhDc  
       2019 年 1 月 24 日
    cloc (好像是这个,好久没用可能打错)可以统计不同出语言各多少行。
    mywaiting
        4
    mywaiting  
       2019 年 1 月 24 日
    我这几天 commit 的代码量都有 2k+ 行....... 真一行行手写的..........
    anzu
        5
    anzu  
       2019 年 1 月 24 日   ❤️ 10
    找了个统计脚本,记得换上自己的大名~
    ```
    git log --author="YouName" --since=2018-01-01 --until=2018-12-31 --pretty=tformat: --numstat| awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -
    ```
    我自己的,新增 4.5 万行,删除 1.3 万,总计 3.3 万
    so1n
        6
    so1n  
       2019 年 1 月 24 日
    一个仓库就几万- -
    SoloCompany
        7
    SoloCompany  
       2019 年 1 月 25 日
    @anzu

    added lines: 32701, removed lines: 39296, total lines: -6595
    pubby
        8
    pubby  
       2019 年 1 月 25 日
    后端 go added lines: 219927, removed lines: 18711, total lines: 201216
    PerFectTime
        9
    PerFectTime  
       2019 年 1 月 25 日
    emmmm 求一个 svn 的计算命令
    andrewpsy
        10
    andrewpsy  
       2019 年 1 月 25 日
    后端,很满足。
    added lines: 9186, removed lines: 38333, total lines: -29147
    Pyjamas
        11
    Pyjamas  
       2019 年 1 月 25 日
    我也忘了我干了啥了
    added lines: 365129, removed lines: 131727, total lines: 233402
    Pyjamas
        12
    Pyjamas  
       2019 年 1 月 25 日
    这个脚本里的日期好像没用啊,改了改发现结果是一样的
    STRRL
        13
    STRRL  
       2019 年 1 月 25 日
    added lines: 90111, removed lines: 73902, total lines: 16209
    ixiaozhi
        14
    ixiaozhi  
       2019 年 1 月 25 日
    许多个仓库一一统计也挺累的
    glaucus
        15
    glaucus  
       2019 年 1 月 25 日
    added lines: 209529, removed lines: 194346, total lines: 15183
    newtype0092
        16
    newtype0092  
       2019 年 1 月 25 日
    删除行数也同样重要。
    shd
        17
    shd  
       2019 年 1 月 25 日
    added lines: 1759536, removed lines: 2688, total lines: 1756848
    huangdayu
        18
    huangdayu  
       2019 年 1 月 26 日
    added lines: 86292, removed lines: 66055, total lines: 20237
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   5295 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 01:20 · PVG 09:20 · LAX 17:20 · JFK 20:20
    ♥ Do have faith in what you're doing.