Skip to content

UNI010: Deep inheritance hierarchy

What and why

Type DIT >= 5.

Deep inheritance hierarchies obscure behavior and encourage fragile overrides.

Threshold: DIT >= 5.

How to fix: prefer composition; flatten or replace deep chains.

Default thresholds

Severity Condition
Warning DIT >= 5

Fix guidance

Prefer composition over deep hierarchies (threshold: DIT >= 5).

Tags

maintainability

Suppression

Place // unilyze-disable UNI010 -- reason in the leading trivia of the reported type or method declaration. Metric findings are matched by type or method name, so suppressing one overload also suppresses same-name overloads. For partial types, place the directive on the declaration indexed by unilyze. For project-wide suppression, use "rules": { "UNI010": "off" }; use a baseline to freeze existing findings while reporting new ones.