That’s way beyond the capabilities of a static code analyzer, unless you want it to be really slow. If I’m not mistaken, Detekt is analyzing each file in isolation.
Also unused method detection is very hard. Just ask Jetbrains how hard it is for IntelliJ to do it.
IntelliJ analysis will tell you about unused methods, and even it isn’t 100% accurate.