rspec/rules/S2224/rule.adoc

22 lines
263 B
Plaintext
Raw Normal View History

== Why is this an issue?
Chained assignments are confusing and hard to read, and should be avoided.
=== Noncompliant code example
2022-02-04 17:28:24 +01:00
[source,text]
----
x = y = 0; // Noncompliant
----
=== Compliant solution
2022-02-04 17:28:24 +01:00
[source,text]
----
x = 0;
y = 0; // or y = x;
----