Pattern: Redundant if
Issue: -
If expressions with boolean constants in both branches can be eliminated without affecting readability. Prefer simply cond
to if (cond) true else false
and !cond
to if (cond) false else true
.
<check enabled="true" class="org.scalastyle.scalariform.RedundantIfChecker" level="warning"/>