com.puppycrawl.tools.checkstyle.checks.coding
public class SimplifyBooleanExpressionCheck extends Check
Checks for overly complicated boolean expressions. Currently finds code like
if (b == true), b || true, !false,
etc.
Rationale: Complex boolean logic makes code hard to understand and maintain.
An example of how to configure the check is:
<module name="SimplifyBooleanExpression"/>
| Method Summary | |
|---|---|
| int[] | getAcceptableTokens()
Prevent user from changing tokens in the configuration. |
| int[] | getDefaultTokens() |
| int[] | getRequiredTokens() |
| void | visitToken(DetailAST aAST) |
Returns: an empty array.
See Also: Check