Commit Graph

3626 Commits

Author SHA1 Message Date
Ruslan Diachenko 6731df9da7 Issue #1566: 'missing javadoc comment' violations fixed in JTreeTable 2015-08-29 15:37:52 -07:00
Ruslan Diachenko 6a39af3d61 Issue #1566: 'missing javadoc comment' violations fixed in FileDrop 2015-08-29 15:37:24 -07:00
Ruslan Diachenko f0e57dd3c5 Issue #1566: 'missing javadoc comment' violations fixed in CodeSelector 2015-08-29 15:36:58 -07:00
Ruslan Diachenko 1198054650 Issue #1566: 'missing javadoc comment' violations fixed in AbstractJavadocCheck 2015-08-29 15:30:45 -07:00
Ruslan Diachenko 22af64a28c Issue #1566: 'missing javadoc comment' violations fixed for Check, JavadocNodeImpl 2015-08-29 20:39:01 +01:00
Ruslan Diachenko c6e035bb66 Issue #1566: 'missing javadoc comment' violations fixed for JavadocTokenTypes 2015-08-29 20:13:50 +01:00
Baratali Izmailov f32bcd07ee Issue #1566: Fixed CyclomaticCompexityCheck violation in RightCurlyCheck 2015-08-29 14:47:22 -04:00
Baratali Izmailov 9ae0be5921 Issue #1566: Fixed CyclomaticComplexityCheck violation (partial) 2015-08-29 09:41:11 -04:00
Michal Kordas 3d9f726c2d Issue #1555: Decrease visibility of public constructor in non-public class
Fixes `PublicConstructorInNonPublicClass` inspection violations.

Description:
>Reports all constructors in non-public classes that are declared public.
2015-08-29 06:13:47 -07:00
Michal Kordas 9cd3660fd5 Issue #1555: Remove usage of obsolete collection
Fixes `ObsoleteCollection` inspection violations.

Description:
>Reports any uses of java.util.Vector or java.util.Hashtable. While still supported, these classes were made obsolete by the JDK1.2 collection classes, and should probably not be used in new development.
2015-08-29 06:12:45 -07:00
Michal Kordas e2f265251a Issue #1555: Avoid reusing variables
Fixes `ReuseOfLocalVariable` inspection violation.

Description:
>Reports local variables that are "reused", overwriting their values with new values unrelated to their original use. Such local variable reuse may be confusing, as the intended semantics of the local variable may vary with each use. It may also be prone to bugs, if code changes result in values that were thought to be overwritten actually being live. It is good practices to keep variable lifetimes as short as possible, and not reuse local variables for the sake of brevity.
2015-08-29 06:12:16 -07:00
Michal Kordas 531327f8c7 Issue #1555: Remove catch of unexpected exceptions in tests
Test will fail anyway, and failure message along with stacktrace will not be lost.
2015-08-29 06:11:42 -07:00
Michal Kordas f3ab307142 Issue #1555: Rename variables with unused exceptions
Fixes `UnusedCatchParameter` inspection violations.

Description:
>Reports any catch parameters that are unused in their corresponding blocks. This inspection will not report any catch parameters named "ignore" or "ignored". Conversely this inspection will warn on any catch parameters named "ignore" or "ignored" that are actually used.
2015-08-29 06:11:42 -07:00
Aleksandr Ivanov 4913b287c0 fixed problem with lexical order in CustomImportOrder #1469 2015-08-28 23:32:56 -07:00
Ruslan Diachenko ef1e65fb51 Issue #1566: ReturnCount violation fixed for CheckUtils 2015-08-28 23:06:51 -07:00
Ruslan Diachenko a09875b9f9 Issue #1566: ReturnCount violation fixed for ParseTreeModel 2015-08-28 23:05:38 -07:00
Ruslan Diachenko e66c64585f Issue #1566: ReturnCount violation fixed for SuppressionCommentFilter 2015-08-28 23:00:10 -07:00
Ruslan Diachenko c3c1b9ae06 Issue #1566: ReturnCount violation fixed for SuppressWithNearbyCommentFilter 2015-08-28 22:59:41 -07:00
Michal Kordas c3674faad8 Issue #1555: Fix some typos in checks package
Fixes some `SpellCheckingInspection` inspection violations.

Description:
>Spellchecker inspection helps locate typos and misspelling in your code, comments and literals.
2015-08-28 22:59:11 -07:00
Michal Kordas 07b24dd81c Issue #1555: Fix various typos
Fixes some `SpellCheckingInspection` inspection violations.

Description:
>Spellchecker inspection helps locate typos and misspelling in your code, comments and literals.
2015-08-28 22:53:43 -07:00
Michal Kordas 46a52f84c0 Issue #1555: Rename methods returning boolean to use question word
Fixes some `BooleanMethodNameMustStartWithQuestion` inspection violations.

Description:
>Reports boolean methods whose names do not start with a question word. Boolean methods that override library methods are ignored by this inspection.
2015-08-28 22:50:51 -07:00
Ruslan Diachenko 904de34fcd Issue #1566: ReturnCount violation fixed for WhitespaceAroundCheck 2015-08-28 22:49:55 -07:00
Michal Kordas e9ec5bfbd5 Issue #1555: Avoid reusing variables
Fixes some `ReuseOfLocalVariable` inspection violations.

Description:
>Reports local variables that are "reused", overwriting their values with new values unrelated to their original use. Such local variable reuse may be confusing, as the intended semantics of the local variable may vary with each use. It may also be prone to bugs, if code changes result in values that were thought to be overwritten actually being live. It is good practices to keep variable lifetimes as short as possible, and not reuse local variables for the sake of brevity.
2015-08-28 22:49:12 -07:00
Michal Kordas 9cc86b38df Issue #1555: Specify encoding explicitly
Fixes `ImplicitDefaultCharsetUsage` inspection violations.

Description:
>Reports method and constructor calls which implicitly use the platform's default charset. These can produce different results on (e.g. foreign language) systems that use a different default charset, resulting in unexpected behaviour.
2015-08-28 22:48:12 -07:00
Ruslan Diachenko a827b7cbbf Issue #1566: ReturnCount violation fixed for ModifierOrderCheck 2015-08-28 22:47:37 -07:00
Ruslan Diachenko c3af7d4b0e Issue #1566: ReturnCount violation fixed for JavadocStyleCheck 2015-08-28 22:46:44 -07:00
Ruslan Diachenko 8da3b6dea4 Issue #1566: ReturnCount violation fixed for AbstractJavadocCheck 2015-08-28 22:45:58 -07:00
Ruslan Diachenko 7b26e83b92 Issue #1566: ReturnCount violation fixed for AbstractExpressionHandler 2015-08-28 22:45:17 -07:00
Ruslan Diachenko f02d45fd6d Issue #1566: ReturnCount violation fixed for DesignForExtensionCheck 2015-08-28 22:44:41 -07:00
Michal Kordas f58f92adf6 Issue #1555: Fix false-positive in mismatched array read write rule
False-positive reported to JetBrains as [IDEA-144521](https://youtrack.jetbrains.com/issue/IDEA-144521).

Fixes `MismatchedArrayReadWrite` inspection violations.

Description:
>Reports any array fields or variables whose contents are read but not written, or written but not read. Such mismatched reads and writes are pointless, and probably indicate dead, incomplete or erroneous code.
2015-08-28 22:43:58 -07:00
Michal Kordas 8985e645a8 Issue #1555: Rename boolean methods to start with question word
Fixes `BooleanMethodNameMustStartWithQuestion` inspection violations.

Description:
>Reports boolean methods whose names do not start with a question word. Boolean methods that override library methods are ignored by this inspection.
2015-08-28 22:43:04 -07:00
Michal Kordas 1e541f0b98 Issue #1555: Delete unnecessary imports
Fixes `UnusedImport` inspection violations.

Description:
>Reports any import statements that are unused. Since IDEA can automatically detect and fix such statements with its "Optimize Imports" command, this inspection is mostly useful for off-line reporting on code bases that you don't intend to change.
2015-08-28 22:42:18 -07:00
Michal Kordas 83396526ac Issue #1555: Use constant for empty array of zero length
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-28 22:41:09 -07:00
Michal Kordas 4d0c118595 Issue #1555: Remove unnecessary boxing
Fixes `CachedNumberConstructorCall` inspection violations.

Description:
>Reports any attempt to instantiate a new Long, Integer, Short or Byte object from a primitive long, integer, short or byte argument. It may be more efficient to use the static method valueOf() here (introduced in Java 5), which will cache objects for values between -128 and 127 inclusive.
This inspection only reports if the project or module is configured to use a language level of 5.0 or higher.
2015-08-28 22:40:36 -07:00
Ruslan Diachenko 3e0159aeb5 Issue #1566: ReturnCount violation fixed for UnnecessaryParenthesesCheck 2015-08-28 22:39:52 -07:00
Baratali Izmailov 9cf023696c Issue #1566: ClassDataAbstractionCoupling's xdocs updated 2015-08-28 22:39:03 -07:00
Ruslan Diachenko 83f2b92b18 Issue #1566: ReturnCount violation fixed for SimplifyBooleanReturnCheck 2015-08-28 22:38:31 -07:00
Michal Kordas 94f9754acb Issue #1555: Decrease visibility of fields and methods in test code
Fixes some `WeakerAccess` inspection violations.

Description:
>This inspection reports all fields, methods or classes, found in the specified inspection scope, that may have their access modifier narrowed down.
2015-08-28 22:37:17 -07:00
Michal Kordas ef834b210c Issue #1555: Narrow scope of variable
Fixes `TooBroadScope` inspection violations introduced in recent commit.

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-28 22:36:30 -07:00
Michal Kordas 7c9772cee7 Issue #1555: Flip negated if-else
Fixes `NegatedIfElse` inspection violations introduced in recent commit.

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-28 22:35:09 -07:00
Michal Kordas 10b36a4ad5 Issue #1555: Remove unnecessary this keyword
Fixes `UnnecessaryThis` inspection violations introduced in recent commit.

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-28 22:34:23 -07:00
Michal Kordas b76b91e67a Issue #1555: Remove unused parameters
Fixes some `UnusedParameters` inspection violations.

Description:
>This inspection reports parameters that are not used by their methods and all method implementations/overriders.
2015-08-28 22:29:30 -07:00
Andrei Selkin 502404055f Provided UTs to check token sets for all checkstyle checks, issue #655 2015-08-28 22:48:21 +03:00
Andrei Selkin e64159f63b Corrected default, required and acceptable tokens for SimplifyBooleanExpressionCheck, issue #655 2015-08-28 22:48:20 +03:00
Andrei Selkin ae3861225a Corrected default, required and acceptable tokens for RequireThisCheck, issue #655 2015-08-28 22:48:20 +03:00
Andrei Selkin 37389ac4c4 Corrected default and acceptable tokens for JavadocMethodCheck, issue #655 2015-08-28 22:48:20 +03:00
Andrei Selkin 69e5f9319c Corrected acceptable tokens for IllegalInstantiationCheck, issue #655 2015-08-28 22:48:20 +03:00
Andrei Selkin 0cc53f9aec Corrected acceptable tokens for HiddenFieldCheck, issue #655 2015-08-28 22:48:20 +03:00
Roman Ivanov 1e7ae5866d Fix build problem caused by previous commit 2015-08-28 12:09:05 -07:00
liscju da6ebe6de4 Detect public constructors in non-public classes in RedundantModifier,
fixes issue #1537
2015-08-28 10:52:21 -07:00