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
- Discover
.codelore-arch-rules.tomlat the repo root (or explicit--arch-rules-file). - Walk every
(src_path, target_path)row in theimportstable where both endpoints classify into a declared layer. - Call
LayerRules::validatefor 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§
Functions§
- run_
arch_ violations - Run the architecture-violations analysis. Returns a (possibly
empty) Vec of violations sorted by
(src_path, target_path).