Tool used to retrieve code metrics in xUnit Test Patterns?

Posted by leeand00 on Stack Overflow See other posts from Stack Overflow or by leeand00
Published on 2010-06-15T03:11:00Z Indexed on 2010/06/15 3:12 UTC
Read the original article Hit count: 277

Filed under:
|
|
|
|

I'm reading xUnit Test Patterns by Gerard Meszaros.

On one of the pages he refers to some software metrics:

While the need to wrap lines to keep them at 65 characters makes this code look even longer than it really is, it is still unnecessarily long. It contains 25 executable statements including initialized declarations, 6 lines of control statements, 4 in-line comments, and 2 lines to declare the test method—giving a total of 37 lines of unwrapped source code.

Short of counting the statements to find these metrics, does anybody have any idea if he used a particular tool to calculate the metrics?

(If you have any suggestions for tools that will count similar metrics, I'm looking for one that works on Java, Javascript and C++)

Thanks!

© Stack Overflow or respective owner

Related posts about java

Related posts about JavaScript