fully qualified class name should not be treated as instance access
[fedora-idea.git] / plugins / InspectionGadgets / Announcement
blob10630a570127a9e5d797eecf541e3bb6c3132d41
2 Announcing version 1.0 of the InspectionGadgets plugin, available via the PluginManager
3 or at http://www.intellij.org/twiki/bin/view/Main/InspectionGadgets.
5 Changes in version 1.0
7 New inspections:
9 *   Use of '$' in identifier
10 *   Infinite Recursion
11 *   Auto-Boxing
12 *   Auto-Unboxing
13 *   Unnecessary boxing
14 *   Unnecessary unboxing
15 *   Class without no-arg constructor
16 *   Unnecessary 'final' for method parameter
17 *   Unnecessarily qualified static method call
18 *   Unqualified static method call
19 *   setUp() with incorrect signature
20 *   tearDown() with incorrect signature
21 *   setUp() doesn't call super.setUp()
22 *   tearDown() doesn't call super.tearDown()
23 *   Test method with incorrect signature
24 *   'assert' statement
25 *   Use of 'enum' as identifier
27 plus huge numbers of bugfixes.
29 Special thanks go to Bas Lejsdekkers and Keith Lea for their help and ideas on this release.
31 With the 1.0 release, development on InspectionGadgets will be going into "bugfixes-only"
32 mode for the next several months.   Thanks to everyone for your ideas, code, and
33 criticism as I developed InspectionGadgets.  It's thanks to your interest and support
34 that InspectionGadgets has become the most full-featured and powerful Java static analysis
35 tool available today, and the most-downloaded IDEA plugin.  I hope I've helped you kill a
36 lot of bugs.
41    * Abstraction issues
42       * Cast to a concrete class
43       * Class references one of its subclasses
44       * Collection declared by class, not interface
45       * Concrete class for instance variable
46       * Concrete class for local variable
47       * Concrete class for method parameter
48       * Concrete class for method return
49       * Concrete class for static variable
50       * 'instanceof' a concrete class
51       * "Magic number"
52       * 'switch' statement
54    * Class metrics
55       * Class too deep in inheritance tree
56       * Class with too many constructors
57       * Class with too many fields
58       * Class with too many methods
59       * Inner class too deeply nested
60       * Overly complex class
61       * Overly coupled class
63    * Class structure
64       * Abstract class extends concrete class
65       * Abstract class without abstract methods
66       * Abstract method overrides abstract method
67       * Abstract method overrides concrete method
68       * Class may be interface
69       * Class without constructor
70       * Class without no-arg constructor
71       * Class without package statement
72       * Constant declared in abstract class
73       * Constant declared in interface
74       * constructor not 'protected' in 'abstract' class(*)
75       * 'final' method in 'final' class(*)
76       * Inner class of interface
77       * No-op method in abstract class
78       * 'private' method declared 'final'(*)
79       * 'protected' member in 'final' class(*)
80       * 'public' constructor in non-'public' class(*)
81       * Static inheritance
82       * 'static' method declared 'final'(*)
83       * 'static', non-'final' field
84       * Utility class
85       * Utility class with public constructor
86       * Utility class without private constructor
88    * Cloning issues
89       * clone() doesn't call super.clone()
90       * clone() doesn't declare CloneNotSupportedException
91       * clone() instantiates objects with constructor
92       * Cloneable class without 'clone()'
94    * Code maturity issues
95       * Call to printStackTrace()
96       * Call to Thread.dumpStack()
97       * Class without toString()
98       * Use of obsolete collection type
99       * Use of System.out or System.err
101    * Code style issues
102       * C-style array declaration(*)
103       * Constant on left side of comparison(*)
104       * Constant on right side of comparison(*)
105       * expression.equals("literal") rather than "literal".equals(expression)(*)
106       * Missorted modifers(*)
107       * Multiple variables in one declaration(*)
108       * Return of 'this'
109       * Unnecessarily qualified static method call(*)
110       * Unqualified static method call(*)
111       * Variables of different types in one declaration(*)
113    * Encapsulation issues
114       * Assignment to Collection or array field from parameter
115       * Package-visible field
116       * Package-visible inner class
117       * Protected field
118       * Protected inner class
119       * Public field
120       * Public inner class
121       * Return of Collection or array field
123    * Error handling
124       * 'catch' generic class
125       * Checked exception class
126       * Empty 'catch' block
127       * Empty 'finally' block
128       * Empty 'try' block
129       * Error not rethrown
130       * 'instanceof' on 'catch' parameter
131       * Nested 'try' statement
132       * Overly broad 'catch' block
133       * 'return' inside 'finally' block
134       * ThreadDeath not rethrown
135       * 'throw' generic class
136       * 'throw' inside 'catch' block which ignores the caught exception
137       * 'throw' inside 'finally' block
138       * Unchecked exception class
140    * Finalization issues
141       * finalize() called explicitly
142       * finalize() doesn't call super.finalize()
143       * finalize() not declared 'protected'(*)
144       * Use of finalize()
146    * Imports
147       * * import
148       * Import from same package
149       * java.lang import
150       * Redundant import
151       * Single class import
152       * Unused import
154    * Initialization issues
155       * Abstract method call in constructor
156       * Instance variable may not be initialized
157       * Overridable method call in constructor
158       * Static variable may not be initialized
160    * Internationalization issues
161       * Call to Date.toString()
162       * Call to Numeric .toString()
163       * Call to String.compareTo()
164       * Call to String.equals()
165       * Call to String.equalsIgnoreCase()
166       * Call to Time.toString()
167       * Character comparison
168       * Hardcoded string literal
169       * "Magic character"
170       * String concatenation
171       * Use of StringTokenizer
173    * JUnit issues
174       * JUnit TestCase with non-trivial constructors
175       * Missing message on JUnit assertion
176       * setUp() doesn't call super.setUp()
177       * setUp() with incorrect signature
178       * 'setup()' instead of 'setUp()'(*)
179       * 'suite()' method not declared 'static'
180       * tearDown() doesn't call super.tearDown()
181       * tearDown() with incorrect signature
182       * 'teardown()' instead of 'tearDown()'(*)
183       * Test method with incorrect signature
185    * Method metrics
186       * Method with more than three negations
187       * Method with multiple loops
188       * Method with multiple return points.
189       * Method with too many parameters
190       * Overly complex method
191       * Overly coupled method
192       * Overly long method
193       * Overly nested method
195    * Naming conventions
196       * Class name prefixed with package name(*)
197       * Class naming convention(*)
198       * Confusing 'main()' method(*)
199       * Constant naming convention(*)
200       * Exception class name doesn't end with Exception(*)
201       * Instance method naming convention(*)
202       * Instance variable naming convention(*)
203       * Interface naming convention(*)
204       * Local Variable naming convention(*)
205       * Method name same as class name(*)
206       * Method name same as parent class name(*)
207       * Method parameter naming convention(*)
208       * Non-exception class name ends with 'Exception'(*)
209       * Standard variable names(*)
210       * Static method naming convention(*)
211       * Static variable naming convention(*)
212       * Use of '$' in identifier(*)
214    * Performance issues
215       * Boolean constructor call(*)
216       * Calls to System.gc() or Runtime.gc()
217       * Collection without initial capacity
218       * Field may be 'static'(*)
219       * Field repeatedly accessed in method
220       * Manual array copy(*)
221       * Multiply or divide by power of two(*)
222       * Object allocation in loop
223       * Redundant String constructor call(*)
224       * Redundant String.toString()(*)
225       * Single character .startsWith() or .endsWith()
226       * Single character string concatenation(*)
227       * Static collection
228       * String concatenation in loop
229       * StringBuffer without initial capacity
230       * StringBuffer.toString() in concatenation(*)
231       * Tail recursion
232       * Unnecessary temporary object in conversion from String(*)
233       * Unnecessary temporary object in conversion to String(*)
234       * Use of java.lang.reflect
235       * Zero-length array allocation
237    * Portability issues
238       * 'assert' statement
239       * Auto-boxing(*)
240       * Auto-unboxing(*)
241       * Call to Runtime.exec()
242       * Call to System.exit()
243       * Call to System.getenv()
244       * Hardcoded file separator
245       * Hardcoded line separator
246       * Native method
247       * Use of 'assert' as identifier(*)
248       * Use of 'enum' as identifier(*)
250    * Potentially confusing code constructs
251       * Assignment to for-loop parameter
252       * Assignment to method parameter
253       * 'break' statement
254       * 'break' statement with label
255       * Chained equality comparisons
256       * Chained method calls
257       * Conditional expression (?:)
258       * Confusing else branch
259       * Confusing floating-point literal(*)
260       * 'continue' statement
261       * 'continue' statement with label
262       * If statement with negated condition
263       * Implicit call to super()(*)
264       * Implicit numeric conversions(*)
265       * Local variable used and declared in different 'switch' branches
266       * Long literal ending with 'l' instead of 'L'(*)
267       * Method names differing only by case
268       * Nested 'switch' statement
269       * Nested assignment
270       * Nested conditional expression
271       * Nested method calls
272       * Numeric cast that loses precision
273       * Overloaded methods with same number of parameters
274       * Overly complex arithmetic expression
275       * Overly complex boolean expression
276       * Switch statement with too few branches
277       * Switch statement with too many branches
278       * Value of ++ or -- used
280    * Probable bugs
281       * Assignment to 'null'
282       * Assignment used as condition
283       * 'compareto()' instead of 'compareTo()'(*)
284       * Comparison of short and char values
285       * Covariant compareTo()
286       * Covariant equals()
287       * 'default' not last case in 'switch'
288       * equals() between objects of inconvertible types
289       * Fallthrough in 'switch' statement
290       * Floating point equality comparison
291       * For loop where update or condition doesn't use loop variable
292       * For loop with missing components
293       * 'hashcode()' instead of 'hashCode()'(*)
294       * Infinite loop statement
295       * Infinite recursion
296       * Loop statement that doesn't loop
297       * Non-final field referenced in 'compareTo()'
298       * Non-final field referenced in 'equals()'
299       * Non-final field referenced in 'hashCode()'
300       * Object comparison using ==, instead of '.equals()'(*)
301       * Octal and decimal integers in same array
302       * Result of InputStream.read() ignored
303       * Return of 'null'
304       * Statement with empty body
305       * String comparison using ==, instead of '.equals()'(*)
306       * Subtraction in compareTo()
307       * 'switch' statement without 'default' branch
308       * Text label in 'switch' statement
310    * Security issues
311       * Cloneable class in secure context
312       * Deserializable class in secure context
313       * Non-static inner class in secure context
314       * Serializable class in secure context
316    * Serialization issues
317       * Instance variable may not be initialized by readObject
318       * Non-serializable class with 'readObject()' or 'writeObject()'
319       * Non-serializable class with serialVersionUID
320       * 'readObject()' or 'writeObject()' not declared 'private'(*)
321       * 'readResolve()' or 'writeReplace()' not declared 'protected'(*)
322       * Serializable class with unconstructable ancestor
323       * Serializable class without 'readObject()' and 'writeObject()'
324       * Serializable class without serialVersionUID
325       * 'serialVersionUID' field not declared 'static final'(*)
326       * Transient field in non-serializable class(*)
328    * Threading issues
329       * Busy wait
330       * Call to notify() instead of notifyAll()(*)
331       * Call to Thread.run()(*)
332       * Double-checked locking
333       * Empty 'synchronized' statement
334       * Field accessed in both synchronized and unsynchronized contexts
335       * Nested 'synchronized' statement
336       * Non-private field accessed in synchronized context
337       * Non-synchronized method overrides synchronized method
338       * Synchronization on 'this'
339       * Synchronization on a non-final field
340       * 'synchronized' method
341       * 'wait()' not in loop
343    * Verbose or redundant code constructs
344       * Assignment replacable with operator assignment(*)
345       * Class explicitly extends java.lang.Object
346       * 'for' loop may be replaced by 'while' loop(*)
347       * Pointless arithmetic expression(*)
348       * Redundant boolean comparison(*)
349       * Redundant field initialization(*)
350       * Unnecessary 'final' for method parameter(*)
351       * Unnecessary 'if' statement(*)
352       * Unnecessary 'return' statement(*)
353       * Unnecessary 'super()' statement(*)
354       * Unnecessary 'this' qualifier(*)
355       * Unnecessary boxing(*)
356       * Unnecessary code block(*)
357       * Unnecessary fully qualified name(*)
358       * Unnecessary interface modifier(*)
359       * Unnecessary parentheses(*)
360       * Unnecessary semicolon(*)
361       * Unnecessary unboxing(*)
362       * Unused label(*)
364    * Visibility issues
365       * Field name hides field in superclass(*)
366       * Inner class field hides outer class field(*)
367       * Local variable hides member variable(*)
368       * Method overloads method of superclass(*)
369       * Method overrides private method of superclass(*)
370       * Method overrides static method of superclass(*)
371       * Parameter hides member variable(*)