Count Lines of Codes on Mac
Very Simple Command can do total lines.
> git ls-files | xargs cat | wc -l
More info in Each file
> git ls-files | xargs wc -l
Need to exclude the jars
> scala|sbt|conf|txt|xml|properties|md]
Only check the Source Codes
> git ls-files | grep "\(.md\|.properties\|.xml\|.scala\|.sbt\|.conf\|.txt\)$" | xargs wc -l
References:
http://tuchangwei.github.io/2014/12/06/CLOC-Count-Lines-Of-Code-on-Mac/
http://cloc.sourceforge.net/
Very Simple Command can do total lines.
> git ls-files | xargs cat | wc -l
More info in Each file
> git ls-files | xargs wc -l
Need to exclude the jars
> scala|sbt|conf|txt|xml|properties|md]
Only check the Source Codes
> git ls-files | grep "\(.md\|.properties\|.xml\|.scala\|.sbt\|.conf\|.txt\)$" | xargs wc -l
References:
http://tuchangwei.github.io/2014/12/06/CLOC-Count-Lines-Of-Code-on-Mac/
http://cloc.sourceforge.net/

本文介绍了一种在Mac上使用简单命令统计代码行数的方法,包括如何排除特定文件类型及仅检查源代码。
1877

被折叠的 条评论
为什么被折叠?



