Files
openide/java/java-impl/resources/inspectionDescriptions/MultipleVariablesInDeclaration.html
Leonid Shalupov 40795fe787 IJI-2422: community/java: move resources under resources root
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
2025-02-05 04:43:28 +00:00

31 lines
984 B
HTML

<html>
<body>
Reports multiple variables that are declared in a single declaration and suggest
creating a separate declaration for each variable.
<p>Some coding standards prohibit such declarations.</p>
<p>Example:</p>
<pre><code>
int x = 1, y = 2;
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
int x = 1;
int y = 2;
</code></pre>
<!-- tooltip end -->
<p>Configure the inspection:</p>
<ul>
<li>Use the <b>Ignore 'for' loop declarations</b> option to ignore multiple variables declared in the initialization of a 'for' loop statement, for example:
<pre><code>
<b>for</b> (int i = 0, max = list.size(); i &gt; max; i++) {}
</code></pre>
</li>
<li>Use the <b>Only warn on different array dimensions in a single declaration</b> option to only warn when variables with different array dimensions are declared in a single declaration, for example:
<pre><code>
String s = "", array[];
</code></pre>
</li>
</ul>
<p><small>New in 2019.2</small></p>
</body>
</html>