[java] ControlStatementBraces is missing checkIfStmt property #1004
Labels
an:enhancement
An improvement on existing features / rules
good first issue
A great starting point for new contributors
Milestone
Affects PMD Version:
6.2.0
Rule:
category/java/codestyle.xml/ControlStatementBraces
Description:
ControlStatementBraces
is supposed to replaceIfStmtMustUseBraces
andIfElseStmtMustUseBraces
but it only has acheckIfElseStmt
property, not acheckIfStmt
property.We currently exclude
IfStmtsMustUseBraces
in our configurations, but notIfElseStmtMustUseBraces
. The rationale for this is to allow logging guards like the one in the example code below.The only way to allow those with the
ControlStatementBraces
rule is by settingcheckIfElseStmt
tofalse
. This disables more checks than with the previous rules.Code Sample demonstrating the issue:
Running PMD through: Gradle
The text was updated successfully, but these errors were encountered: