The textproc/loccount port
loccount-2.9 – count lines of codes in many languages
loccount counts physical source lines of code.
Identifying over 80 languages by file extension and filename pattern, it can
also emit results as self-describing JSON and do COCOMO II as well as COCOMO I
loccount is a re-implementation of David A. Wheeler's sloccount tool in Go. Bugs
excepted, the largely unchanged algorithms can be expected to produce identical
output while supporting more languages.