KontureFileScope

Represents a scope containing a set of Kotlin files for checking file-level rules.

Constructors

Link copied to clipboard
constructor(files: List<FileDeclaration>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The list of FileDeclaration structures included in this scope.

Functions

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

Asserts that all file declarations in the scope have names ending with any of the specified suffixes.

Link copied to clipboard

Asserts that all file declarations in the scope have names matching any of the specified glob patterns.

Link copied to clipboard

Asserts that all file declarations in the scope have names starting with any of the specified prefixes.

Link copied to clipboard
fun KontureFileScope.assertNoWildcardImports(additionalMessage: String? = null)
Link copied to clipboard
fun KontureFileScope.assertOnlyOneClassPerFile(additionalMessage: String? = null)
Link copied to clipboard
fun KontureFileScope.assertResideInAPackage(vararg packagePatterns: String)

Asserts that all file declarations in the scope reside in packages matching any of the specified patterns. Matches using standard Kotlin package wildcard matching (e.g. "..domain..").

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