Commit Graph

4407 Commits

Author SHA1 Message Date
Ruslan Diachenko 66d73fe618 Issue #1566: MemberName and MethodName violations fixed 2015-08-14 17:00:11 +03:00
Baratali Izmailov 443e534a3c Issue #1243: Resolved varargs ambiguity 2015-08-14 16:58:43 +03:00
Ruslan Diachenko d3408eb4e4 Issue #1566: InnerTypeLast turned on 2015-08-14 16:57:33 +03:00
Ruslan Diachenko 242028813d Issue #1566: ModifiedControlVariable violations fixed 2015-08-14 16:56:18 +03:00
Andrei Selkin d808a4e4d9 Added problematic links to ignorelist of linkcheck, issue #751 2015-08-14 11:39:48 +03:00
Andrei Selkin 2e1c0147df Corrected links on web site (addition), issue #751 2015-08-14 11:39:48 +03:00
Baratali Izmailov bb5eb6c08e Issue #1243: 'Local variable is not used' fixed 2015-08-13 11:34:20 -04:00
Ilja Dubinin 7770f2a2c2 Loops have to have only one breal/continue. Issue #46 2015-08-13 07:08:02 +03:00
Michal Kordas 6a0bad784f Remove unnecessary this. #1555
Fixes `UnnecessaryThis` inspection violations after recent commits.

Description:
>Reports on any unnecessary uses of this in the code. Using this to disambiguate a code reference may easily become unnecessary via automatic refactorings, and is discouraged by many coding styles.
2015-08-13 07:03:37 +03:00
Michal Kordas e9ade4ddad Remove redundant unit in zero value form CSS. #1555
Fixes `CssRedundantUnit` inspection violations.

Description:
>This inspection highlights zero values with specified unit of measurement.
2015-08-13 06:55:07 +03:00
Michal Kordas 7b34e9d7cd Do not allocate arrays of zero length. #1555
Fixes `ZeroLengthArrayInitialization` inspection violations.

Description:
>Reports on allocations of arrays with known lengths of zero. Since array lengths in Java are non-modifiable, it is almost always possible to share zero-length arrays, rather than repeatedly allocating new zero-length arrays. Such sharing may provide useful optimizations in program runtime or footprint. Note that this inspection does not report zero-length arrays allocated as static final fields, as it is assumed that those arrays are being used to implement array sharing.
2015-08-13 06:53:26 +03:00
Ruslan Diachenko 29f945e338 Issue #1566: Constructor definition in wrong order violations fixed 2015-08-13 06:51:11 +03:00
Ruslan Diachenko 677a74deee Issue #1566: ImportOrder violations fixed 2015-08-13 06:48:16 +03:00
Michal Kordas 26ffb0af87 Change name of private method conflicting with superclass method. #1555
Fixes `MethodOverridesPrivateMethod` inspection violations.

Description:
>Reports instance methods having the same name as a private method of a superclass. Such methods may result in confusing semantics, particularly if the private method is ever made publicly visible.
2015-08-13 06:45:38 +03:00
Michal Kordas 9a58272093 Remove redundant throws declarations. #1555
Fixes `RedundantThrowsDeclaration` inspection violations.

Description:
>This inspection reports exceptions that are declared in a method's signature but never thrown by the method itself.
2015-08-13 06:44:08 +03:00
Ilja Dubinin 331992aacd Coverage has been increased to 100% in CommentSuppressor. Issue #1010 2015-08-12 23:05:43 +01:00
Michal Kordas 8a6f12d9e9 Decrease visibility of constructor in abstract class. #1555
Fixes `NonProtectedConstructorInAbstractClass` inspection violation.

Description:
>Reports constructors in abstract classes that are not declared protected, package-protected or private.
2015-08-12 21:25:37 +03:00
Andrei Selkin 289ef67e9e Marked 'maxLineLength' as '@Deprecated' at LeftCurlyCheck, issue #965 2015-08-12 08:20:12 +03:00
Ruslan Diachenko 3bd699bd59 Issue #1566: HiddenField violations fixed 2015-08-12 08:19:21 +03:00
Michal Kordas fca2fd4d07 Extract nested class with other class nested to separate file. #1555
Fixes `ClassNestingDepth` inspection violation.

Description:
>Reports inner classes too deeply nested. Nesting inner classes inside inner classes is almost certain to be confusing, and is a good sign that refactoring may be necessary.
2015-08-12 08:01:55 +03:00
Michal Kordas ea06b2fb96 Decrease visibility of inner classes. #1555
Fixes `PackageVisibleInnerClass` inspection violation.

Description:
>Reports package-local inner classes.
2015-08-12 08:00:24 +03:00
Michal Kordas c4928f486c Decrease scope of variables. #1555
Fixes `TooBroadScope` inspection violations.

Description:
>Reports any variable declarations of which the scope can be narrowed. Especially useful for "Pascal style" declarations at the start of a method, but variables with too broad a scope are also often left over after refactorings.
2015-08-12 07:54:42 +03:00
Michal Kordas ba9639e5de Move constants to right side in comparisons. #1555
Fixes ` ConstantOnLHSOfComparison` inspection violations.

Description:
>Reports on comparison operations with constant values on their left-hand side. Some coding conventions specify that constants should be on the right-hand side of comparisons.
2015-08-12 07:53:59 +03:00
Michal Kordas 0da6b95ae7 Prevent classes to escape their scope. #1555
Fixes `ClassEscapesItsScope` inspection violation.

Description:
>Reports any references to classes which allow the class name to be used outside the class's stated scope. For instance, this inspection would report a public method which returns a private inner class, or a protected field whose type is a package-visible class. While legal Java, such references can be very confusing, and make reuse difficult.
2015-08-11 23:55:37 +03:00
Michal Kordas e13ff7caab Fix headers for classes in 'gui' package. #945 2015-08-11 23:42:51 +03:00
Baratali Izmailov 32bd618b19 Issue #1243: Generic types should be parameterized 2015-08-11 23:19:16 +03:00
Michal Kordas 82d8e91024 Remove unnecessary qualifiers. #1555
Fixes `UnnecessarilyQualifiedStaticUsage` inspection violations.

Description:
>Reports calls to static methods or accesses of static fields on the current class which are qualified with the class name. Such qualification is unnecessary, and may be safely removed.
2015-08-11 23:14:01 +03:00
Baratali Izmailov 521dacce75 Updated docs of DeclarationOrderCheck 2015-08-11 15:51:21 +03:00
Baratali Izmailov 772d2e9afc Issue #1243: 'Class is raw type' fixed 2015-08-11 15:48:23 +03:00
Ilja Dubinin d66b75bd7f Coverage has been increased to 100% in DetectorOptions. Issue #1010 2015-08-11 15:44:01 +03:00
Michal Kordas b8eeaaeb42 Remove obsolete method with casting that looses precision. #1555
Fixes `CastThatLosesPrecision` inspection violation.

Description:
>Reports any cast operations between built-in numeric types which may result in loss of precision. Such casts are not necessarily a problem, but may result in difficult to trace bugs if the loss of precision is unexpected.
2015-08-11 15:28:49 +03:00
Michal Kordas f5f1d754e2 Remove unnecessary @inheritDoc tags. #1555
Fixes `UnnecessaryInheritDoc` inspection violations.

Description:
>Reports any Javadoc comments which contain only the {@inheritDoc} tag. Since Javadoc copies the super class' comment if no comment is present, a comment containing only an {@inheritDoc} adds nothing.
2015-08-11 15:22:31 +03:00
Baratali Izmailov 1935bed577 Replace <code> tags with {@code ...} constructs. #1555
Fixes `HtmlTagCanBeJavadocTag` inspection violations.

Description:
>Reports use of <code> tags in Javadoc comments. Since JDK1.5 these constructs may be replaced with {@code ...} constructs. This allows the use of angle brackets (<, >) inside the comment, instead of HTML character entities.
2015-08-11 15:18:59 +03:00
Ilja Dubinin 1b5f357c33 Transient has been deleted from non-serializable classes. Issue #46 2015-08-11 15:01:26 +03:00
Ilja Dubinin 5cacb9a18b Deprecated methods have been removed. Issue #46 2015-08-11 14:58:32 +03:00
Baratali Izmailov d3864bcda3 VariableDeclarationUsageCheck has been removed from coverage configs 2015-08-10 16:56:57 +03:00
Baratali Izmailov 595f45c428 Issue #1293. VariableDeclarationUsageCheck refactroing. Useless variable definition check. 2015-08-10 16:56:57 +03:00
Baratali Izmailov 495d54c753 Issue #1293. VariableDeclarationUsageCheck refactoring. Useless variable check in 'switch' statement 2015-08-10 16:56:57 +03:00
Baratali Izmailov c4339df8b3 Issue #1293. Improved coverage for VariableDecalarationUsageCheck. 2015-08-10 16:56:57 +03:00
Ilja Dubinin aa0f77eb92 Coverage has been increased to 100% in MultilineDetector. Issue #1010 2015-08-10 13:46:39 +03:00
Andrei Selkin b42c26a8cd Restricted suppression for gui-package, issue #1555 2015-08-10 10:14:28 +03:00
Michal Kordas 1390091990 Return unmodifiable collections from methods. #1555
Fixes `ReturnOfCollectionField` inspection violations.

Description:
>Reports any attempt to return an array or Collection field from a method. Since the array or Collection may have its contents modified by the calling method, this construct may result in an object having its state modified unexpectedly. While occasionally useful for performance reasons, this construct is inherently bug-prone.
2015-08-10 09:47:58 +03:00
Michal Kordas 86826e1fa3 Invert if statements with negated conditions. #1555
Fixes `NegatedIfElse` inspection violations.

Description:
>Reports if statements which contain else branches and whose conditions are negated. Flipping the order of the if and else branches will usually increase the clarity of such statements.
2015-08-10 09:46:46 +03:00
Andrei Selkin d0939d3bc9 Corrected links on website, issue #751 2015-08-09 18:49:19 +03:00
Michal Kordas 24291cf8c8 Remove unnecessary calls to superclass constructors. #1555
Fixes `UnnecessarySuperConstructor` inspection violations.

Description:
>Reports any no-argument calls to a superclass constructor as the first call of a constructor. Such calls are unnecessary, and may be removed.
2015-08-09 17:44:06 +03:00
Michal Kordas 6d5c0da42f Remove unnecessary this keyword. #1555
Fixes `UnnecessaryThis` inspection violations.

Description:
>Reports on any unnecessary uses of this in the code. Using this to disambiguate a code reference may easily become unnecessary via automatic refactorings, and is discouraged by many coding styles.
 For example:
 ```
 this.a = 3;
 ```
2015-08-09 17:41:42 +03:00
Michal Kordas 85d6fcba9c Use isEmpty() instead of "".equals() on strings. #1555
Fixes `StringEqualsEmptyString` inspection violations.

Description:
>Reports .equals() being called to compare a String with an empty string. It is normally more performant to test a String for emptiness by comparing its .length() to zero instead.
2015-08-09 17:38:47 +03:00
Michal Kordas d8bacb1e5d Fix confusing floating point literals. #1555
Fixes `ConfusingFloatingPointLiteral` inspection violations.

Description:
>Reports any floating point numbers which do not have a decimal point, numbers before the decimal point, and numbers after the decimal point. Such literals may be confusing, and violate several coding standards.
2015-08-09 17:37:44 +03:00
Michal Kordas 1650f48269 Fix dangling Javadoc comments. #1555
Fixes `DanglingJavadoc` inspection violations.

Description:
>Reports dangling Javadoc comments. Javadoc comment are dangling if they don't belong to any class, method or field. For example a Javadoc comment in between method declarations that have their own javadoc comments.
2015-08-09 17:37:01 +03:00
Michal Kordas 5311fb5484 Remove trailing whitespace from XML files. #1555 2015-08-09 16:08:03 +02:00