RuleBuilder

class RuleBuilder(val id: String, projectGraph: ProjectGraph = Konture.projectGraph)

DSL builder for configuring named architecture rules with metadata and sub-rule blocks.

Constructors

Link copied to clipboard
constructor(id: String, projectGraph: ProjectGraph = Konture.projectGraph)

Properties

Link copied to clipboard

Human-readable explanation or rationale for this rule.

Link copied to clipboard
val id: String

Unique identifier for the rule.

Link copied to clipboard
var severity: Severity

Severity level associated with rule violations (defaults to Severity.ERROR).

Functions

Link copied to clipboard

Constructs the RuleMetadata representation of this rule configuration.

Link copied to clipboard
fun classes(block: ClassesRuleBuilder.() -> Unit)

Declares a class-level rule suite inside this named rule scope.

fun classes(sourceSets: SourceSetSelector, block: ClassesRuleBuilder.() -> Unit)

Declares a class-level rule suite scoped to specific source sets.

Link copied to clipboard
fun files(block: FilesRuleBuilder.() -> Unit)

Declares a file-level rule suite inside this named rule scope.

fun files(sourceSets: SourceSetSelector, block: FilesRuleBuilder.() -> Unit)

Declares a file-level rule suite scoped to specific source sets.

Link copied to clipboard

Declares a function-level rule suite inside this named rule scope.

fun functions(sourceSets: SourceSetSelector, block: FunctionsRuleBuilder.() -> Unit)

Declares a function-level rule suite scoped to specific source sets.

Link copied to clipboard

Declares a nested type-safe layered architecture specification inside this named rule scope.

Link copied to clipboard

Declares a layered-architecture rule suite inside this named rule scope.

Link copied to clipboard
fun modules(block: ModulesRuleBuilder.() -> Unit)

Declares a module-level rule suite inside this named rule scope.

fun modules(sourceSets: SourceSetSelector, block: ModulesRuleBuilder.() -> Unit)

Declares a module-level rule suite scoped to specific source sets.

Link copied to clipboard

Declares a property-level rule suite inside this named rule scope.

Declares a property-level rule suite scoped to specific source sets.

Link copied to clipboard
fun slices(block: SlicesRuleBuilder.() -> Unit)

Declares a slice rule suite inside this named rule scope.

fun slices(sourceSets: SourceSetSelector, block: SlicesRuleBuilder.() -> Unit)

Declares a slice rule suite scoped to specific source sets.

Link copied to clipboard

Configures programmatic violation suppressions for this rule with mandatory audit rationale.

Link copied to clipboard
fun tag(vararg tagNames: String)

Tag this rule with one or more arbitrary string labels.