Why is this an issue?

Package body and package declaration should be defined in separate files. The objective is to keep interface and implementation independent. It would be for instance possible to define several implementations of the same package declaration.

How to fix it

Code examples

Noncompliant code example

File 1:
package my_package is
end;

package body my_package is
end;

Compliant solution

File 1:
package my_package is
end;

File 2:
package body my_package is
end;

Resources

Related rules