Cursor signatures in package specs reported as issue (plsql:VariableInPackageSpecificationCheck)

Language:PL/SQL
Rule: Global public variables should not be defined (plsql:VariableInPackageSpecificationCheck)
SonarQube: Enterprise Edition v2025.1.4

The rule flags cursor declarations in a package specification as an issue, treating them as package-level variables.

In our case, only the cursor signature is declared in the package specification, without any implementation or state. This is done to:
• Reuse the cursor definition across multiple packages
• Use it in cursor loops without redefining it in each package

This is equivalent to declaring function or procedure signatures in the package specification. No mutable state is exposed and nothing can be modified “from outside”.

Expected behavior

The rule makes sense for package-level variables or collections, but cursor signatures should be treated like packaged functions/procedures and not be reported.