countcode(1) | General Commands Manual | countcode(1) |
countcode - counts per known source file type the number of source lines
countcode [-h] [-b] [-c] [-s] [-l] [-p PRINTLEVEL] [-d] [-t] [-v] [directory]
countcode counts per known source file type the number of source lines in the files in the given directory and recursively in its subdirectories. It supports many file types. The type is recognized from the file name extension or the shebang script type. Use -s to see all supported types.
The following line types are counted:
code: pure code lines
comment: pure comment lines
blank: empty lines or lines containing whitespace only
header: the copyright header (leading comment lines)
other: all other lines
Unless -b is given, a pure code or comment line has to contain an alphanumeric character; e.g., a single } does not count as code line. It calculates the percentage of code and comment lines in the total number of lines or (if -l is given) in the sum of code and comment lines. Unless -t is given, files in test directories are counted separately. Normal output is written on stdout; verbose on stderr. Files with an unknown type are reported on stderr. Note that -bt should give about the same results as a tool like cloc.
This manual page was written with the help of help2man by Benda Xu <heroxbd@gentoo.org>, for the Debian GNU/Linux system.
2016-03-25 | caascore |