先安装cloc工具:
sudo apt install cloc
然后在项目的根目录下执行:
cloc .
得到如下内容:
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Go 17 302 209 1238
Python 2 65 72 171
YAML 1 12 2 123
JSON 2 0 0 15
Dockerfile 2 7 9 9
Markdown 1 0 0 1
-------------------------------------------------------------------------------
SUM: 25 386 292 1557
-------------------------------------------------------------------------------
标签:项目,cloc,------------------------------------------------------------------------
From: https://www.cnblogs.com/shengoasis/p/18263472