How many new lines of code were delivered yesterday?
The craziest startup founder I’ve ever met was the CTO of the company. He was the kind of guy who wanted to measure progress by the hour. By lacking a better way, we counted lines of code to show progress.
You can do the same with CLOC.
How to install it
Not straightforward. The GitHub README.md is long and tedious. I will spare you the time and give you the exact link. For example, on Mac you can install it with brew:
brew install cloc
How to run CLOC
We developers are very anxious people. We want answers right away. That’s why we google and click on Stack Overflow links.
So I will get to the point: go to the directory where you want to count lines of code and run this command:
cloc . --exclude-dir=venv --timeout 0
With –exclude-dir, you can exclude any directory.
With –timeout 0, you ensure that cloc won’t time out and complete the counting.