tags:

views:

432

answers:

4

More specifically, I'm looking for how to count the number of lines in all files within a directory recursively through all directories. I can simply repeat on each the two different versions of the project to get a comparison figure.

Alternatively, since subversion has a fairly robust diff functionality, is it possible to mutate a diff between the two versions to obtain an absolute difference of lines of code?

Either solution would help me out greatly.

+2  A: 

There are some fantastic tools for counting lines of code as it is a valuable metric. They include options like ignoring whitespace and comments.

Just do a google search for a line counter specific to what you need.

Nick Whaley
A: 

If you work in .NET/Java, NDepend/XDepend support this.

Romain Verdier
Surely these work on the assembly/JAR and don't actually give you "lines of code" from the point of view of the 'source'. Since the original questioner wanted the results out of subversion, the overhead of building the code may be too much.
Ray Hayes
+1  A: 

You didn't specify your platform, but if it happens to be *nix (including cygwin under windows), you could try sloccount. I use it quite a bit for a number of different languages and am very happy with it.

Bill B
This seems to be exactly what I'm looking for. Thanks!
jobias
A: 

I use LocMetrics on Windows. Free, and simple "unzip" deployment.

dommer