See: Description
| Class | Description |
|---|---|
| AvoidConstantAsFirstOperandInConditionCheck |
If comparing values, C(C++) developers prefer to put the constant first in the equality check,
to prevent situations of assignment rather than equality checking.
|
| AvoidDefaultSerializableInInnerClassesCheck |
This check prevents the default implementation Serializable interface in
inner classes (Serializable interface are default if methods readObject() or
writeObject() are not override in class).
|
| AvoidHidingCauseExceptionCheck |
This check prevents new exception throwing inside try/catch
blocks without providing current exception cause.
|
| AvoidModifiersForTypesCheck |
Disallow some set of modifiers for Java types specified by regexp.
|
| AvoidNotShortCircuitOperatorsForBooleanCheck |
This check limits using of not short-circuit operators
("|", "&", "|=", "&=") in boolean expressions.
|
| ConfusingConditionCheck |
This check prevents negation within an "if" expression if "else" is present.
|
| CustomDeclarationOrderCheck |
Checks that the parts of a class(main, nested, member inner) declaration
appear in the rules order set by user using regular expressions.
|
| DiamondOperatorForVariableDefinitionCheck |
This Check highlights variable definition statements where
diamond operator could be used.
Rationale: using diamond operator (introduced in Java 1.7) leads to shorter code and better code readability. |
| EitherLogOrThrowCheck |
Either log the exception, or throw it, but never do both.
|
| EmptyPublicCtorInClassCheck |
This Check looks for useless empty public constructors.
|
| FinalizeImplementationCheck |
This Check detects 3 most common cases of incorrect finalize() method implementation:
|
| ForbidCCommentsInMethodsCheck |
This check forbid to use C style comments into the method body.
|
| ForbidCertainImportsCheck |
Forbids certain imports usage in certain packages.
|
| ForbidInstantiationCheck |
Forbids instantiation of certain object types by their full classname.
|
| ForbidReturnInFinallyBlockCheck |
The finally block is always executed unless there is abnormal program termination, either
resulting from a JVM crash or from a call to System.exit(0).
|
| ForbidThrowAnonymousExceptionsCheck |
This Check warns on throwing anonymous exception.
Examples: |
| IllegalCatchExtendedCheck |
Catching java.lang.Exception, java.lang.Error or java.lang.RuntimeException
is almost never acceptable.
|
| LogicConditionNeedOptimizationCheck |
This check prevents the placement of local variables and fields after calling
methods in '&&' and '||' conditions.
|
| MapIterationInForEachLoopCheck |
This check can help you to write the whole for-each map iteration more
correctly:
|
| MoveVariableInsideIfCheck |
Checks if a variable is only used inside if statements and asks for it's
declaration to be moved there too.
|
| MultipleStringLiteralsExtendedCheck |
Checks for multiple occurrences of the same string literal within a single file.
|
| MultipleVariableDeclarationsExtendedCheck |
Checks that each variable declaration is in its own statement and on its own line.
|
| NameConventionForJunit4TestClassesCheck |
This check verifies the name of JUnit4 test class for compliance with user
defined naming convention(by default Check expects test classes names
matching
".+Test\\d*|.+Tests\\d*|Test.+|Tests.+|.+IT|.+ITs|.+TestCase\\d*|.+TestCases\\d*"
regex).
|
| NoNullForCollectionReturnCheck |
This check report you, when method, that must return array or collection,
return null value instead of empty collection or empty array.
|
| NumericLiteralNeedsUnderscoreCheck |
This check verifies that large numeric literals are spaced by underscores.
|
| OverridableMethodInConstructorCheck |
This check prevents any calls to overridable methods that are take place in:
Any constructor body (verification is always done by default and not
configurable).
|
| RedundantReturnCheck |
Highlights usage of redundant returns inside constructors and methods with void
result.
|
| ReturnBooleanFromTernaryCheck |
It is a bad practice to return boolean values from ternary operations.
|
| ReturnCountExtendedCheck |
Checks that method/ctor "return" literal count is not greater than the given value
("maxReturnCount" property).
Rationale: One return per method is a good practice as its ease understanding of method logic. |
| ReturnNullInsteadOfBooleanCheck |
It is a bad practice to use
Boolean type for ternary logic. |
| SimpleAccessorNameNotationCheck |
This check verify incorrect name of setter and getter methods if it used
field with other name.
|
| SingleBreakOrContinueCheck |
This check restricts the number of break and continue statements inside cycle body (only one is
allowed).
|
| TernaryPerExpressionCountCheck |
Restricts the number of ternary operators in expression to a specific limit.
Rationale: This Check helps to improve code readability by pointing developer on expressions which contain more than user-defined count of ternary operators. It points to complicated ternary expressions. |
| UnnecessaryParenthesesExtendedCheck |
Checks if unnecessary parentheses are used in a statement or expression.
|
| UselessSingleCatchCheck |
Checks for the presence of useless single catch blocks.
|
| UselessSuperCtorCallCheck |
Checks for useless "super()" calls in ctors.
|
| WhitespaceBeforeArrayInitializerCheck |
This checks enforces whitespace before array initializer.
|
| Enum | Description |
|---|---|
| NumericLiteralNeedsUnderscoreCheck.NumericType |
Type of numeric literal.
|
Copyright © 2017. All rights reserved.