QualityGatesConfig

abstract class QualityGatesConfig @Inject constructor(objects: ObjectFactory)(source)

Configures metric-delta quality gates inside the qualityGates { } block.

A gate fails aalekhCheck when a structural metric got worse than the committed baseline (aalekh-baseline.json, written by aalekhBaseline). This lets a team ratchet architecture quality in one direction only - no backsliding on a long refactor.

aalekh {
qualityGates {
// Fail the build if any of these regressed versus the baseline.
forbidRegression("cycles", "ccd", "god-modules")
severity.set(Severity.ERROR) // default ERROR; use WARNING to only report
}
}

Valid metric keys: cycles, god-modules, ccd, tangle, instability, critical-path. Gates only fire once a baseline with a metrics snapshot exists; regenerate it with aalekhBaseline.

Constructors

Link copied to clipboard
@Inject
constructor(objects: ObjectFactory)

Properties

Link copied to clipboard
val severity: Property<Severity>

Severity assigned to a regression. ERROR (the default) fails the build; WARNING only reports. INFO is treated as a non-failing note.

Functions

Link copied to clipboard

Enforces "no regression" on every structural metric.

Link copied to clipboard
fun forbidRegression(vararg metric: String)

Enforces "no regression" on the given metric keys versus the baseline. Unknown keys are rejected with the list of valid ones.