Ubuntu下统计项目的代码行数-cloc工具

先安装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
-------------------------------------------------------------------------------
posted @ 2024-06-23 15:08  ShengOasis  阅读(120)  评论(0)    收藏  举报