KontureFunctionScope

Represents a scope containing a set of function declaration contexts for checking function-level rules in a Konsist-inspired fluent DSL.

A scope acts as the starting point or container for filtering, querying, and running assertions against Kotlin function declarations (both member and top-level functions) in your codebase.

Constructors

Link copied to clipboard
constructor(functions: List<FunctionDeclarationContext>)

Types

Link copied to clipboard
object Companion

Factory methods for constructing function scopes.

Properties

Link copied to clipboard

Filter or assertion criteria for functions.

Functions

Link copied to clipboard
fun KontureFunctionScope.assertHasKDoc(additionalMessage: String? = null)

Asserts that all functions in this scope have KDoc documentation.

Link copied to clipboard
fun KontureFunctionScope.assertTrue(additionalMessage: String? = null, predicate: (FunctionDeclarationContext) -> Boolean)

Asserts that all functions in this scope satisfy the given predicate.

Link copied to clipboard

Filters functions in this scope to include only extension functions.

Link copied to clipboard

Filters functions in this scope ending with suffix.

Link copied to clipboard

Filters functions in this scope starting with prefix.

Link copied to clipboard

Filters this function selector to include functions residing in packages matching the specified pattern.

Link copied to clipboard

Filters functions in this scope to include only member/class functions.

Link copied to clipboard

Subtracts the functions present in other from this KontureFunctionScope.

Link copied to clipboard

Combines two KontureFunctionScope scopes into a single unified scope.

Link copied to clipboard

Filters functions in this scope residing in packages matching packagePattern.

Link copied to clipboard

Returns a fluent assertion scope for sequential assertions on this FunctionSelector.

Link copied to clipboard

Filters functions in this scope to include only top-level functions.

Link copied to clipboard

Filters functions in this scope to include only those with annotation annotationName.

Link copied to clipboard

Filters functions in this scope to include only those residing in module modulePath.

Link copied to clipboard

Filters this function selector to include functions whose names match the specified pattern.

Link copied to clipboard

Filters functions in this scope matching glob pattern pattern.

Link copied to clipboard

Filters functions in this scope to include only those with parameter of type paramType.

Link copied to clipboard

Filters functions in this scope to include only those with return type returnType.

Link copied to clipboard

Filters functions in this scope to include only those with visibility visibility.