Coupled Packages is one of the source-code metrics Understand computes across 17+ languages — browse them in the GUI, export and track them, or script them with the Python API.
Coupled Packages
API ID: CountPackageCoupledLanguages: Ada
Targets: Packages
Number of other packages coupled to.
Package A is coupled to package B if package A depends on (Ada's with) something declared in package B. Only the depending package counts the coupling — the package being depended on doesn't count as coupled to its dependents.
For example:
with Essential_Demo;
package Essential_Helper is
procedure Use_Essential (X : in out Integer);
end Essential_Helper;
Essential_Helper depends on Essential_Demo (calling Essential_Demo.Simple_Proc), giving Essential_Helper's CountPackageCoupled = 1. Essential_Demo itself has no dependencies of its own, so its CountPackageCoupled = 0, even though another package depends on it.
This is the package-level counterpart to Coupled Classes (Chidamber & Kemerer's CBO), which measures the same kind of coupling between classes.
Targets By Language:- Ada: Package
- This metric can be disabled from "Project Configuration/Metrics/Object Orientated" with the "Show coupling and cohesion metrics" option.