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

One thought on “Count Lines of Code (CLOC)”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s