News for hackers. Stuff that matters.
Re:Uber open-sources tool to automatically clean up stale code by bartkappenburg on Monday June 22, 2020 @04:13AM (#23598186)
I like the concept using an analyzer like this but I've been looking for a tool that removes code that isn't perse stale but isn't executed for, say, x amount of time.

We have quite a few online services in production of which I'm sure have a lot of code that isn't executed/touched by our users.

As an example I'm thinking about code in if statements that are never reached because the statement always returns False. These tools discussed aren't capable of detecting such stale code.

Any suggestions?

Re:Uber open-sources tool to automatically clean up stale code by mkr-plse on Monday June 22, 2020 @08:47AM (#23599563)
Do you already know the code that is not executed? If not, dynamic program analyses can help with identify the regions of code that are untouched (e.g., take a look at javaagent for Java programs). Subsequently, you can use some form of reachability analysis to determine which code blocks to delete without causing a compilation failure.