KT-12019 Highlighting of redundant 'if' statements (#871)

This commit is contained in:
Vladislav Golub
2016-05-23 21:02:38 +03:00
committed by Dmitry Jemerov
parent cf56ac0305
commit bb32c2d350
12 changed files with 180 additions and 2 deletions
@@ -0,0 +1,21 @@
<html>
<body>
Reports <b>if</b> statements which can be simplified to single <b>return</b> statements.
<p>
For example:
<code><pre>
<b>if</b> (foo()) {
<b>return true</b>
} <b>else</b> {
<b>return false</b>
}
</pre></code>
can be simplified to
<code><pre>
<b>return</b> foo()
</pre></code>
<!-- tooltip end -->
<p>
</body>
</html>