增加 Cloc 统计代码行数.

Signed-off-by: chen.yang <chen.yang@yuzhen-iot.com>
This commit is contained in:
chen.yang 2021-08-03 09:14:33 +08:00
parent 2ef88801df
commit fc2335b757
1 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,34 @@
# Cloc 统计代码行数
Cloc 可以统计项目中不同语言的代码行数,非常简单。
## 1.安装
```bash
# Ubuntu
apt install cloc
```
## 2.使用
进入到需要统计的目录执行以下命令:
```bash
cloc .
20 text files.
19 unique files.
5 files ignored.
github.com/AlDanial/cloc v 1.82 T=0.02 s (952.3 files/s, 57913.6 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Go 14 150 95 699
Markdown 1 10 0 11
JSON 1 0 0 8
-------------------------------------------------------------------------------
SUM: 16 160 95 718
-------------------------------------------------------------------------------
```
注意后面有个“.”表示当前目录。