mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
30 lines
1.2 KiB
HTML
30 lines
1.2 KiB
HTML
<html>
|
|
<body>
|
|
Reports any instance of unnecessary parentheses.
|
|
<p>Parentheses are considered unnecessary if the evaluation order of an expression remains
|
|
unchanged after you remove the parentheses.</p>
|
|
<p>Example:</p>
|
|
<pre><code>
|
|
int n = 3 + (9 * 8);
|
|
</code></pre>
|
|
<p>After quick-fix is applied:</p>
|
|
<pre><code>
|
|
int n = 3 + 9 * 8;
|
|
</code></pre>
|
|
<!-- tooltip end -->
|
|
<p>Configure the inspection:</p>
|
|
<ul>
|
|
<li>Use the <b>Ignore clarifying parentheses</b> option to ignore parentheses that help clarify a binary
|
|
expression. Parentheses are clarifying if the parenthesized expression is an
|
|
<code>instanceof</code> expression that is a part of a larger expression or has a different operator than the parent expression.</li>
|
|
<li>Use the <b>Ignore parentheses around the condition of conditional expressions</b> option to ignore any
|
|
parentheses around the condition of conditional expressions. Some coding standards specify that all such
|
|
conditions must be surrounded by parentheses.</li>
|
|
<li>
|
|
Use the <b>Ignore parentheses around single no formal type lambda parameter</b> option to ignore parentheses
|
|
around a single lambda parameter within a lambda expression.
|
|
</li>
|
|
</ul>
|
|
|
|
</body>
|
|
</html> |