Commit Graph

4074 Commits

Author SHA1 Message Date
Andrei Selkin 9900f9905f Issue #2258: Add GENERIC_START and GENERIC_END into list of acceptable tokens in xdocs of NoWhiteSpaceAfter and WhiteSpaceAround 2015-10-03 16:41:02 -07:00
Andrei Selkin 3504f74fea Issue #2259: Add COMMA into list of acceptable tokens in xdocs of NoWhiteSpaceBefore 2015-10-03 16:41:02 -07:00
Michal Kordas cdb6546adb Issue #2260: Make ConfigurationLoader.loadConfiguration public 2015-10-03 23:47:32 +02:00
Aleksandr Ivanov 3feab62232 Issue #2231: minor refactoring, helper method was added 2015-10-03 20:28:00 +03:00
Roman Ivanov bf5354f2d8 minor: fix for link to be direct (linkcheck plugin) 2015-10-02 06:30:48 -07:00
Roman Ivanov 1d88cbdab0 minor: fix for typo in release version 2015-10-02 06:14:13 -07:00
Roman Ivanov 290db3fe8b releasenotes 6.11.1 2015-10-02 05:40:52 -07:00
Pieter Noordhuis eeec3dc1d2 Issue #1548: Add lambda support to indentation check (see #281) 2015-10-01 06:53:21 -07:00
Ilja Dubinin e8d0f037a2 Issue #1290: Coverage has been increased to 100% in SuppressWarningsHolder. 2015-10-01 02:05:29 +01:00
Ilja Dubinin ce4df1ec00 Issue #1290: Coverage has been increased to 100% in AbstractDeclarationCollector. 2015-09-30 09:54:44 +01:00
Ilja Dubinin d877cb15cf Issue #1290: SuppressWarningHolder coverage has been increased 2015-09-29 16:52:59 -07:00
Vladislav Lisetskiy fff24e8900 Issue #905: Resolve Doxia Site Renderer warnings 2015-09-29 21:13:34 +03:00
Roman Ivanov 8cb51324c5 Revert "minor: custom tag 'noinspection' cause build problems during release"
This reverts commit d98c79e9be.
2015-09-27 19:21:15 -07:00
Roman Ivanov d98c79e9be minor: custom tag 'noinspection' cause build problems during release 2015-09-27 18:37:50 -07:00
Roman Ivanov 60db856ed6 release notes 6.11 2015-09-27 18:14:01 -07:00
Andrei Selkin 9f976c4a53 Issue #2169: Update HTML documentation to describe all options for all checks 2015-09-26 19:13:48 -07:00
Andrei Selkin b8f2d25b64 Issue #2166: Add 'requiredTranslations' option to Translation check 2015-09-26 15:02:59 -07:00
Andrei Selkin d046bc2b83 minor: Add missing translations 2015-09-26 15:02:59 -07:00
Andrei Selkin e7d1818531 minor: Escape '#' character in messages inside property files 2015-09-26 15:02:59 -07:00
Aleksandr Ivanov afa74495ee Issue #2231: restore 'url' option for ImportControl 2015-09-26 14:59:06 -07:00
Michal Kordas ed89c9edb5 Issue #2237: Add basic thread-safety to Javadoc checks 2015-09-26 06:56:37 -07:00
Roman Ivanov c2176a2400 doc: fix for dead links at xdoc 2015-09-25 15:44:04 -07:00
rnveach fbd04a537a Issue #1257: Fixed NPE in FinalLocalVariableCheck 2015-09-25 05:55:29 -07:00
Vladislav Lisetskiy ad7c6fbf2f Issue #1005: Make link for each row of Google style coverage table 2015-09-25 05:48:36 -07:00
Michal Kordas 037b1c34f7 Issue #2230: Add docs about while idiom to InnerAssignment check 2015-09-25 05:47:38 -07:00
Michal Kordas d282053d9c Issue #2080: Fix typos in code 2015-09-25 00:10:27 +02:00
Ruslan Diachenko 2cf54ade21 Issue #2191: SuppressionsLoaderTest UT was stabilized 2015-09-24 06:20:15 +01:00
Andrei Selkin 78cec4f822 minor: Exclude OBJBLOCK from acceptable tokens of VisibilityModifier 2015-09-23 12:35:24 -07:00
Michal Kordas 0c2a64d9f0 Issue #2080: Fix typos in code 2015-09-22 00:02:53 +02:00
Roman Ivanov 03f2be49f7 Issue #2219: NoWhitespaceAfter, NoWhitespaceBefore and WhitespaceAround don't support GENERIC_START nor GENERIC_END tokens 2015-09-21 07:05:25 -07:00
Andrei Selkin a82ecf6b46 Issue #2175: Add support of lambdas which parameter types are omitted for HiddenFieldCheck 2015-09-20 06:58:40 -07:00
Michal Kordas 3edd1b53a5 Issue #2080: Fix typos in code 2015-09-20 06:02:39 -07:00
Ruslan Diachenko d814d1352b Issue #2193: ROOT locale added in checker creation for UT; travis updated with a new check 2015-09-20 05:53:40 -07:00
Michal Kordas dbcca4f428 Issue #2203: Fix RedundantModifier check at final classes in interfaces 2015-09-20 05:50:15 -07:00
Michal Kordas 5391df4363 Issue #2213: Print missing cause of exception to console on error 2015-09-20 05:48:39 -07:00
Michal Kordas 3baf36b6fe Issue #2161: Add "Input" prefix to test input files 2015-09-20 01:16:01 +02:00
Michal Kordas 483132aca9 Issue #2205: Fix not working excludeScope in JavadocMethod check 2015-09-18 16:21:19 -07:00
Michal Kordas 9fcb40a184 Issue #2080: Fix AbstractClassWithoutAbstractMethods rule violations 2015-09-18 22:28:18 +02:00
liscju bad81c81c2 Issue #1537: Fix RedundantModifier check to recognise inner classes accessible from global scope 2015-09-18 06:20:59 -07:00
Aleksandr Ivanov e15f70ac5b Issue #1273: CustomImportOrderCheck rule priorities 2015-09-18 05:49:38 -07:00
Vladislav Lisetskiy 0406304865 Issue #2126: Make coverage 100% for TokenTypesDoclet 2015-09-18 03:06:12 +03:00
Ilja Dubinin 72faf5617a Issue #1290: ClassResolver coverage has been increased to 100%. 2015-09-17 15:33:00 -07:00
Michael Osipov b6d9344d1c Pull #2034: Use StandardCharsets and get rid of UnsupportedEncodingException 2015-09-17 15:01:39 -07:00
Vladislav Lisetskiy 3fe3fc67cb Issue #2095: Fix false negative in AtclauseOrder check 2015-09-17 13:04:24 -07:00
Vladislav Lisetskiy dc3ac39a9a Issue #2195: Remove errors from Maven output in TokenTypesDocletTest 2015-09-17 19:03:43 +03:00
Vladislav Lisetskiy 9fe8577108 Issue #2126: Improve code coverage for TokenTypesDoclet 2015-09-15 20:59:04 -07:00
Vladislav Lisetskiy 0e7ff063f8 Issue #2108: Anchor naming checks in google_style.xml 2015-09-16 05:32:25 +03:00
Ilja Dubinin 0c581e0c23 Issue #1292: AbstractHeaderCheck coverage has been increased to 100% 2015-09-15 17:26:49 -07:00
Ilja Dubinin e29dc4d398 Issue #46: public empty array has been moved to another class and become private 2015-09-15 17:24:17 -07:00
Vladislav Lisetskiy ca15d3d758 Issue #2074: Correct NonEmptyAtclauseDescription IT 2015-09-15 17:11:43 -07:00
Vladislav Lisetskiy 2aeea04137 Issue #2074: Correct JavadocTagContinuationIndentation IT 2015-09-15 17:11:43 -07:00
Vladislav Lisetskiy f344001be1 Issue #2074: Correct AtclauseOrder IT 2015-09-15 16:47:09 -07:00
Vladislav Lisetskiy 319b04ff74 Issue #2112: Fix IllegalStateException in JavadocTypeCheck 2015-09-15 09:14:47 -07:00
Vladislav Lisetskiy 38bba612c0 Issue #2108: Split all modules to be separate at config_naming.html 2015-09-15 07:06:14 -07:00
rnveach 59483db973 Issue #157: fix java grammar for unicode escape 2015-09-14 12:58:18 -04:00
Roman Ivanov e5dd96d8dc Issue #2089: fix for checkstyle violations 2015-09-14 06:40:08 -07:00
Roman Ivanov a42475db9e Issue #2089: Allow COMMA again in NoWhiteSpaceBefore 2015-09-14 06:39:08 -07:00
Roman Ivanov 0bff657f61 Issue #2129: logging as WARN for misconfigurated Check is changed to Exception, we should fail fast. 2015-09-13 18:19:24 -07:00
Michal Kordas 0fc8b62a35 Issue #2080: Fix typos in code 2015-09-11 16:32:42 -07:00
Michal Kordas daae0431d1 Issue #2161: Unify naming files with test inputs 2015-09-11 22:48:59 +02:00
Andrei Selkin dba6c944cd Issue #382: Fix HiddenField false positive violations for anonymous classes 2015-09-11 13:14:33 -04:00
Andrei Selkin bd9efb5e66 Issue #759: Create wide message for CheckstyleException in PackageObjectFactory 2015-09-11 18:04:45 +03:00
Roman Ivanov d58e2892c3 doc: improvement of formatting 2015-09-11 07:17:26 -07:00
Ilja Dubinin 526c9d0cba Issue #46: blocks of code should not be duplicated 2015-09-10 17:25:58 -07:00
Michal Kordas c1ce291701 Issue #2130: Fix "deprecation" compiler warnings in input files 2015-09-10 17:12:35 -07:00
Michal Kordas 9e5803a8ec Issue #2130: Fix "rawtypes" compiler warnings in input files 2015-09-10 21:11:44 +02:00
Andrei Selkin a29f01a95b Issue #67: Added support of logging severity for all audit events 2015-09-10 12:57:54 +03:00
Michal Kordas 4687b0b801 Issue #2130: Fix unchecked compiler warnings in input files 2015-09-09 15:58:56 -07:00
Andrei Selkin af9ed7386d Issue #606: Reorganized sections in eclipse.xml 2015-09-09 11:29:20 -07:00
Andrei Selkin e52892ba62 Issue #606: Extended Eclipse user guide for newbies of Checkstyle 2015-09-09 11:29:20 -07:00
Ilja Dubinin b9cad4d385 doc: examles order for DescedantTokenCheck has been changed. 2015-09-09 01:56:54 +01:00
Michal Kordas c0d3652d1b Issue #2135: Fix exception at NeedBraces check in enhanced for loops 2015-09-08 22:23:23 +02:00
Phillip Webb f7698ed23b Issue #2141: Allow @return tags from annotation types 2015-09-07 22:37:23 -07:00
Roman Ivanov 66b07f10af Issue #46: suppression was added to false-positive that IntelijIdea found in previous commit 2015-09-07 18:35:06 -07:00
Ilja Dubinin 33ab409c4e Issue #46: loops should not have more then one break or continue statement 2015-09-08 01:02:50 +01:00
Michal Kordas 4ae3c95822 Issue #2137: Make test for FileTabCharacter locale and OS independent 2015-09-07 22:57:18 +02:00
Roman Ivanov 78103da033 Issue #2080: name violations are fixed, checkstyle suppressions were updated to validate names in tests too 2015-09-06 17:23:55 -07:00
Roman Ivanov dc90dd2845 inspection suppression was moved to javadoc 2015-09-06 15:54:01 -07:00
Roman Ivanov 9ef8a38684 Revert "Issue #2065: additional attempt to resolve violation on TeamCity, DeclareCollectionAsInterface is disabled"
This reverts commit 18d5fd7eeb.
2015-09-06 15:37:09 -07:00
Roman Ivanov a36ac91b27 Revert "Issue #2065: additional attempt to resolve violation on TeamCity"
This reverts commit 652848ae06.
2015-09-06 15:36:39 -07:00
Michal Kordas 20b73ed383 Issue #2131: Add inspection scope profile for IDEA analysis 2015-09-06 22:55:23 +02:00
Michal Kordas ccf2d8315c Issue #1555: Remove usage of obsolete junit.framework.Assert class 2015-09-06 20:15:51 +02:00
Roman Ivanov 18d5fd7eeb Issue #2065: additional attempt to resolve violation on TeamCity, DeclareCollectionAsInterface is disabled 2015-09-06 06:34:07 -07:00
Roman Ivanov 652848ae06 Issue #2065: additional attempt to resolve violation on TeamCity 2015-09-06 06:11:24 -07:00
liscju cd10c41ca5 Issue #937: added tests for validating commit message. 2015-09-06 05:32:26 -07:00
Michal Kordas 4d8d047f46 Issue #2080: Fix typos in code
Fixes some `SpellCheckingInspection` inspection violations.

Description:
>Spellchecker inspection helps locate typos and misspelling in your code, comments and literals.
2015-09-06 14:17:36 +02:00
Roman Ivanov 5dffb5a301 Revert "minor: Intelij violation(Redundant suppression) is resolved"
This reverts commit 7e6084f236.
2015-09-05 17:26:51 -07:00
Roman Ivanov 7e6084f236 minor: Intelij violation(Redundant suppression) is resolved 2015-09-05 16:33:55 -07:00
Vladislav Lisetskiy 6f1406f980 Issue #2094: fix StringIndexOutOfBoundsException 2015-09-05 15:24:14 -07:00
Michal Kordas be7f7ed37b Issue #2065: Remove additional context from IDEA suppression
While suppression works fine, it causes false positive in `RedundantSuppression` inspection reported as [IDEA-144818](https://youtrack.jetbrains.com/issue/IDEA-144818).

Tag `@noinspection` is self-descriptive enough on its own.
2015-09-05 15:18:01 -07:00
Michal Kordas d105a27046 Issue #1555: Tune down inspection for overridden parameter names
ParameterNameDiffersFromOverriddenParameter does not require parameters to match names anymore if method is from external library and parameter may be wrongly named there.
2015-09-05 23:07:11 +02:00
Andrei Selkin 0e8002b728 Issue #2092: Corrected xdoc for TranslationCheck. 2015-09-05 20:57:04 +03:00
Andrei Selkin 984fd1cb8f Issue #2092: Activated TranslationCheck in checkstyle_checks.xml. 2015-09-05 16:01:48 +03:00
Michal Kordas d220d7c3cc Issue #2080: Fix typos in code
Fixes some `SpellCheckingInspection` inspection violations.

Description:
>Spellchecker inspection helps locate typos and misspelling in your code, comments and literals.
2015-09-04 20:28:43 -04:00
Michal Kordas 31f6765fdc Issue #2080: Fix typos in code
Fixes some `SpellCheckingInspection` inspection violations.

Description:
>Spellchecker inspection helps locate typos and misspelling in your code, comments and literals.
2015-09-04 14:48:17 -07:00
Michal Kordas 6839ac4fd8 Issue #2080: Add missing assertions to utils tests
Fixes some `TestMethodWithoutAssertion` inspection violations.

Description:
>Reports test methods of JUnit test case classes that do not contain any assertions. Such methods indicate either incomplete or weak test cases.
2015-09-04 14:47:31 -07:00
Vladislav Lisetskiy 45e3ec229d Issue #1214: Update all Checks html docs with link to hosted
configurations
2015-09-04 05:38:52 -07:00
Andrei Selkin 9acda0b233 Issue #1833: Fixed redundant modifier false positive for abstract classes in interfaces. 2015-09-04 05:32:51 -07:00
Ilja Dubinin 0b4ae9160b Issue #46: loops should not contain more then one break. 2015-09-03 21:24:05 -04:00
Michal Kordas f7e41edb94 Issue #2080: Replace ternary condition operator with if
Fixes `ConditionalExpression` inspection violations.

Description:
>Reports the ternary condition operator. Some coding standards prohibit the use of the condition operator, in favor of if-else statements.
2015-09-03 18:07:24 -07:00
Michal Kordas 2b4a02d2c8 Issue #2080: Fix typos in code
Fixes `SpellCheckingInspection` inspection violations introduced in recent commits.

Description:
>Spellchecker inspection helps locate typos and misspelling in your code, comments and literals.
2015-09-03 18:06:15 -07:00
Michal Kordas b115e9afe5 Issue #2080: Replace tabs with spaces
Fixes `ProblematicWhitespace` inspection violations introduced in recent commits.

Description:
>Reports tabs used for indentation when the code style is configured to use only spaces.
2015-09-03 18:04:08 -07:00
Michal Kordas 92182aea44 Issue #1555: Rename local variables according to convention
Fixes `LocalVariableNamingConvention` inspection violations introduced in recent commits.

Description:
>Reports local variables whose names are either too short, too long, or do not follow the specified regular expression pattern.
2015-09-03 18:02:23 -07:00
Michal Kordas 1e0de782f6 Issue #1555: Use constants for empty arrays
Fixes `ZeroLengthArrayInitialization` inspection violations introduced in recent commits.

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-09-03 18:02:23 -07:00
Michal Kordas 8cf5116925 Issue #1555: Simplify JUnit assertions
Fixes `SimplifiableJUnitAssertion` inspection violations introduced in recent commits.

Description:
>Reports any JUnit assertTrue calls which can be replaced by equivalent assertEquals calls. assertEquals calls will normally give better error messages in case of test failure than assertTrue can.
2015-09-03 18:02:23 -07:00
Michal Kordas ea891b1fd0 Issue #1555: Use proper order in assertEquals assertions
Fixes `MisorderedAssertEqualsParameters` inspection violations introduced in recent commits.

Description:
>Reports any calls to JUnit assertEquals() which have a non-literal as the expected result argument and a literal as the actual result argument. Such calls will behave fine for assertions which pass, but may give confusing error reports if their expected and actual arguments differ.
2015-09-03 18:02:23 -07:00
Michal Kordas ee7d6e9df3 Issue #1555: Add locale to lower case conversion
Fixes `StringToUpperWithoutLocale` inspection violations introduced in recent commits.

Description:
>Reports any call of toUpperCase() or toLowerCase() on String objects which do not specify a java.util.Locale. Such calls are usually incorrect in an internationalized environment.
2015-09-03 18:02:23 -07:00
Michal Kordas 9ce956473b Issue #1555: Add argument to exception constructor call
Fixes `NewExceptionWithoutArguments` inspection violations introduced in recent commits.

Description:
>Reports exception instance creation without any arguments specified. When an exception is constructed without arguments it contains no information about the fault that happened, which makes debugging needlessly hard.
2015-09-03 18:02:23 -07:00
Michal Kordas dd7935491a Issue #1555: Narrow scope of variable
Fixes `TooBroadScope` inspection violations introduced in recent commits.

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-09-03 18:02:23 -07:00
Michal Kordas 2085758156 Issue #1555: Replace qualifier with an import
Fixes `UnnecessaryFullyQualifiedName` inspection violations introduced in recent commits.

Description:
>Reports on fully qualified class names which can be shortened. The quick fix for this inspection will shorten the fully qualified names, adding import statements as necessary.
2015-09-03 18:02:23 -07:00
Michal Kordas a3daead123 Issue #2065: Add suppression for IntelliJ IDEA inspection as comment 2015-09-03 21:47:35 +02:00
Vladislav Lisetskiy 6389959930 Issue #2064: ignore classes nested in interaces or annotations in Final
Class Check
2015-09-03 11:11:56 -07:00
Vladislav Lisetskiy c569113723 Issue #2063: Create separate web page for old release notes 2015-09-03 13:52:12 -04:00
Vladislav Lisetskiy f66dcdbd94 Issue #1530: Detect nested enums marked as static in RedundantModifier
check
2015-09-03 06:45:44 -07:00
Andrei Selkin 860e442d53 Issue #1900: Extended javadoc/xdoc for RightCurlyCheck. 2015-09-03 06:34:06 -07:00
Andrei Selkin 8f5c67b836 Issue #1900: Extended violation message for right curly brace policy 'same'. 2015-09-03 06:34:06 -07:00
Andrei Selkin 0689f76ab3 Issue #1903: Fixed NPE in MutableExceptionCheck.isExtendedClassNamedAsException . 2015-09-03 06:17:12 -07:00
Andrei Selkin 0b23dba45a Issue #945: Added UT which validates that all checks which exist in classpath are referenced in checkstyle_checks.xml. 2015-09-03 06:11:18 -07:00
Andrei Selkin ab4bce61c5 Issue #945: Added 'IllegalCatch' into checkstyle_checks.xml. 2015-09-03 06:11:18 -07:00
Vladislav Lisetskiy 1455655c75 Issue #2074: Correct SummuryJavadoc IT 2015-09-03 06:05:15 -07:00
Vladislav Lisetskiy 54c907e6ae Issue #2062: Change message in SummaryJavadocCheck 2015-09-03 06:04:13 -07:00
Michal Kordas 137caa82cb Issue #2065: Add suppression for IntelliJ IDEA inspection
Inspection in this case is right. Parameter `Properties` can be replaced with `Map<Object, Object>`. It works fine with Checkstyle, but it breaks binary compatiblity with Maven Checkstyle Plugin, which is not acceptable.
2015-09-03 05:55:42 -07:00
Andrei Selkin 0b6d22e69b Issue #2029: New option 'switchBlockAsSingleDecisionPoint' for CyclomaticComplexityCheck. 2015-09-03 05:51:41 -07:00
Ilja Dubinin 4ea84c811b Issue #1290: Coverage has been increased to 100% in AbstractTypeAwareCheck and nested classes 2015-09-03 05:39:43 -07:00
Ilja Dubinin c6c9ad9d33 Issue #1290: coverage has been increased to 100% in TranslationCheck 2015-09-03 05:34:28 -07:00
Ilja Dubinin 2c6e941a26 Issue #1290: Coverage has been increased to 100% in NewLineAtTheEndOfFileCheck 2015-09-03 01:00:31 +01:00
Michal Kordas 14db0ec7e9 Tidy up in release notes 2015-09-02 09:38:01 +02:00
Andrei Selkin ed280ebd0b Minor: refactoring of TreeWalker to increase readability 2015-09-01 21:51:26 -07:00
Andrei Selkin 6f7dfc3c69 Corrected javadoc/xdoc for IllegalTypeCheck 2015-09-01 21:50:33 -07:00
Ilja Dubinin 8607274a92 Issue #46: Loops should not contain more than a single 'break' or 'continue' statement 2015-09-01 21:47:52 -07:00
Ilja Dubinin 6e775898e7 Issue #46: Statements shouldn't be nested too deep. 2015-09-01 20:01:26 +01:00
Roman Ivanov ac4b253d1d release notes 6.10.1 2015-09-01 08:52:16 -07:00
Roman Ivanov af95472a09 Issue #2065: broken compatibility with maven-checkstyle-plugin:2.15 at checkstyle:6.10 2015-09-01 07:24:43 -07:00
Roman Ivanov c1e40c92a0 release notes 6.10 2015-08-31 23:12:04 -07:00
Roman Ivanov 092dd6864f minor: fix for incorrect link 2015-08-31 23:11:25 -07:00
Roman Ivanov 5a52ced14e doc: fix for issue commit message format 2015-08-31 22:16:10 -07:00
Roman Ivanov 3cef81032c Issue #1678: Enable Checkstyle checks for 'gui' package 2015-08-31 21:37:06 -07:00
Michal Kordas b9bdf9f8e1 Issue #1555: Instructions to enable IntelliJ IDEA Inspections 2015-08-31 21:13:47 -07:00
Michal Kordas 2d8f5576bb Issue #1555: Refer to collections by interface
Fixes `DeclareCollectionAsInterface` inspection violations.

Description:
>Reports on declarations of Collection variables made by using the collection class as the type, rather than an appropriate interface.
2015-08-31 21:13:04 -07:00
Michal Kordas 5c5eafaa7e Issue #1555: Replace constructor with setUp() in JUnit test case
Fixes `TestCaseWithConstructor` inspection violations.

Description:
>Reports on JUnit test cases with initialization logic in their constructors. Initialization of JUnit test cases should be done in setUp() methods instead.
2015-08-31 21:11:14 -07:00
Michal Kordas 5a46bdbeea Issue #1555: Remove unnecessary unboxing
Fixes `UnnecessaryUnboxing` inspection violations.

Description:
>Reports "unboxing", e.g. explicit unwrapping of wrapped primitive values. Unboxing is unnecessary under Java 5 and newer, and can be safely removed.
This inspection only reports if the project or module is configured to use a language level of 5.0 or higher.
2015-08-31 21:11:14 -07:00
Michal Kordas eb31210db6 Issue #1555: Remove unnecessary boxing
Fixes `UnnecessaryBoxing` inspection violations.

Description:
>Reports "boxing", e.g. wrapping of primitive values in objects. Boxing is unnecessary under Java 5 and newer, and can be safely removed.
This inspection only reports if the project or module is configured to use a language level of 5.0 or higher.
2015-08-31 21:11:14 -07:00
Baratali Izmailov 5ca472faa6 Issue #1243: Eclipse warnings about unused fields have been fixed. 2015-08-31 21:10:32 -07:00
Michal Kordas 8373465620 Issue #2054: Simplify overqualified CSS element
Fixes `Element (a.dl-link) is overqualified, just use .dl-link without element name.`

Description:
>Using selector like the one bellow is almost every time unnecessary, unless the element name causes the class to behave differently you can omit it. With this you will shrink the file size and speedup your page load time.
2015-08-31 21:10:01 -07:00
Michal Kordas d8418e5ab0 Issue #2054: Remove empty CSS rule
Fixes `Rule is empty` inspection violations.

Description:
>An empty rule is one that doesn't contain any properties, such as:
 ```
  .foo {
  }
```
A lot of times, empty rules appear as a result of refactoring without further cleanup. Eliminating empty rules results in smaller file sizes and less style information for the browser to deal with.
2015-08-31 21:10:01 -07:00
Michal Kordas 4587090b83 Issue #1555: Extract classes to the upper level
Fixes `PackageVisibleInnerClass` inspection violations.

Description:
>Reports package-local inner classes.
2015-08-31 21:08:09 -07:00
Michal Kordas de2c3f153e Issue #1555: Remove redundant initializer
Fixes `UnusedAssignment` inspection violation.

Description:
>This inspection points out the cases where a variable value
2015-08-31 21:06:39 -07:00
Baratali Izmailov 49a0ee8171 Issue #1566: Fixed SummaryJavadocCheck violations. 2015-08-31 15:58:35 -04:00
Ilja Dubinin faa8a0b7a4 Issue #46. Statements shouldn't be nested too deep 2015-08-31 12:49:02 -07:00
Michal Kordas 1a205d4b43 Issue #1555: Rename parameters to match names in overridden methods
Fixes `ParameterNameDiffersFromOverriddenParameter` inspection violation.

Description:
>Reports parameters that have different names from the corresponding parameters in the methods they override. While legal in Java, such inconsistent names may be confusing, and lessen the documentation benefits of good naming practices.
2015-08-31 12:28:57 -07:00
Ruslan Diachenko bca6d627ac Issue #1566: WriteTag violations fixed 2015-08-31 20:14:01 +01:00
Ruslan Diachenko c899af31c1 Issue #1566: JavadocParagraph violations fixed 2015-08-31 19:51:27 +01:00
Baratali Izmailov 2b861bd6e1 Issue #1566: Fix for SummaryJavadocCheck's violations (partial) 2015-08-31 14:24:26 -04:00
Ruslan Diachenko a1128cd742 Issue #1566: JavadocTagContinuationIndentation violations fixed 2015-08-31 18:43:28 +01:00
Baratali Izmailov 5ca9667952 Issue #1566: Fix for SummaryJavadocCheck's violations (partial) 2015-08-31 13:02:55 -04:00
Baratali Izmailov cf85a72f3d Issue #1566: Fix for SingleLineJavadoc's violations 2015-08-31 11:49:51 -04:00
Ruslan Diachenko 54ff2757df Issue #1566: OverloadMethodsDeclarationOrder violations fixed 2015-08-31 06:58:02 -07:00
Ruslan Diachenko 39f752cd88 Issue #1566: VariableDeclarationUsageDistance violations fixed 2015-08-31 14:17:55 +01:00
Michal Kordas 879864502b Issue #1555: Rename parameters to match names
Fixes `ParameterNameDiffersFromOverriddenParameter` inspection violation.

Description:
>Reports parameters that have different names from the corresponding parameters in the methods they override. While legal in Java, such inconsistent names may be confusing, and lessen the documentation benefits of good naming practices.
2015-08-30 22:13:06 -07:00
Michal Kordas 4b95f33697 Issue #1555: Collapse if statement
Fixes `IfStatementWithIdenticalBranches` inspection violation.

Description:
>Reports if statements with identical "then" and else branches. Such statements are almost certainly programmer error.
2015-08-30 22:12:38 -07:00
Michal Kordas 74566f21a2 Issue #1555: Replace if with switch
Fixes `IfStatementWithTooManyBranches` inspection violation.

Description:
>Reports if statements with too many branches. Such statements may be confusing, and are often the sign of inadequate levels of design abstraction.
2015-08-30 22:12:38 -07:00
Michal Kordas a4e3e3c1af Issue #1555: Narrow scope of variables
Fixes `TooBroadScope` inspection violation.

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-30 22:12:38 -07:00
Ruslan Diachenko 5922d5a673 Issue #1566: IllegalCatch violations fixed for TreeWalker 2015-08-30 22:06:24 -07:00
Ruslan Diachenko 3ef918920c Issue #1566: IllegalCatch violations fixed for CheckstyleAntTask 2015-08-30 22:04:08 -07:00
Ruslan Diachenko d740f2e1cd Issue #1566: IllegalCatch violations fixed for Checker 2015-08-30 22:02:37 -07:00
Baratali Izmailov d693562ab7 Issue #1243: Coverage of DeclarationOrderCheck has been improved 2015-08-30 09:34:48 -07:00
Baratali Izmailov aa581847fe Issue #2031: 'ignoreMethods' option has been removed from DeclarationOrderCheck 2015-08-30 09:34:48 -07:00
Baratali Izmailov b576ccf879 Issue #1566: Fixed CyclomaticComplexity violations in RightCurlyCheck 2015-08-30 06:54:15 -07:00
Baratali Izmailov 11eb99681a Issue #1566: Fixed CyclomaticComplexity violations in IndentationCheckTest 2015-08-30 06:54:15 -07:00
Baratali Izmailov 9c21acf16a Issue #1566: Fixed CyclomaticComplexity violations in RegexpHeaderCheck 2015-08-30 06:54:15 -07:00
Michal Kordas e89837b42e Issue #1555: Mark methods as static
Fixes `MethodMayBeStatic` inspection violation.

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-30 06:53:28 -07:00
Michal Kordas e1a2e66b26 Issue #1555: Replace while with foreach
Fixes `WhileCanBeForeach` inspection violation.

Description:
>Reports while loops which iterate over collections, and can be replaced with the foreach iteration syntax, which is available in Java 5 and newer.
This inspection only reports if the project or module is configured to use a language level of 5.0 or higher.
2015-08-30 06:53:28 -07:00
Michal Kordas 190ce3850f Issue #1555: Make return collection 'unmodifiable'
Fixes `ReturnOfCollectionField` inspection violation.

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-30 06:53:28 -07:00
Michal Kordas bf4a253173 Issue #1555: Avoid reuse of local 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-30 06:53:28 -07:00
Michal Kordas b69c169934 Issue #1555: Remove unused assignment
Fixes `UnusedAssignment` inspection violations.

Description:
>This inspection points out the cases where a variable value is never used after its assignment, i.e.:
  - the variable never gets read after assignment OR
  - the value is always overwritten with another assignment before the next variable read OR
  - the variable initializer is redundant (for one of the above two reasons) OR
  - the variable is never used.
2015-08-30 06:53:28 -07:00
Michal Kordas f5e4d9b42a Issue #1555: Use try-with-resources to close streams in test code
The issue was stream not being closed at all or closed, but not in finally block.

Fixes some `IOResource` inspection violations.

Description:
>Reports any I/O resource which is not safely closed in a finally block. Such resources may be inadvertently leaked if an exception is thrown before the resource is closed. I/O resources checked by this inspection include java.io.InputStream, java.io.OutputStream, java.io.Reader, java.io.Writer and java.io.RandomAccessFile. I/O resources which are wrapped by other I/O resources are not reported, as the wrapped resource will be closed by the wrapping resource.
2015-08-30 10:21:15 +02:00
Ilja Dubinin 7e1062dea1 Issue #46. statements shouldn't be nested too deep 2015-08-29 22:52:31 -07:00
Ilja Dubinin 603c5bb53e Issue #46: Statements shouldn't be nested too deep 2015-08-29 22:46:58 -07:00
Michal Kordas 7b8a3aa5bb Issue #1555: Fix various typos
Fixes `SpellCheckingInspection` inspection violation.

Description:
>Spellchecker inspection helps locate typos and misspelling in your code, comments and literals
2015-08-29 22:38:45 -07:00
Michal Kordas b372cfa0a8 Issue #1555: Collapse and refactor if statement with identical branches
Fixes `IfStatementWithIdenticalBranches` inspection violation.

Description:
>Reports if statements with identical "then" and else branches.
2015-08-29 22:36:29 -07:00
Michal Kordas f293a21076 Issue #1555: Flip negated if-else
Fixes `NegatedIfElse` inspection violation.

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-29 22:35:08 -07:00
Michal Kordas e81ca8290b Issue #1555: Avoid reuse of local 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 22:34:14 -07:00
Michal Kordas 2ed00e0af3 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-29 22:33:18 -07:00
Michal Kordas 1dcb4b201f Issue #1555: Convert method with array parameter to vararg
Fixes `MethodCanBeVariableArityMethod` inspection violations.

Description:
>Reports methods with which can be converted to be a variable arity/varargs method, available in Java 5 and newer.
This inspection only reports if the project or module is configured to use a language level of 5.0 or higher.
2015-08-29 22:32:25 -07:00
Michal Kordas 0beb5abf9a Issue #1555: Fix malformed JUnit Rule
Fixes `JUnitRule` inspection violations.

Description:
>Reports malformed @Rule/@ClassRule usages:
* Checks for any member that is annotated with @Rule but is not public.
* Checks for any member that is annotated with @ClassRule but is not public or not static.
2015-08-29 22:31:45 -07:00
Michal Kordas 8f16a480da Issue #1555: Remove usage of obsolete junit.framework.Assert
Fixes `UseOfObsoleteAssert` inspection violations.

Description:
>Reports any calls to methods from the junit.framework.Assert class. This class is obsolete and the calls can be replaced by calls to methods from the org.junit.Assert class.
2015-08-29 22:30:30 -07:00
Michal Kordas f418179fce Issue #1555: Rename method returning boolean to use 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-29 22:29:43 -07:00
Michal Kordas 1f54d3d689 Issue #1555: Mark methods as static
Fixes `MethodMayBeStatic` inspection violations.

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-29 22:28:58 -07:00
Michal Kordas f1cd01472d Issue #1555: Remove unused assignments
Fixes `UnusedAssignment` inspection violations.

Description:
>This inspection points out the cases where a variable value is never used after its assignment
2015-08-29 22:28:16 -07:00
Michal Kordas 2ec015a814 Issue #1555: Remove unsafe calls to Class.newInstance()
Fixes `ClassNewInstance` inspection violations.

Description:
>Reports any calls to java.lang.Class.newInstance(). The newInstance method propagates any exception thrown by the no-arg constructor, including checked exceptions. Use of this method effectively bypasses the compile-time exception checking that would otherwise be performed by the compiler. Replacing such a method call with a call to the java.lang.reflect.Constructor.newInstance() method avoids this problem by wrapping any exception thrown by the constructor in a java.lang.reflect.InvocationTargetException.
2015-08-29 22:27:18 -07:00
Michal Kordas f96930d1a7 Issue #1555: Use function after definition
Fixes some `JSLint` inspection violations.

Description:
>JSLint: 'main' was used before it was defined.
2015-08-29 22:26:30 -07:00
Michal Kordas a1dba1d4a1 Issue #1555: Use previously unused parameter
Fixes `UnusedParameters` inspection violations.

Description:
>This inspection reports parameters that are not used by their methods and all method implementations/overriders.
2015-08-29 17:51:45 -07:00
Michal Kordas c74d7b7549 Issue #1555: Use try-with-resources in test code
The issue was stream not being closed at all or closed, but not in finally block.

Fixes some `IOResource` inspection violations.

Description:
>Reports any I/O resource which is not safely closed in a finally block. Such resources may be inadvertently leaked if an exception is thrown before the resource is closed. I/O resources checked by this inspection include java.io.InputStream, java.io.OutputStream, java.io.Reader, java.io.Writer and java.io.RandomAccessFile. I/O resources which are wrapped by other I/O resources are not reported, as the wrapped resource will be closed by the wrapping resource.
2015-08-29 17:49:43 -07:00
Michal Kordas 7b0388ee96 Issue #1555: Replace for loop that misses component with while loop
Fixes `ForLoopWithMissingComponent` inspection violation.

Description:
>Reports for loops that lack initialization, condition, or update clauses. Some coding styles prohibit such loops.
2015-08-29 15:43:48 -07:00
Michal Kordas 1ad7c80579 Issue #1555: Replace complex boolean expression with set of tokens
Fixes `OverlyComplexBooleanExpression` inspection violation.

Description:
>Reports boolean expressions with too many terms. Such expressions may be confusing and bug-prone.
2015-08-29 15:42:25 -07:00
Ruslan Diachenko 936501d034 Issue #1566: 'missing javadoc comment' violations fixed in Main, AbstractTreeTableModel 2015-08-29 15:39:56 -07:00
Ruslan Diachenko c70cf22d39 Issue #1566: 'missing javadoc comment' violations fixed in ParseTreeModel, TreeTableModelAdapter 2015-08-29 15:39:06 -07:00
Ruslan Diachenko 60b7d4a59d Issue #1566: 'missing javadoc comment' violations fixed in ParseTreeInfoPanel 2015-08-29 15:38:35 -07:00
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
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
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 a21164df1f Issue #1566: Fixed NPathComplexity violation in JavadocMethodCheck 2015-08-27 09:54:28 -07: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
Baratali Izmailov f0e75896a4 Issue #1566: Reducing CheckstyleAntTask's method length 2015-08-27 06:30:30 -07:00
Baratali Izmailov 6f1840f011 Issue #1566: Refactoring of JavadocMethodCheck to reduce method's length 2015-08-27 06:30:29 -07:00
Michal Kordas 8e168c23bd Add argument to exception constructor invocation. #1555
Fixes `NewExceptionWithoutArguments` inspection violation.

Description:
>Reports exception instance creation without any arguments specified. When an exception is constructed without arguments it contains no information about the fault that happened, which makes debugging needlessly hard.
2015-08-27 05:51:28 -07:00
Michal Kordas 55c92042eb Fix various typos in Java code. #1555
Fixes some `SpellCheckingInspection` inspection violations.

Description:
>Spellchecker inspection helps locate typos and misspelling in your code, comments and literals, and fix them in one click.
2015-08-27 05:50:48 -07:00
Michal Kordas 896af516b0 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 05:49:35 -07:00
Michal Kordas 15d0f87f15 Remove redundant throws declarations. #1555
Fixes `RedundantThrows` inspection violations.

Description:
>This inspection reports exceptions that are declared in a method's signature but never thrown by the method itself or its implementations/derivatives.
2015-08-27 05:47:04 -07:00
Michal Kordas 8b70948104 Use explicit charset in test code. #1555
Fixes some `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-27 05:46:11 -07:00
Michal Kordas db19563633 Use constant for empty array initialization. #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 05:45:32 -07:00
Michal Kordas 24d7448294 Rename boolean methods to start with question word. #1555
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-27 05:44:55 -07:00
Michal Kordas 13a49cc45b 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 05:43:52 -07:00
Michal Kordas 95bfc1ce4b Remove unused field. #1555
Fixes `FieldMayBeStatic` inspection violations.

Description:
>Reports any instance variables which may safely be made static. A field may be static if it is declared final, and is initialized with a constant.
2015-08-27 05:43:07 -07:00
Michal Kordas 738c7f184d Use compiled pattern instead of dynamic regexp. #1555
Fixes `DynamicRegexReplaceableByCompiledPattern` inspection violations.

Description:
>Reports calls to the regular expression methods of java.lang.String using constants arguments. Such calls may be profitably replaced with a private static final Pattern field so that the regular expression does not have to be compiled each time it is used.
2015-08-27 05:42:30 -07:00
Michal Kordas 60ae95a621 Remove call to default toString() implementation. #1555
Fixes `ObjectToString` inspection violations.

Description:
>Reports any calls to .toString() which use the default implementation from java.lang.Object. The default implementation is rarely desired, but easy to use by accident. Calls to .toString() on objects of type java.lang.Object are ignored by this inspection.
2015-08-27 05:41:39 -07:00
Ruslan Diachenko aa4e40e550 Issue #1566: partial fix of ReturnCount violations 2015-08-27 05:40:07 -07:00
Ruslan Diachenko 2af34e2adc Issue #1566: partial fix of ReturnCount violations 2015-08-27 05:39:34 -07:00
Ruslan Diachenko 5478613082 Issue #1566: partial fix of ReturnCount violations 2015-08-27 05:34:15 -07:00
Ruslan Diachenko c6a70d4cca Issue #1566: partial fix of ReturnCount violations 2015-08-27 05:31:50 -07:00