likes
comments
collection
share

3种方法统计你的代码行数

作者站长头像
站长
· 阅读数 34

1、使用git命令统计

git log --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -

2、使用vscode插件统计

安装 VSCode Counter 插件。

之后,ctrl+ship+p,选择 VSCodeCounter:Count lines in directoty

3种方法统计你的代码行数

3、使用cloc工具

npm install -g cloc

3种方法统计你的代码行数

转载自:https://juejin.cn/post/6989133548665962503
评论
请登录