rspec/rules/S2761/plsql/rule.adoc
2021-06-02 20:44:38 +02:00

28 lines
716 B
Plaintext

Calling the ``+``, ``++-++`` or ``++NOT++`` prefix operator twice does nothing: the second invocation undoes the first. Such mistakes are typically caused by accidentally double-tapping the key in question without noticing.
Either this is a bug, if the operator was actually meant to be called once, or misleading if done on purpose.
== Noncompliant Code Example
----
IF NOT ( NOT foo = 5 ) THEN -- Noncompliant
value := ++1; -- Noncompliant
END IF;
----
== Compliant Solution
----
IF foo = 5 THEN -- Compliant
value := +1; -- Compliant
END IF;
----
ifdef::rspecator-view[]
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::rspecator-view[]