Package-level declarations

The rule engine. ArchRule is the rule contract; RuleEngine (with fromConfig) reconstructs the active rule set from the serialized DSL strings at execution time. Built-in rules — NoCyclicDependenciesRule, LayerDependencyRule, NoFeatureToFeatureDependencyRule, MaxTransitiveDependenciesRule — carry stable kebab-case ids that are a public contract in SARIF, JUnit XML, and suppression config. LayerSpecParser is the one parser for serialized layers { } entries, shared by the rules and the report.

Types

Link copied to clipboard
data class AppliedRule(val id: String, val description: String, val severity: Severity, val explanation: String, val ruleCount: Int, val violationCount: Int)

One row of the active rule set, summarising a single rule id as enforced against the project.

Link copied to clipboard
interface ArchRule

A single architecture rule evaluated against a ModuleDependencyGraph.

Link copied to clipboard
data class LayerSpec(val name: String, val modulePatterns: List<String>, val allowedLayers: List<String>, val hasRestriction: Boolean)

One architectural layer as declared in the consumer's layers { } block.

Link copied to clipboard

The single parser for the serialized layers { } declarations that cross the configuration-cache boundary as plain task @Input strings.

Link copied to clipboard
class RuleEngine(rules: List<ArchRule>, severityOverrides: Map<String, Severity> = emptyMap(), suppressions: Map<String, List<String>> = emptyMap())

Evaluates a set of ArchRules and applies severity overrides and suppressions.

Link copied to clipboard
data class RuleEngineResult(val violations: List<Violation>, val rulesEvaluated: Int, val appliedRules: List<AppliedRule> = emptyList())

The result of a RuleEngine.evaluate call.