Upon analysis, IntelliJ
finds unused methods, but i need to be in the class in question. Additionally the only way i find about is by scrolling through the code to find a method with greyed out name.
Is there a way one can run a search across project to find unused methods?
Additionally, if A
calls B
and A
is unused, is it possible to mark B
as unused as well, as part of a single search?
You can do this through "Inspect Code".
Go to Analyze -> Inspect Code, select the default project, and allow it to run. You'll get a result set similar to this.
This is a dummy project I use for formatting code and experimenting with questions asked on SO. I had completely forgotten that I had a StackOverflow
class here, but the inspection found that it was unused after all.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With