Question

My project is made out of lots of bits and pieces of older code.

How do I know how many lines of code were actually used?

Can Klocwork provide me this answer? I've noticed that Klocwork holds the number of line (SLOC) in the project - but is it the number of actual lines used - or can it include "dead code" areas?

Thanks,

Moshe

Was it helpful?

Solution

Klocwork SLOC count will include dead code areas. But Klocwork can also find dead code.

OTHER TIPS

I haven't used klocwork, but it should be able to find unreachable code. A static analysis tool (Klocwork) can only find code that can never possibly be reached, it won't find code that never is reached in practice.

There are other tools that you can run to determine the code coverage at run time, as the product is put through a wide variety of use cases. These vary depending on the platform you are running, and they instrument code (which can cause performance issues in very sensitive code).

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