Count Lines of Codes on Mac

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/

版权声明:本文为magic_dreamer原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。