rspec/rules/S1125/compliant.adoc

17 lines
416 B
Plaintext
Raw Normal View History

== Compliant Solution
2022-02-04 17:28:24 +01:00
[source,text]
----
if (booleanMethod()) { /* ... */ }
if (!booleanMethod()) { /* ... */ }
if (booleanMethod()) { /* ... */ }
doSomething(true);
doSomething(booleanMethod());
booleanVariable = booleanMethod();
booleanVariable = booleanMethod() || exp;
booleanVariable = !booleanMethod() && exp;
booleanVariable = !booleanMethod() || exp;
booleanVariable = booleanMethod() && exp;
----