Elsa icon indicating copy to clipboard operation
Elsa copied to clipboard

Add a check that private functions are referenced

Open Fuco1 opened this issue 7 years ago • 0 comments

It might happen that a private function is not referenced from anywhere inside the package. In which case it's dead code and we should remove it.

This will require construction of something like a call graph, because a function might be referenced from another which is never called, then both should be marked as unreachable.

Also think about mutually recursive functions which are unreachable from outside.

So basically directed components and then use those as equivalence classes and try reaching them from the entry points (= public functions).

Fuco1 avatar Aug 07 '18 12:08 Fuco1