Project
IntelliJ IDEA
Priority
Normal
Type
Usability Problem
Fix versions
No Fix versions
State
Open
Assignee
Maxim Shafirov
Subsystem
Code Analysis. Inspection
Affected versions
No Affected versions
Fixed in build
No Fixed in build
  • Created by   Gibson
    6 years ago (23 Jun 2005 16:53)
  • Updated by   root
    2 years ago (17 Jan 2010 20:21)
  • Jira: IDEADEV-2826
    (history, comments)
 
IDEA-29106 "Unused declaration" global inspection not showing things that local inspection shows
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
Given the class
public class InspectionTest {
    private void notUsed () {
        Object notUsed = new Object ();
    }
}
I should be able to do an Analyze code->General->Unused declaration and have Idea propose to delete:
- local variable notUsed
 - local variable notUsed
 - method notUsed
- class InspectionTest
if I have unchecked all the checkboxes in the global inspection.
However, I am only allowed to delete the class. If the class is referenced from elsewhere, no proposals are found.
Comments (4)
 
History
 
Linked Issues (?)
 
Gibson
  Gibson
26 Oct 2005 12:12
6 years ago
Still present in 3526
Gibson
  Gibson
12 Dec 2005 21:12
6 years ago
Still a problem in 4069
AlexL
  AlexL
01 Feb 2006 21:02
6 years ago
If I have all the unused inspection enabled, then In my Editor, it does show that the method and variable are unused.

If I do Analyze->Inspect Code, it tells me that the class InspectionTest is unused and that the variable notUsed is unused. It doesn't tell me that the method is unused. That seems to be a bug.

I'm not clear on your description, because you say "if I have unchecked all the checkboxes in the global inspection" –
wouldn't you see nothing then?
AlexL
  AlexL
01 Feb 2006 21:03
6 years ago
Forgot to add I tested in 4137