Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Count Lines of Code (CLOC)

📅 2015-Feb-19 ⬩ ✍️ Ashwin Nanjappa ⬩ 📚 Archive

[caption id="attachment_5765" align="aligncenter" width="562"][Counting LOC of OpenCV project](https://codeyarns.files.wordpress.com/2015/02/20150219_cloc.png) Counting LOC of OpenCV project[/caption]

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.

$ sudo apt install cloc
$ cloc opencv

Tried with: CLOC 1.6 and Ubuntu 14.04