ios自动统计代码行数
2017-11-29 10:03
267 查看
1.先在终端红中下载gawk
brew install gawk
2.然后cd 到项目所在位置:
将以下邮箱地址改成自己在git上的邮箱地址即可
统计30天的代码数:
git log --since=30.day.ago --author="$(git config --get user.name
邮箱地址)" --pretty=tformat: --numstat | gawk '{ add += $1 ; subs += $2 ; loc += $1 - $2 } END { printf "added lines: %s removed lines : %s total lines: %s\n",add,subs,loc }' -
统计7天的代码数:
git log --since=7.day.ago --author="$(git config --get user.name
邮箱地址)" --pretty=tformat: --numstat | gawk '{ add += $1 ; subs += $2 ; loc += $1 - $2 } END { printf "added lines: %s removed lines : %s total lines: %s\n",add,subs,loc }' -
brew install gawk
2.然后cd 到项目所在位置:
将以下邮箱地址改成自己在git上的邮箱地址即可
统计30天的代码数:
git log --since=30.day.ago --author="$(git config --get user.name
邮箱地址)" --pretty=tformat: --numstat | gawk '{ add += $1 ; subs += $2 ; loc += $1 - $2 } END { printf "added lines: %s removed lines : %s total lines: %s\n",add,subs,loc }' -
统计7天的代码数:
git log --since=7.day.ago --author="$(git config --get user.name
邮箱地址)" --pretty=tformat: --numstat | gawk '{ add += $1 ; subs += $2 ; loc += $1 - $2 } END { printf "added lines: %s removed lines : %s total lines: %s\n",add,subs,loc }' -
相关文章推荐
- iOS开发_统计xcode代码行数
- 统计iOS项目代码行数
- ios统计代码行数
- iOS 统计Xcode整个工程的代码行数
- IOS开发 统计XCODE 代码行数
- iOS xcode 代码行数统计
- iOS开发_统计xcode代码行数
- Mac终端命令 统计iOS工程中代码行数
- iOS开发_统计xcode代码行数
- iOS 统计项目代码行数
- IOS开发 统计XCODE 代码行数
- IOS统计项目中代码行数
- 统计iOS工程代码行数
- iOS项目代码行数统计
- iOS开发_统计xcode代码行数
- iOS开发_统计xcode代码行数
- IOS开发 统计XCODE 代码行数
- iOS开发之统计Xcode工程的代码行数
- iOS开发_统计xcode代码行数
- iOS开发_统计xcode代码行数