diffcloc

How to count lines of code and compare the LOC difference in one command?


I'm using cloc 1.60 .

I'm wondering if that's possible to run the following two commands in one "cloc" command?

> cloc-1.60.exe --diff file1 file2 # returns the difference

> cloc-1.60.exe file2  

I have to calculate the % of changed lines. I can do that by running these two commands. However I'd prefer to run them both in one command if possible.

Thank you


Solution

  • there currently is not a way to run both a diff and a straight count with a single command. I'll consider that for a future release though. Would be helpful if you filed a feature request (http://sourceforge.net/p/cloc/feature-requests/?source=navbar) so I don't forget.