35 lines
1.2 KiB
Markdown
35 lines
1.2 KiB
Markdown
|
# 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
|
||
|
-------------------------------------------------------------------------------
|
||
|
```
|
||
|
|
||
|
注意后面有个“.”表示当前目录。
|