문제

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

도움이 되었습니까?

해결책

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

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top