rspec/rules/S2761/plsql/rule.adoc
Arseniy Zaostrovnykh 7ca29f686f Force linebreaks
2021-02-02 15:02:10 +01:00

21 lines
581 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;
----