LOCCounter measure the lines of code (LOC) of a source file.
This tool works for a directory as well.
The latest version supports source files written in
Java/C/C++: .java, .c, .cc, cpp, c++, .h, .hpp files.
java -jar LOCCounter.jar [option]
(file | dir)
- (none): output LOC value only
- -t : output the total count of lines (including blank lines and commet lines) instead of LOC value
- -a : output both LOC value and total count of lines
- -d : output all data including the contents
- Output format
- (none) : file_name,LOC
- -t : file_name,total_count
- -a : file_name,LOC,total_count,blank_count
- -d : outut data in the same format when -a is specified, and
the details are outputed to the standard error
- The following summary information is display at the end of execution:
"$B%U%!%$%k?t(B = XX, $BAm(B LOC = XXXXXX, $BAm9T?t(B = XXXXXX"
(C) Copyright 2001 - 2011 Hirohisa AMAN
- Linda M. Liard and M. Carol Brennan,
Software Measurement and Estimation: A Practical Approach,
IEEE Computer Society, CA, 2006.
- R. Park,
"Software size measurement: a framework for counting source
- N. Fenton and S. Pfleeger,
PWS Publishing Company,