LemonCore. Quality. ArchitectureCheck
(lemon_core v0.1.0)
View Source
Enforces architecture boundaries for umbrella dependencies and module references.
The check ensures:
- each app's direct
in_umbrella: truedependencies remain a subset of policy - each app's source files do not reference forbidden umbrella namespaces
Summary
Functions
Returns the allowed direct dependencies map for all umbrella apps.
Returns the current enforced direct dependency policy.
Runs all architecture boundary checks for the umbrella project.
Returns the target direct dependency policy used for non-failing drift reports.
Types
@type report() :: %{ root: String.t(), apps_checked: non_neg_integer(), issue_count: non_neg_integer(), issues: [issue()], actual_dependencies: %{optional(atom()) => [atom()]}, target_drift_count: non_neg_integer(), target_dependency_drifts: [target_drift()] }
Functions
Returns the allowed direct dependencies map for all umbrella apps.
This map defines which umbrella dependencies each app is allowed to have. Used for validating the architecture boundary constraints.
Returns the current enforced direct dependency policy.
Runs all architecture boundary checks for the umbrella project.
Checks include:
- Unknown app detection - apps in apps/ without policy configuration
- Missing app detection - expected apps that don't exist in apps/
- Dependency violations - umbrella deps that exceed allowed boundaries
- Namespace violations - module references to apps not in deps
Returns {:ok, report} if no issues found, {:error, report} otherwise.
Options
:root- root directory of the umbrella project (defaults to current working directory)
Returns the target direct dependency policy used for non-failing drift reports.