FunctionsRuleBuilder
A builder for compiling and verifying architectural rules on Kotlin function declarations.
Accumulates filtering conditions (that()) and assertions (should()), which are verified against all functions in the project (both member/class functions and top-level functions).
Constructors
Functions
Configures this builder to allow empty selections (i.e. if no functions match the that() filter, the rule will pass instead of throwing an AssertionError).
Logical AND operator for chaining filter conditions.
Logical AND operator for chaining assertion rules.
Executes the compiled function rules against the provided project graph. Throws an AssertionError if any rule violations are detected.
Negates the next filter condition in the chain.
Negates the next assertion rule in the chain.
Logical OR operator for chaining filter conditions.
Logical OR operator for chaining assertion rules.
Debugging helper that prints information about all discovered functions in the project graph.
Debugging helper that prints information about all functions matched by the that() filter.
Starts adding assertion rules that the selected functions must satisfy.
Asserts rules on filtered functions using a lambda block that provides a FunctionDeclarationShouldContext receiver. Supports both imperative assertions and Boolean predicate matches.
Configures programmatic violation suppressions for this function rule suite with mandatory audit rationale.
Starts adding filtering conditions to select which functions to verify.
Filters functions in this rule using a concise lambda predicate evaluated on each FunctionDeclarationContext.
Logical XOR operator for chaining filter conditions.
Logical XOR operator for chaining assertion rules.