mvdan/goreduce

cleanup: use code coverage

mvdan opened this issue · 1 comments

mvdan commented

We can delete lots of code by simply seeing what code wasn't run to reproduce the issue. For example, produce a coverage file and parse it with https://godoc.org/golang.org/x/tools/cover.

This will likely be useful at the start, perhaps even after every change.

mvdan commented

On second thoughts, shortcuts aren't safe as they might stop triggering compiler bugs and even change the runtime behaviour.

Perhaps this could be done as a rule. But it would only be a speed-up, as this should be handled by rules that remove code like statements. Closing for now as I'm not focusing on speedups yet.