Count Lines of Code (CLOC)

Counting LOC of OpenCV project
Counting LOC of OpenCV project

Count Lines of Code (CLOC) is a useful utility to keep at hand when working with code. It is straightforward to use and count the LOC of a project. It supports almost all types of programming languages and you will get a splitup of each language and a total sum of LOC and comments in the summary.

  • Installing it is straightforward:
$ sudo apt install cloc
  • To count LOC, pass the directory that needs to be analyzed:
$ cloc opencv

Tried with: CLOC 1.6 and Ubuntu 14.04