When a new class has just been created, IntelliJ Idea marks it as unused and suggests to delete it. But where does this inspection actually live? I tried to run inspection by name and found "Unused Declaration" which has a dozen (in my opinion) parameters and a very strange finding algorithm. For example, every class which is found actually used somewhere. Is there a way to run an inspection which reports completely unused classes?
Asked
Active
Viewed 457 times
1
-
"every class which is foun actually used somewhere" Can you show an example of this? – Code-Apprentice Mar 12 '17 at 05:18
-
No I think. I can not copy and paste entire project to stackoveflow. Try this inspection on your project and see the results. – Cherry Mar 12 '17 at 05:22
-
You do not need to copy and paste an entire project. Just show one class and where it is used. – Code-Apprentice Mar 12 '17 at 05:23
-
Right Click on Project - Analyze - Inspect Code - Whole Project In Results: Go to, Declaration redundancy - Unused declaration. – Pratik Ambani Mar 12 '17 at 05:30
-
See https://stackoverflow.com/questions/22522013/how-find-all-unused-classes-in-intellij-idea – kc2001 Mar 22 '19 at 16:54