16 lines
374 B
Plaintext
Raw Normal View History

2020-06-30 12:47:33 +02:00
Return of boolean literal statements wrapped into <code>if-then-else</code> ones should be simplified.
Note that if the result of the expression is not a boolean but for instance an integer, then double negation should be used for proper conversion.
include::../noncompliant.adoc[]
== Compliant Solution
----
return expression;
----
or
----
return !!expression;
----