Parent issue: #19798
Description:
Rules Covered:
From §3.13 - Redundant Paranthesis:
Redundant grouping parentheses (i.e. parentheses that does not affect evaluation) may be used if they improve readability. - Not Coverable
Redundant grouping parentheses should typically be left out in shorter expressions involving common operators but included in longer expressions or expressions involving operators whose precedence and associativity is unclear without parentheses. Ternary expressions with non-trivial conditions belong to the latter .- Not Coverable
The entire expression following a return keyword must not be surrounded by parentheses. - MatchXpath
Checks to add to openjdk_checks.xml
TreeWalker_level:
<module name="MatchXpath">
<property name="query" value="//LITERAL_RETURN/EXPR[./LPAREN and ./RPAREN and not(./LPAREN/preceding-sibling::*)]"/>
<message key="matchxpath.match" value="The entire expression following a return keyword must not be surrounded by parentheses."/>
</module>
Progress Tracker:
| Check |
Rule |
PR |
MatchXPath |
The entire expression following a return keyword must not be surrounded by parentheses. |
|
Parent issue: #19798
Description:
Rules Covered:
From §3.13 - Redundant Paranthesis:
Redundant grouping parentheses (i.e. parentheses that does not affect evaluation) may be used if they improve readability. -
Not CoverableRedundant grouping parentheses should typically be left out in shorter expressions involving common operators but included in longer expressions or expressions involving operators whose precedence and associativity is unclear without parentheses. Ternary expressions with non-trivial conditions belong to the latter .-
Not CoverableThe entire expression following a return keyword must not be surrounded by parentheses. -
MatchXpathChecks to add to openjdk_checks.xml
TreeWalker_level:
Progress Tracker:
MatchXPath