StabilityViolation
data class StabilityViolation(val from: String, val to: String, val fromInstability: Double, val toInstability: Double)(source)
A dependency that points the wrong way along the stability gradient.
Robert Martin's Stable Dependencies Principle: depend in the direction of stability. When a stable module (many dependents, few dependencies) depends on an unstable one, every change to the volatile module ripples into something the rest of the project relies on. Inverting the dependency - putting an interface in the stable module and implementing it in the unstable one - removes the ripple.
Parameters
from
The more stable module, the one doing the depending.
to
The less stable module it depends on.
fromInstability
Instability of from.
toInstability
Instability of to, always greater than fromInstability.