Skip to content

ALL-FILE0004 · directory_pathway

Report a directory that only leads to one child directory.

This is a deterministic rule for all languages. Read its implementation.

Report a directory with exactly one direct child directory and no other direct unignored file. A package initializer does not count as content because it states the package surface rather than giving the directory an independent responsibility.

Each finding names the directory and records its direct file and child directory counts. The Boolean value is true only for a pure one-step pathway.

A directory with a source file, configuration, guide, fixture, or second child directory has its own readable role and remains unreported. A source root and its top-level import package are structural boundaries rather than navigation steps. A language bucket under rules may lead into one deterministic, contextual, or external execution lane because the lane is part of rule selection. Git-ignored entries never reach either count.

Bad

A `services` directory containing only `services/payments` returns `true`.
Good

services containing service.py beside payments returns false.

  • Cites “A Philosophy of Software Design”, chapters 4 and 7