Count the number of lines of Clojure code in a file or direcotry.
https://bitbucket.org/David_Clark/loclj and extract into a project directory of your choice.
Get the project's dependencies with:
Run the program by giving it the name of a Clojure source file or directory containing Clojure source files.
lein run file-or-directory-name
To create a standalone version of the program use the 'uberjar' command.
Give the program the name of a Clojure source file or the name of a directory containing Clojure source files. The program will examine the file(s) and count the lines of code, that is the lines that are not comments and are not empty.
$ java -jar loclj-0.1.0-standalone.jar file-or-directory-name
file-or-directory-name is the name of a Clojure source file or a directory that contains Clojure source files.
On my system, if I run the file on its own source file, I get something like this:
$ java -jar loclj-0.1.0-standalone.jar ../src/loclj/core.clj ../src/loclj/core.clj core.clj : 22 lines 22 lines of Clojure
I have another project that benchmarks a couple of implementations of the eight-queens problem. Running the program against those multiple source files produces something like this:
$ java -jar loclj-0.1.0-standalone.jar "C:\\projects\\eight-queens\\src" C:\\projects\\eight-queens\\src core.clj : 15 lines mired.clj : 65 lines rosetta.clj : 18 lines 98 lines of Clojure
Copyright © 2013 David D. Clark
Distributed under the Eclipse Public License, the same as Clojure.