.\" generated by help2man 1.47.3. .TH "countcode" "1" "2016-03-25" "caascore" .SH NAME countcode \- counts per known source file type the number of source lines .SH SYNOPSIS \fBcountcode\fP [\-h] [\-b] [\-c] [\-s] [\-l] [\-p PRINTLEVEL] [\-d] [\-t] [\-v] [directory] .SH DESCRIPTION \fBcountcode\fP 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 \fB-b\fR 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 \fB-l\fR is given) in the sum of code and comment lines. Unless \fB-t\fR 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 \fB-bt\fR should give about the same results as a tool like cloc. .SS "positional arguments:" .TP directory name of top directory to count source files (default is .) .SS "optional arguments:" .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .TP \fB\-b\fR, \fB\-\-basic\fR count copyright header and lines without an alphanumeric character as code/comment lines .TP \fB\-c\fR, \fB\-\-code\fR only use source files containing code (e.g. no \&.parset) .TP \fB\-s\fR, \fB\-\-sum\fR only calculate and print the sum of all file types .TP \fB\-l\fR, \fB\-\-limitperc\fR limit to the nr of code and comment lines to determine percentages .TP \fB\-p\fR PRINTLEVEL, \fB\-\-printlevel\fR PRINTLEVEL first directory level to print (default 0 (=top)) .TP \fB\-d\fR, \fB\-\-displaytypes\fR display the currently recognized file types (full info with \fB\-v\fR) .TP \fB\-t\fR, \fB\-\-testinclude\fR do not count test directories separately .TP \fB\-v\fR, \fB\-\-verbose\fR print count for each source file .SH "AUTHOR" .PP This manual page was written with the help of \fBhelp2man\fP by Benda Xu , for the Debian GNU/Linux system.