rspec/rules/S1994/rule.adoc

34 lines
350 B
Plaintext
Raw Permalink Normal View History

== Why is this an issue?
2020-06-30 12:47:33 +02:00
include::description.adoc[]
=== Noncompliant code example
[source,text]
----
for (i = 0; i < 10; j++) { // Noncompliant
// ...
i++;
}
----
=== Compliant solution
[source,text]
----
for (i = 0; i < 10; i++, j++) {
// ...
}
----
Or
[source,text]
----
for (i = 0; i < 10; i++) {
// ...
j++;
}
----
2020-06-30 12:47:33 +02:00