rspec/rules/S1454/flex/rule.adoc
Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
Inline adoc files when they are included exactly once.

Also fix language tags because this inlining gives us better information
on what language the code is written in.
2023-05-25 14:18:12 +02:00

48 lines
1.0 KiB
Plaintext

== Why is this an issue?
Using several "--" or "{plus}{plus}" unary operators in the same arithmetic expression can quickly make the expression unreadable.
=== Noncompliant code example
[source,flex]
----
var j:int = foo++ - --bar;
----
=== Compliant solution
[source,flex]
----
bar--;
var j:int = foo++ - bar;
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Split this expression into multiple expressions so that each one contains no more than a single "{plus}{plus}" or "--" unary operator
'''
== Comments And Links
(visible only on this page)
=== on 22 Nov 2013, 13:51:46 Freddy Mallet wrote:
Is implemented by \https://jira.codehaus.org/browse/SONARPLUGINS-3284 for Flex
=== on 10 Dec 2013, 11:53:06 Freddy Mallet wrote:
Is implemented by \http://jira.codehaus.org/browse/SONARJAVA-393 for Java
=== on 11 Dec 2013, 14:45:46 Freddy Mallet wrote:
I'm closing this spec as RSPEC-881 is definitely better.
endif::env-github,rspecator-view[]