cloc: Clock your code

Line-counting utilities are not a new thing for K.Mandla; there have been a few of these available for a while. codemetre comes to mind, as does sloccount. Even wc could fit in that category.

Here’s cloc:

2014-07-28-lv-c5551-cloc

cloc has a couple of features I like. For one, cloc can work straightaway on a compressed file. You don’t need to extract an archive before cloc does its thing; cloc will handle the decompression automatically. And if it runs into trouble, you can assert your biological superiority and tell it which decompresser to use.

cloc also has some built-in diff tools, which might not sound like a wonderful idea at first. What that means though, is that it can look for differences between versions of programs, and report on those. This might be useful if you have an axe to grind with a developer. 😡

And cloc carries a lot of filtering options, on everything from regex strings to specific programming languages to hidden Windows files. That might have saved me a little time when counting lines in the 3.15.6 kernel, above. 😐

The sad part of this little exposé is that I have so very, very little coding ability that cloc (or for that matter, codemetre or sloccount) isn’t something I’ll likely use. Unless, of course, I’m counting lines of text in a smarmy blog. ^^’

1 thought on “cloc: Clock your code

  1. Pingback: Links 30/7/2014: Chris Beard as CEO of Mozilla | Techrights

Comments are closed.