Created
March 22, 2012 22:20
-
-
Save alco/2165064 to your computer and use it in GitHub Desktop.
Count the number of non-blank SLOC in an Elixir project
This file contains hidden or 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
git ls-files | egrep '\.erl|\.ex[s]$' | xargs cat | sed '/^$/d' | wc -l |
Command that worked for me on MacOS to count all LoC (including ex
and exs
files), ignoring blank lines and comments:
git ls-files | egrep '\.erl|\.exs?$' | xargs cat | sed '/^\s*$/d' | sed '/^\s*#/d' | less
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Same command show following line counts for different Elixir releases: