Question

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

Was it helpful?

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.

OTHER TIPS

I just committed a change that implements a new switch, --count-and-diff, that does the counts and diff in one shot. It will appear in the next release. Or you can use it now by working with the development version at https://sourceforge.net/p/cloc/code/HEAD/tree/trunk/cloc

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top