Invalid utPLSQL annotation arguments
ZPA rule for PL/SQL and Oracle SQL · InvalidUtPlSqlAnnotationArgument
utPLSQL checks the values of some annotations while it builds the suite, and ignores an invalid one silently: a suite path, a rollback mode, a tag or an expected exception is then not applied, though the package compiles.
This rule reports a missing or invalid argument of %suitepath, %rollback, %tags and %throws. A suite path is a dot-separated list of names without spaces; %rollback takes auto or manual; a tag cannot start with a dash, contain spaces or the characters (, ), &, |, !, nor be one of the reserved words none and any; %throws needs an exception.
Examples
create package crate_test as
--%suite
--%suitepath(warehouse crates) -- Noncompliant
--%rollback(transactional) -- Noncompliant
--%test(Creates a crate)
--%tags(-fast) -- Noncompliant
procedure creates_crate;
end;
create package crate_test as
--%suite
--%suitepath(warehouse.crates)
--%rollback(manual)
--%test(Creates a crate)
--%tags(fast)
procedure creates_crate;
end;