rspec/rules/S2761/plsql/rule.adoc

28 lines
738 B
Plaintext
Raw Normal View History

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.
2020-06-30 12:48:07 +02:00
2021-02-02 15:02:10 +01:00
2020-06-30 12:48:07 +02:00
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::env-github,rspecator-view[]
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]