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.
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.
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.
Filters files in this rule using a concise lambda predicate evaluated on each FileDeclarationContext.
Logical XOR operator for chaining assertion rules.