3种方法统计你的代码行数
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、使用cloc工具
npm install -g cloc
转载自:https://juejin.cn/post/6989133548665962503