Commit Graph

4074 Commits

Author SHA1 Message Date
rnveach 0d4b2ba4a7 Issue #2161: unify test input locations 2015-10-12 07:00:35 -07:00
rnveach 11dc88a9c1 Issue #2161: unify test input locations 2015-10-12 07:00:06 -07:00
rnveach e23953e9e8 Issue #2161: unify test input locations 2015-10-12 06:59:41 -07:00
rnveach b6995b7dad Issue #2161: unify test input locations 2015-10-12 06:59:17 -07:00
rnveach 9f66b0bde4 Issue #2161: unify test input locations 2015-10-12 06:58:53 -07:00
rnveach 708bb0271d Issue #2161: unify test input locations 2015-10-12 06:58:28 -07:00
rnveach 8a6befb469 Issue #2161: unify test input locations 2015-10-12 06:58:00 -07:00
rnveach 284670d938 Issue #2161: unify test input locations 2015-10-12 06:57:29 -07:00
rnveach d7cf4f652e Issue #2161: unify test input locations 2015-10-12 06:57:08 -07:00
rnveach c3af3e410f Issue #2161: unify test input locations 2015-10-12 06:56:12 -07:00
rnveach 855a88f421 Issue #2161: unify test input locations 2015-10-12 06:55:32 -07:00
rnveach e81a02f59b Issue #2161: unify test input locations 2015-10-12 06:55:07 -07:00
rnveach 82767dbe68 Issue #2161: unify test input locations 2015-10-12 06:54:39 -07:00
rnveach 59ca05e73c Issue #2161: unify test input locations 2015-10-12 06:54:09 -07:00
rnveach 3ad60e5742 Issue #2161: unify test input locations 2015-10-12 06:53:34 -07:00
Dawid Nejman 1d1a46a97a Issue #1238: Update list of related Tools 2015-10-11 08:19:35 -07:00
rnveach 14c24f3235 Issue #2161: unify test input locations 2015-10-10 19:09:16 -04:00
rnveach 873db7cbc0 minor: fixed test/resources wrong package location 2015-10-10 07:49:20 -07:00
rnveach bafe139d59 minor: fixed test/resources wrong package location 2015-10-10 05:53:17 -07:00
rnveach 86fd13b4e8 minor: fixed test/resources wrong package location 2015-10-09 21:29:40 -04:00
rnveach aaf606ee02 Issue #2283: fixed NPE in NeedBraces.isSingleLineFor 2015-10-09 06:18:02 -07:00
Roman Ivanov 1891ca16af Revert "Issue #46: Exception logging has been added."
This reverts commit 2a77329c4f.
2015-10-08 17:14:29 -07:00
Roman Ivanov a75c64efe3 Issue #985: Fix PMD violations for ShortVariable rule (partial) 2015-10-08 17:12:34 -07:00
Ilja Dubinin 2a77329c4f Issue #46: Exception logging has been added. 2015-10-08 15:51:47 -07:00
Stéphane Galland 74e9b64d93 Issue #2275: Support for @SuppressWarnings("all"). 2015-10-08 06:47:06 -07:00
Roman Ivanov b4bbea4c05 Issue #996: PMD violations PreserveStackTrace 2015-10-07 18:05:26 -07:00
Roman Ivanov 9c0ce8e0ec Issue #997: PMD violations EmptyMethodInAbstractClassShouldBeAbstract 2015-10-07 17:57:54 -07:00
Roman Ivanov 88830ca708 Issue #974: PMD violation ConfusingTernary (partial fix) 2015-10-07 17:56:04 -07:00
Roman Ivanov f4e5c1e2b2 Issue #974: PMD violation ConfusingTernary (partial fix) 2015-10-07 17:56:00 -07:00
Roman Ivanov 423ed9e469 Issue #974: PMD violation ConfusingTernary (partial fix) 2015-10-07 17:55:56 -07:00
Roman Ivanov b3e0211ef4 minor: fixing teamcity violation 2015-10-06 20:08:03 -07:00
Roman Ivanov 6e1b3faded Issue #985: Fix PMD violations for ShortVariable rule (resolving Teamcity violation) 2015-10-06 19:42:24 -07:00
Roman Ivanov 5f5142b232 Issue #985: Fix PMD violations for ShortVariable rule 2015-10-06 19:33:06 -07:00
Roman Ivanov ca7f7f8556 Issue #985: Fix PMD violations for ShortVariable rule 2015-10-06 17:56:40 -07:00
Roman Ivanov aa4203f3ba Issue #985: Fix PMD violations for ShortVariable rule 2015-10-06 17:50:56 -07:00
Roman Ivanov 30c3a362d4 Issue #985: Fix PMD violations for ShortVariable rule 2015-10-06 17:46:02 -07:00
Michal Kordas 58b28a75e1 Issue #2271: Remove underscores from method names 2015-10-06 13:10:20 -07:00
Roman Ivanov 0e34489490 Issue #2273: rename CheckUtils.isVoidMethod to isNonVoidMethod 2015-10-06 08:53:14 -07:00
Roman Ivanov e2b4e687d7 Issue #2283: rename CheckUtils.isVoidMethod to isNonVoidMethod 2015-10-06 06:56:17 -07:00
Michal Kordas 258b1ffed6 Issue #2271: Replace negated assertTrue with assertFalse 2015-10-05 14:07:33 -07:00
Michal Kordas e7c2ee9604 Issue #2243: Fix missing code coverage 2015-10-05 20:32:36 +02:00
Roman Ivanov af24528a97 minor: issue link was added to explain skipped content section in xdoc/config.xml 2015-10-05 06:44:58 -07:00
Roman Ivanov a53f329960 minor: extra space was removed in xdoc 2015-10-05 06:33:11 -07:00
Roman Ivanov b63759af76 release notes for 6.11.2 2015-10-05 06:30:53 -07:00
Roman Ivanov 1c20b49e66 doc: fix for broken links 2015-10-05 06:30:27 -07:00
Andrei Selkin 63f01249f8 Issue #819: Create UT to check that all checkstyle modules have xdocs 2015-10-05 05:31:52 -07:00
Andrei Selkin 3ebddae1b9 Issue #819: Split config.html into few pages 2015-10-05 05:31:52 -07:00
Andrei Selkin 040436b960 Issue #819: Create xdoc documentation for FileContentsHolder 2015-10-05 05:31:52 -07:00
rnveach e7edc7118d minor: fixed jgit resource leaks in commit validation 2015-10-03 16:54:17 -07:00
Andrei Selkin 8d88c2f41b doc: Add WILDCARD_TYPE into list of acceptable tokens in xdocs of WhitespaceAround 2015-10-03 16:41:02 -07:00
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