Skip to main content

Unused parameters should be removed

ZPA rule for PL/SQL and Oracle SQL · UnusedParameter

Unused parameters are misleading. Whatever the value passed to such parameters is, the behavior will be the same.

Examples​

Noncompliant Code Example
PROCEDURE do_something(a IN NUMBER, b IN NUMBER) IS -- "b" is unused
BEGIN
compute(a);
END;
Compliant Solution
PROCEDURE do_something(a IN NUMBER) IS
BEGIN
compute(a);
END;