Skip to content

[FEATURE] Dead-module rule #73

Description

@LukasNiessen

In short

An 'orphan' is a file nothing imports and that imports nothing — usually dead code. This flags them across the whole project so you can delete them.

Problem

Orphan modules (no incoming or outgoing edges) are usually dead code; flagging them project-wide is a cheap, high-signal check. ArchUnitTS computes orphans only inside slice coherence checks today.

Proposal

Promote orphan detection (currently slice-internal) to a top-level rule paralleling the existing haveNoCycles(), e.g. projectFiles("src").should().haveNoOrphans({ ignore: [...] }), for whole-project dead-code detection.

Acceptance criteria

  • A file with no imports and no importers is reported as an orphan with a clickable path.
  • Entry points / configured globs can be excluded.
  • Empty-test protection applies.

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions