ALL-CLAS0005 · ancestor_count
Measure how many types sit above one class in its inheritance chain.
This is a deterministic rule for all languages. Read its implementation.
Definition
Section titled “Definition”Count every distinct ancestor above the class this link derives, resolved or not, and report it once per class at the link to its first declared base. Each ancestor is a place a method a reader is looking at might actually live, so the count is how far a reader may have to walk to find one. A diamond names its shared ancestor once, because a reader visits it once.
An inheritance link is the only fact that can answer this, since the base of a class usually lives in another file and only a resolved chain across the whole repository knows what sits above it. Reporting at the first declared base is what keeps one class one finding when it inherits from several.
Depth is a measurement rather than a defect, and a project policy owns the ceiling. A framework that asks a project to derive from three of its own layers before adding one is a different situation from a hierarchy a project grew itself, and only the project can say which it has.
Continue with evidence and references, or open the examples.