ArchTest.PlantUML (ArchTest v0.3.1)

Copy Markdown View Source

Minimal PlantUML component conformance checks.

The checker reads component edges such as [Orders] --> [Accounts] and verifies that actual slice-level dependencies do not exceed the diagram. Line comments (' and //) and PlantUML block comments (/' ... '/) are ignored.

Summary

Functions

Enforces that actual slice dependencies are present in a PlantUML diagram.

Parses allowed component edges from a PlantUML file.

Functions

enforce(path, opts)

@spec enforce(
  String.t(),
  keyword()
) :: :ok

Enforces that actual slice dependencies are present in a PlantUML diagram.

Options:

  • :slices — required keyword list, e.g. [orders: "MyApp.Orders"]
  • :graph — pre-built graph
  • :app — OTP app to inspect when :graph is not provided

parse_edges(path)

@spec parse_edges(String.t()) :: MapSet.t({atom(), atom()})

Parses allowed component edges from a PlantUML file.