mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
24 lines
751 B
HTML
24 lines
751 B
HTML
<html>
|
|
<body>
|
|
Reports <code>for</code> loops that contain neither initialization nor update components, and suggests converting them to <code>while</code>
|
|
loops. This makes the code easier to read.
|
|
<p>Example:</p>
|
|
<pre><code>
|
|
for(; exitCondition(); ) {
|
|
process();
|
|
}
|
|
</code></pre>
|
|
<p>After the quick-fix is applied:</p>
|
|
<pre><code>
|
|
while(exitCondition()) {
|
|
process();
|
|
}
|
|
</code></pre>
|
|
<p>The quick-fix is also available for other <code>for</code> loops, so you can replace any <code>for</code> loop with a
|
|
<code>while</code> loop.</p>
|
|
<!-- tooltip end -->
|
|
<p>Use the <b>Ignore 'infinite' for loops without conditions</b> option if you want to ignore <code>for</code>
|
|
loops with trivial or non-existent conditions.
|
|
<p>
|
|
</body>
|
|
</html> |