See http://cloc.sourceforge.net/#custom_lang.
$ cloc --by-file-by-lang -read-lang-def=my_definitions.txt ~/github/uwsc/uwsc 4 text files. 4 unique files. 0 files ignored. http://cloc.sourceforge.net v 1.56 T=0.5 s (8.0 files/s, 812.0 lines/s) ------------------------------------------------------------------------------------------------------ File blank comment code ------------------------------------------------------------------------------------------------------ /Users/youichikato/github/uwsc/uwsc/1.html 13 0 133 /Users/youichikato/github/uwsc/uwsc/2.html 13 0 130 /Users/youichikato/github/uwsc/uwsc/1.uws 11 15 38 /Users/youichikato/github/uwsc/uwsc/getPosition.uws 9 14 30 ------------------------------------------------------------------------------------------------------ SUM: 46 29 331 ------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- HTML 2 26 0 263 uwsc 2 20 29 68 ------------------------------------------------------------------------------- SUM: 4 46 29 331 -------------------------------------------------------------------------------