Violation

data class Violation(val ruleId: String, val severity: Severity, val message: String, val source: String, val moduleHint: String? = null, val plainLanguageExplanation: String? = null)(source)

A single architecture rule violation produced by the rule engine.

Parameters

ruleId

The stable rule identifier, e.g. "layer-dependency".

severity

Whether this violation fails the build or is advisory.

message

The primary violation message. Must name the offending modules and include a concrete fix suggestion.

source

Human-readable description of the edge or module that caused the violation, e.g. ":feature:login:data → :feature:login:ui".

moduleHint

The primary module path to navigate to in the HTML graph view. Defaults to null; the report falls back to parsing source when absent. Rules should set this to the from module of the offending dependency.

plainLanguageExplanation

Optional plain-language explanation shown in the violations panel below the technical message. Intended for developers unfamiliar with the rule. Provided by the rule implementation.

Constructors

Link copied to clipboard
constructor(ruleId: String, severity: Severity, message: String, source: String, moduleHint: String? = null, plainLanguageExplanation: String? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard