Commit Graph

4635 Commits

Author SHA1 Message Date
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
Ruslan Diachenko adebc9da6f Issue #1566: partial fix of ReturnCount violations 2015-08-27 05:30:54 -07:00
Ruslan Diachenko 044889b26a Issue #1566: partial fix of ReturnCount violations 2015-08-27 05:30:05 -07:00
Ruslan Diachenko 98a3157200 Issue #1566: partial fix of ReturnCount violations 2015-08-27 05:28:29 -07:00
Ruslan Diachenko f981e58454 Issue #1566: partial fix of ReturnCount violations 2015-08-27 05:26:22 -07:00
Ruslan Diachenko fb0f73fc9c Issue #1566: partial fix of ReturnCount violations 2015-08-27 05:25:56 -07:00
Ruslan Diachenko 69a3d541b4 Issue #1566: partial fix of ReturnCount violations 2015-08-27 05:21:36 -07:00
Ilja Dubinin cdf3e56bac Utils class has been splitted to CommonUtils and TokenUtils. Issue #1898 2015-08-27 05:17:01 -07:00
Ilja Dubinin ed595de84f Utils classes have been moved to utils package. Issue #1898 2015-08-27 05:17:01 -07:00
Michal Kordas f6113bb56d Remove empty methods. #1555
Fixes `EmptyMethod` inspection violations in test code.

Description:
>This inspection reports methods where:
- method is empty OR
- all implementations of interface method are empty OR
- method is empty itself and is overridden only by empty methods
Note that a method containing only the super() call and passing its own parameter is also considered empty.  This inspection is automatically suppressed for methods annotated with special annotations, for example, EJB annotations javax.ejb.Init and javax.ejb.Remove.
2015-08-26 18:08:22 -07:00
Ilja Dubinin f6e48c40b9 Indentation fix for pom.xml. Issue #46 2015-08-26 22:37:54 +01:00
Ilja Dubinin e85813fa81 Elemnt should be on a new line sonar check fixed for pom.xml. Ixxue #46 2015-08-26 22:02:24 +01:00
Baratali Izmailov 561df9fc0c Issue #1566: Refactoring of AbstractJavadocCheck to reduce method length 2015-08-26 12:50:51 -07:00
Baratali Izmailov d6bdd7ee79 Issue #1566: Reduce FileText's constructor length 2015-08-26 12:50:51 -07:00
Michal Kordas 3fca3c9250 Use compiled pattern instead of dynamic regexp in checks. #1555
Fixes some `SpellDynamicRegexReplaceableByCompiledPattern` 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-26 09:28:36 -07:00
Michal Kordas e23b8a2ffa Remove calls to simple getters within classes. #1555
Fixes `CallToSimpleGetterInClass` inspection violations.

Description:
>Reports any calls to a simple property getter from within the property's class. A simple property getter is defined as one which simply returns the value of a field, and does no other calculation. Such simple getter calls may be safely inlined, at a small performance improvement. Some coding standards also suggest against the use of simple getters for code clarity reasons.
2015-08-26 09:27:54 -07:00
Michal Kordas b3f8328217 Remove redundant tests for equals methods. #1555
These cases are covered by EqualsVerifier anyway.
2015-08-26 04:34:53 -07:00
Michal Kordas 9f4730e7e5 Remove invocations of equals method with null. #1555
These cases are covered by EqualsVerifier anyway.

Fixes `ObjectEqualsNull` inspection violations.

Description:
>Reports on calls to .equals() which have null as an argument. The semantics of such calls are almost certainly not what was intended.
2015-08-26 04:34:53 -07:00
Michal Kordas 0c29723033 Fix problem found by EqualsVerifier in IntMatchFilter. #1088
Details:
```
java.lang.AssertionError: Subclass: equals is not final.
Supply an instance of a redefined subclass using withRedefinedSubclass if equals cannot be final.
```
2015-08-26 04:34:52 -07:00
Michal Kordas 82ca98909b Use EqualsVerifier to test equals and hashCode in IntMatchFilter. #1088 2015-08-26 04:34:52 -07:00
Ilja Dubinin e42acc940f JavadocTagInfo has been moved to javadoc package. It reduces number of cycle dependencies between packages. Part of issue #46 2015-08-25 16:40:41 -07:00
Ruslan Diachenko 085ce12db0 Issue #1566: MultipleStringLiterals violations fixed 2015-08-26 00:00:09 +01:00
Michal Kordas 8aec5bba7e Review visibility and usages of protected fields. #1555
Fixes `ProtectedField` inspection violations in test code.

Description:
>Reports protected instance variables. Constants (i.e. variables marked static and final) are not reported.
2015-08-25 06:41:51 -07:00
Roman Ivanov eec72ee84c Revert "Made getRequiredTokens and getAcceptableTokens as abstract, issue #655" as we will do that in 7.0 version
This reverts commit efac6bf023.
2015-08-25 05:30:17 -07:00
Andrei Selkin 34c2bf22b7 Provided UT for all checks to test with default configuration, issue #655 2015-08-25 05:29:56 -07:00
Andrei Selkin afd9a5c3e5 Ensured that check's required tokens are subset of default tokens, issue #655 2015-08-25 05:29:56 -07:00
Andrei Selkin efac6bf023 Made getRequiredTokens and getAcceptableTokens as abstract, issue #655 2015-08-25 05:29:56 -07:00
Ruslan Diachenko 26513d5233 Issue #1566: MultipleStringLiterals violations partial fix 2015-08-25 05:20:28 -07:00
Ruslan Diachenko 8c3e4a5074 Issue #1566: MultipleStringLiterals violations partial fix 2015-08-25 05:12:53 -07:00
Michal Kordas 655a496c88 Use unchecked exception. #1555
Fixes `CheckedExceptionClass` inspection violations in test code.

Description:
>Reports checked exception classes (i.e. subclasses of Exception which are not also subclasses of RuntimeException). Certain coding standards require that all user-defined exception classes be unchecked.
2015-08-25 05:07:32 -07:00
Andrei Selkin 841746e9c3 Removed suppression for SwitchDensity rule from PMD, issue #973 2015-08-25 04:59:50 -07:00
Michal Kordas beae0df0a4 Use camel case in property names. #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-25 04:55:12 -07:00
Michal Kordas adb3483738 Fix typos in xdocs. #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-25 04:53:48 -07:00
Michal Kordas e15a64e6c7 Remove obsolete entry from PMD configuration. #877 2015-08-25 04:52:50 -07:00
Michal Kordas e249a8cdcf Use compiled pattern instead of dynamic regexp in CheckUtils. #1555
Fixes some `SpellDynamicRegexReplaceableByCompiledPattern` 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-25 04:51:18 -07:00
Michal Kordas 7a3285dcfa Fix typos in pom.xml. #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-25 04:46:31 -07:00
Michal Kordas e615817b5b Fix various typos. #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-25 04:43:15 -07:00
Michal Kordas c2ce485b48 Fix typos in Indentation check 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-25 04:41:22 -07:00
Michal Kordas c4a7d06206 Rename non-boolean method starting with question word. #1555
Fixes `NonBooleanMethodNameMayNotStartWithQuestion` inspection violations.

Description:
>Reports non-boolean methods whose names start with a question word. Non-boolean methods that override library methods are ignored by this inspection.
2015-08-25 04:40:19 -07:00
Michal Kordas d345f3beb2 Fix typos in code and Javadoc. #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-25 04:39:30 -07:00
Michal Kordas 8f86620e72 Fix typos in quality profile files. #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-25 04:38:37 -07:00
Michal Kordas 7b14802231 Use compiled pattern instead of dynamic regexp. #1555
Fixes some `SpellDynamicRegexReplaceableByCompiledPattern` 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-25 04:31:58 -07:00
Roman Ivanov 565dc677ae Remove unused Coveralls plugin from pom.xml . #1881 2015-08-25 04:24:08 -07:00
Roman Ivanov ff19a040d2 Update ANTLR to 4.5.1-1 . #1880 2015-08-25 14:11:31 +03:00
Roman Ivanov 8e99304daa Update EqualsVerifier to 1.7.4. #1879 2015-08-25 14:05:07 +03:00
Michal Kordas 7d0b3edff8 Remove redundant no-arg constructor. #1555
Fixes `UnnecessaryConstructor` inspection violations.

Description:
>Reports unnecessary constructors. A constructor is unnecessary if it is the only constructor of a class, has no parameters, has the same access modifiers as its containing class, and does not perform any initialization except explicitly or implicitly calling the super class constructor without arguments. Such a constructor can be safely removed as it will be generated by the compiler even if not specified.
2015-08-25 14:00:50 +03:00
Michal Kordas bee8aab67c Encapsulate package-visible fields. #1555
Fixes `PackageVisibleField` inspection violations.

Description:
>Reports package-visible instance variables. Constants (i.e. variables marked static and final) are not reported.
2015-08-25 13:51:50 +03:00
Michal Kordas 2071f9b542 Add arguments to created exceptions. #1555
Fixes `NewExceptionWithoutArguments` inspection violations.

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-25 13:49:22 +03:00