rspec/rules/S1940/rule.adoc

22 lines
284 B
Plaintext
Raw Normal View History

== Why is this an issue?
2020-06-30 12:47:33 +02:00
include::description.adoc[]
=== Noncompliant code example
[source,text]
----
if ( !(a == 2)) { ...} // Noncompliant
boolean b = !(i < 10); // Noncompliant
----
=== Compliant solution
[source,text]
----
if (a != 2) { ...}
boolean b = (i >= 10);
----
2020-06-30 12:47:33 +02:00