开发者

Klocwork & c - The number of lines of source code actually used

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 p开发者_StackOverflow社区roject - but is it the number of actual lines used - or can it include "dead code" areas?

Thanks,

Moshe


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).


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜