Commit Graph

4699 Commits

Author SHA1 Message Date
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
liscju e088721166 Fixes logic bug in gui ParseTreeInfoPanel making linesToPositions assign
lines to inappropriate positions
2015-08-28 10:49:06 -07:00
Andrei Selkin b79466ba09 Restricted suppression for IllegalTypeCheck, issue #1805 2015-08-28 10:47:02 -07:00
Andrei Selkin 7518054428 Added 'validateAbstractClassNames' option for IllegalTypeCheck, issue #1805 2015-08-28 10:47:02 -07:00
Baratali Izmailov ee84bccfe1 Issue #1566: Fixed JavaNSCC violations 2015-08-28 10:45:59 -07:00
Vladislav Lisetskiy 0024de5711 reimplement EqualsAvoidNullCheck, #1377 2015-08-28 13:41:53 +03:00
Ilja Dubinin 6f937bff1d Coverage has been increased to 100% in UniquePropertiesCheck. Issue #1290 2015-08-27 23:20:40 -07:00
Ruslan Diachenko 4ee4d60e07 Issue #1566: ReturnCount violation fixed for FallThroughCheck 2015-08-27 23:09:25 -07:00
Ruslan Diachenko 9241c0a692 Issue #1566: ReturnCount violation fixed for ExplicitInitializationCheck 2015-08-27 22:58:59 -07:00
Ruslan Diachenko 99ce97725c Issue #1566: ReturnCount violation fixed for RequireThisCheck 2015-08-27 22:56:57 -07:00
Ruslan Diachenko 5a3f05ec80 Issue #1566: ReturnCount violation fixed for AbstractSuperCheck 2015-08-27 22:55:20 -07:00
Ruslan Diachenko 7410a9f8bf Issue #1566: ReturnCount violation fixed for MagicNumberCheck 2015-08-27 22:53:36 -07:00
Ruslan Diachenko 9ddad74e48 Issue #1566: ReturnCount violation fixed for LeftCurlyCheck 2015-08-27 22:51:40 -07:00
Ruslan Diachenko 46378dadb5 Issue #1566: ReturnCount violation fixed for IllegalInstantiationCheck 2015-08-27 22:37:45 -07:00
Ruslan Diachenko 12bd833406 Issue #1566: ReturnCount violation fixed for UncommentedMainCheck 2015-08-27 22:34:44 -07:00
Ruslan Diachenko c9346746dc Issue #1566: ReturnCount violation fixed for FileContents 2015-08-27 22:33:56 -07:00
Ruslan Diachenko e4282ad407 Issue #1566: ReturnCount violation fixed for DetailAST 2015-08-27 22:33:18 -07:00
Michal Kordas d972822d63 Remove unused assignment. #1555
Fixes `UnusedAssignment` inspection violations.

Description:
>This inspection points out the cases where a variable value is never used after its assignment.
2015-08-27 22:32:14 -07:00
Michal Kordas a384794ade Mark method as static. #1555
Fixes `MethodMayBeStatic` inspection violation introduced in recent commit.

Description:
>Reports any methods which may safely be made static. A method may be static if it is not synchronized, it does not reference any of its class' non static methods and non static fields and is not overridden in a sub class.
2015-08-27 22:31:35 -07:00
Michal Kordas 95f8b08af8 Decrease visibility of fields and methods in main and utils packages. #1555
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-27 22:30:55 -07:00
Michal Kordas 4f5a400f12 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-27 22:29:46 -07:00
Michal Kordas cc7aeaec90 Fix some typos in coding package. #1555
Fixes some `SpellCheckingInspection` inspection violations.

Description:
>Spellchecker inspection helps locate typos and misspelling in your code, comments and literals.
2015-08-27 22:29:12 -07:00
Michal Kordas b14f255427 Fix typos in properties. #1555
Fixes some `SpellCheckingInspection` inspection violations.

Description:
>Spellchecker inspection helps locate typos and misspelling in your code, comments and literals.
2015-08-27 22:28:39 -07:00
Michal Kordas cb5a59fc6b Fix typos in blocks, headers and filters packages. #1555
Fixes some `SpellCheckingInspection` inspection violations.

Description:
>Spellchecker inspection helps locate typos and misspelling in your code, comments and literals.
2015-08-27 22:27:48 -07:00
Michal Kordas c57ee4b58a Fix typos in import and java8 packages. #1555
Fixes some `SpellCheckingInspection` inspection violations.

Description:
>Spellchecker inspection helps locate typos and misspelling in your code, comments and literals.
2015-08-27 22:26:58 -07:00
Michal Kordas 7eb80732e9 Fix typos in utlis package. #1555
Fixes some `SpellCheckingInspection` inspection violations.

Description:
>Spellchecker inspection helps locate typos and misspelling in your code, comments and literals.
2015-08-27 22:26:27 -07:00
Ilja Dubinin f0ea60f77b Indentation fixes for pom.xml. Issue #46 2015-08-28 00:41:55 +01:00
Michal Kordas 5de9cd8c77 Use constants for empty 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-27 13:20:42 -07:00
Michal Kordas bf6966b145 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-27 13:19:51 -07:00
Michal Kordas 9713d08ccc 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.
2015-08-27 13:18:14 -07:00
Michal Kordas 086ebb8300 Decrease visibility of public inner classes. #1555
Fixes `PublicInnerClass` inspection violations.

Description:
>Reports public inner classes.
2015-08-27 12:55:48 -07:00
Michal Kordas 1b765f3c22 Rename suspicious getters and setters. #1555
Fixes `SuspiciousGetterSetter` inspection violations.

Description:
>Reports suspicious getter or setter methods. A getter or setter is suspicious if it accesses a different field than would be expected by its name.
2015-08-27 12:54:35 -07:00
Michal Kordas 4d2e6647f9 Rename boolean methods to start with question word. #1555
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-27 12:53:59 -07:00
Michal Kordas 8142c804e9 Decrease visibility of fields and methods where applicable. #1555
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-27 12:52:54 -07:00
Baratali Izmailov 33b12f5f3d Issue #1566: Added NPathComplexityCheck to checkstyle_checks 2015-08-27 13:23:44 -04:00
Baratali Izmailov a21164df1f Issue #1566: Fixed NPathComplexity violation in JavadocMethodCheck 2015-08-27 09:54:28 -07:00
Baratali Izmailov a8ad56697b Issue #1566: Added ExecutableStatementCountCheck to checkstyle_checks 2015-08-27 10:59:14 -04:00
Baratali Izmailov 41740f2d68 Issue #1566: Reducing JavadocUtils method length 2015-08-27 06:30:30 -07:00
Baratali Izmailov 5b01236f52 Issue #1566: Refactoring of JavadocMethodCheck to reduce its method length. 2015-08-27 06:30:30 -07:00