Bug 76530 [options] Warn about unused local variables and private members
I think we should warn about unused local variables and unused private members by default. These things are errors akin to unused imports, which we already warn about.
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/ScopeAnalyzerTest.java
assertVariables(res, new String[] { "param1", "count", "count2", "i", "j"});
		}
		
		{
			String str= "return 8;";
			int offset= buf.toString().indexOf(str);
	
			int flags= ScopeAnalyzer.VARIABLES;
			IBinding[] res= new ScopeAnalyzer(astRoot).getDeclarationsInScope(offset, flags);
			
			assertVariables(res, new String[] { "param1", "count", "count2"});
		}		
		
		{
			String str= "return k;";
			int offset= buf.toString().indexOf(str);
			
			int flags= ScopeAnalyzer.VARIABLES;
			IBinding[] res= new ScopeAnalyzer(astRoot).getDeclarationsInScope(offset, flags);
			assertVariables(res, new String[] { "param1", "count", "count2", "e", "k" });
		}
		
		{
			String str= "x= null;";
			int offset= buf.toString().indexOf(str);
			
			int flags= ScopeAnalyzer.VARIABLES;
			IBinding[] res= new ScopeAnalyzer(astRoot).getDeclarationsInScope(offset, flags);