使用cloc进行代码行统计

来源:互联网 发布:淘宝上的汝窑茶具 编辑:程序博客网 时间:2024/06/05 10:31

使用cloc统计代码行

1. 可以清楚滴关注代码,去除空行,注释

2. 可以忽略jar so png等非文本文件

使用方法

1. 切到想要统计的代码分支

  git checkout master


2. 进入统计的模块目录下

  cd code/project


3. 安装一下cloc

 sudo apt-get install cloc    // Linux

  $ brew install cloc        // Mac


4.开始统计

  cloc $(git ls-files)       // Linux

  $ cloc            // Mac


原创粉丝点击