/** * Pass #29: deep-inheritance (CWE-1086, category: architecture) * * Detects class inheritance chains deeper than the configured threshold * (default: 5). Deep inheritance hierarchies increase coupling, make code * harder to understand, and indicate a design smell (violation of composition * over inheritance). * * Detection strategy: * 1. Build a parentMap: className → parentName from `ir.types[*].extends`. * 2. For each class with a known `start_line`, walk up the parentMap * counting depth. Stop at depth 20 to defend against cycles. * 3. If depth > THRESHOLD, emit a finding at the class `start_line`. * * Languages: Java, JavaScript/TypeScript, Python. Rust/Bash do not have * class inheritance — skipped. */ import type { AnalysisPass, PassContext } from '../../graph/analysis-pass.js'; export interface DeepInheritanceResult { deepClasses: Array<{ className: string; depth: number; line: number; }>; } export declare class DeepInheritancePass implements AnalysisPass { readonly name = "deep-inheritance"; readonly category: "architecture"; run(ctx: PassContext): DeepInheritanceResult; } //# sourceMappingURL=deep-inheritance-pass.d.ts.map