Skip to main content

Module arch_violations

Module arch_violations 

Expand description

architecture-violations analysis.

Joins the imports table to the LayerRules config; reports every import edge that crosses a forbidden layer boundary.

§Workflow

  1. Discover .codelore-arch-rules.toml at the repo root (or explicit --arch-rules-file).
  2. Walk every (src_path, target_path) row in the imports table where both endpoints classify into a declared layer.
  3. Call LayerRules::validate for each; collect violations.

§Empty rule set

When no .codelore-arch-rules.toml exists in the repo, the analysis returns an empty Vec — users opt INTO architectural validation rather than being forced to declare layers upfront.

Structs§

ArchViolationRow

Functions§

run_arch_violations
Run the architecture-violations analysis. Returns a (possibly empty) Vec of violations sorted by (src_path, target_path).