Skip to main content

Module inheritance

Module inheritance 

Source
Expand description

Inheritance command - Extract and visualize class hierarchies

Analyzes class inheritance relationships across a codebase:

  • Python: class inheritance, ABC, Protocol, metaclasses
  • TypeScript: class extends, implements, interfaces
  • Go: struct embedding (modeled as inheritance)
  • Rust: trait implementations

§Output Formats

  • JSON: Full structured output (default)
  • DOT: Graphviz format for visualization
  • text: Human-readable tree format

§Mitigations Addressed

  • A2: Diamond detection uses BFS + set intersection (O(|ancestors|))
  • A12: Python metaclass extraction
  • A14: Go struct embedding as Embeds relationships
  • A16: Rust trait impl blocks
  • A17: –depth requires –class validation
  • A19: DOT output properly escapes special characters

Structs§

InheritanceArgs
Extract class inheritance hierarchies

Enums§

InheritanceFormat
Inheritance-specific output formats (includes DOT)