3 ms·
Static analysis is very useful to identify unreachable code given that it can see all the code depending on it. It doesn't help with potentially reachable but
by msangi 9y ago
Static analysis is very useful to identify unreachable code given that it can see all the code depending on it.
It doesn't help with potentially reachable but unused cpdepaths, which in my experience make up for the most of 'dead' code.
Think of the functionality in an application that nobody uses or of obsolete API version when all the clients use a more recent version.
- lomnakkus 9y agoThis is an excellent point, but it should be noted that once you delete the unused API endpoint, finding the rest of the dead code is almost trivial with static analysis. 30-15 to static analysis, I think? ;)