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
- Name: Lines Of Code (LOC)
the line count of source code.
LOCCounter counts the number of lines except for
``blank lines'' and ``comment lines.''
Comment lines mean the lines that consist of comment statement only.
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:
# of source files = xxxxx, Total LOC = xxxxx, Total line counts = xxxxx
(C) Copyright 2001 - 2019 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,