Elsa
Elsa copied to clipboard
Add a check that private functions are referenced
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).