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