Question

I am doing a little code refactoring. Usually, after I rewrite/reimplement everything, I do a clean-up first. This means, I remove unused libraries, unused functions etc.

My question is: How can I find functions that are not used anywhere? by this I mean there is only a definition and declaration and nothing more?

Was it helpful?

Solution

Even if it is possible, I don't think cscope is the best tool in your situation.

You'll probably have more success by using a static code analyzer tool, that will also find other problems like non initialized or unused variables, dead code, etc.

I don't know which language(s) you are working with, but generally there are multiple open source solutions available.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top