rspec/rules/S1454/flex/rule.adoc

37 lines
577 B
Plaintext
Raw Normal View History

== Why is this an issue?
2021-04-28 16:49:39 +02:00
Using several "--" or "{plus}{plus}" unary operators in the same arithmetic expression can quickly make the expression unreadable.
=== Noncompliant code example
2021-04-28 16:49:39 +02:00
2022-02-04 17:28:24 +01:00
[source,flex]
2021-04-28 16:49:39 +02:00
----
var j:int = foo++ - --bar;
----
=== Compliant solution
2021-04-28 16:49:39 +02:00
2022-02-04 17:28:24 +01:00
[source,flex]
2021-04-28 16:49:39 +02:00
----
bar--;
var j:int = foo++ - bar;
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
'''
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]