Represents an architecture rule — a description and a check function that evaluates against the dependency graph and returns a list of violations.
Summary
Functions
Evaluates a reusable rule and raises an ExUnit assertion on violations.
Evaluates a rule against the given dependency graph.
Attaches a freeze baseline id to the rule.
Adds ignore filters to a reusable rule.
Creates a reusable architecture rule from a graph check function.
Types
Functions
Evaluates a reusable rule and raises an ExUnit assertion on violations.
Options:
:graph— pre-built graph:app— app to inspect when:graphis not present
@spec evaluate(t(), graph()) :: {:ok, []} | {:violations, [ArchTest.Violation.t()]}
Evaluates a rule against the given dependency graph.
Returns {:ok, []} when no violations are found, or
{:violations, [Violation.t()]} otherwise.
Attaches a freeze baseline id to the rule.
Adds ignore filters to a reusable rule.
Supported keys: :caller, :callee, and :module, each with a module glob
pattern or list of patterns.
@spec new(String.t(), (graph() -> [ArchTest.Violation.t()])) :: t()
Creates a reusable architecture rule from a graph check function.