-
-
Save mybuddymichael/4361405 to your computer and use it in GitHub Desktop.
Count the lines of code in a Clojure project (`src` and `test` directories only).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Count SLOC | |
export SLF=`mktemp -t cljsloc`; \ | |
find src test -name "*.clj" \ | |
| xargs egrep -v "(^[[:space:]]*$|^[[:space:]]*;)" \ | |
| cut -d: -f1 > $SLF && echo "Files"; \ | |
uniq -c $SLF; \ | |
echo "Total" `cat $SLF | wc -l`; \ | |
rm $SLF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment