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/

猜你喜欢

转载自sillycat.iteye.com/blog/2256539