FilesShould

Assertion builder for checking rule expectations on Kotlin file declarations.

Properties

Link copied to clipboard
open override val builder: FilesRuleBuilder

Filter or assertion criteria for builder.

Functions

Link copied to clipboard
open fun allOf(vararg blocks: FilesShould.() -> Unit): FilesRuleBuilder

Filter or assertion criteria for all of.

Link copied to clipboard

Asserts that files are annotated with the annotation type parameter T.

Asserts that files are annotated with the specified annotation class.

Link copied to clipboard
open fun anyOf(vararg blocks: FilesShould.() -> Unit): FilesRuleBuilder

Asserts that selected files satisfy at least one of the specified assertion blocks.

Link copied to clipboard

Filter or assertion criteria for be documented with k doc.

Link copied to clipboard

Asserts that selected files do not form dependency cycles among themselves.

Link copied to clipboard
open fun containClass(vararg fqNames: String): FilesRuleBuilder
open infix fun containClass(fqName: String): FilesRuleBuilder
open infix fun containClass(fqNames: List<String>): FilesRuleBuilder
open infix fun containClass(kClass: KClass<*>): FilesRuleBuilder

Filter or assertion criteria for contain class.

Link copied to clipboard

Filter or assertion criteria for contain classes.

Link copied to clipboard

Asserts that files contain classes with annotation type parameter T.

open infix fun containClassesWithAnnotation(annotationName: String): FilesRuleBuilder

Filter or assertion criteria for contain classes with annotation.

Link copied to clipboard

Asserts that all classes in matching files have one of the specified visibilities.

Link copied to clipboard

Asserts that all top-level functions in matching files have one of the specified visibilities.

Link copied to clipboard

Asserts that all top-level properties in matching files have one of the specified visibilities.

Link copied to clipboard

Filter or assertion criteria for contain top level functions.

Link copied to clipboard

Filter or assertion criteria for contain top level properties.

Link copied to clipboard

Filter or assertion criteria for have all classes ending with.

Link copied to clipboard

Filter or assertion criteria for have all classes matching.

Link copied to clipboard

Filter or assertion criteria for have all classes starting with.

Link copied to clipboard

Filter or assertion criteria for have classes.

Link copied to clipboard
open fun haveImportOf(vararg imports: String): FilesRuleBuilder
open infix fun haveImportOf(importFqName: String): FilesRuleBuilder
open infix fun haveImportOf(imports: List<String>): FilesRuleBuilder
open infix fun haveImportOf(kClass: KClass<*>): FilesRuleBuilder

Filter or assertion criteria for have import of.

Link copied to clipboard

Filter or assertion criteria for have name matching class name.

Link copied to clipboard

Filter or assertion criteria for have no wildcard imports.

Link copied to clipboard

Filter or assertion criteria for have only one class per file.

Link copied to clipboard

Filter or assertion criteria for have top level functions.

Link copied to clipboard

Filter or assertion criteria for have top level properties.

Link copied to clipboard
open infix fun inModule(modulePath: String): FilesRuleBuilder

Asserts that files reside in a module matching modulePath.

Link copied to clipboard
open fun inModules(vararg modulePaths: String): FilesRuleBuilder
open infix fun inModules(modulePaths: List<String>): FilesRuleBuilder

Asserts that files reside in modules matching modulePaths.

Link copied to clipboard
open fun inPackage(vararg packagePatterns: String): FilesRuleBuilder
open infix fun inPackage(packagePatterns: List<String>): FilesRuleBuilder

Asserts that files reside in packages matching packagePatterns.

open infix fun inPackage(predicate: (String) -> Boolean): FilesRuleBuilder

Asserts that files reside in a package matching predicate.

open infix fun inPackage(packagePattern: String): FilesRuleBuilder

Asserts that files reside in a package matching packagePattern.

Link copied to clipboard

Asserts that files are in the package of the type parameter T.

Asserts that files are in the package of the specified type.

Link copied to clipboard
open fun named(vararg names: String): FilesRuleBuilder
open infix fun named(predicate: (String) -> Boolean): FilesRuleBuilder
open infix fun named(name: String): FilesRuleBuilder
open infix fun named(names: List<String>): FilesRuleBuilder

Filter or assertion criteria for named.

Link copied to clipboard
open fun nameEndsWith(vararg suffixes: String): FilesRuleBuilder
open infix fun nameEndsWith(suffix: String): FilesRuleBuilder
open infix fun nameEndsWith(suffixes: List<String>): FilesRuleBuilder

Filter or assertion criteria for name ending with.

Link copied to clipboard
open fun nameMatches(vararg patterns: String): FilesRuleBuilder
open infix fun nameMatches(pattern: String): FilesRuleBuilder
open infix fun nameMatches(patterns: List<String>): FilesRuleBuilder

Filter or assertion criteria for name matching.

Link copied to clipboard
open fun nameStartsWith(vararg prefixes: String): FilesRuleBuilder
open infix fun nameStartsWith(prefix: String): FilesRuleBuilder
open infix fun nameStartsWith(prefixes: List<String>): FilesRuleBuilder

Filter or assertion criteria for name starting with.

Link copied to clipboard
open fun noneOf(vararg blocks: FilesShould.() -> Unit): FilesRuleBuilder

Filter or assertion criteria for none of.

Link copied to clipboard
open fun notCall(fqName: String): FilesRuleBuilder
open fun notCall(kClass: KClass<*>): FilesRuleBuilder

Filter or assertion criteria for not call.

Link copied to clipboard

Asserts that files do not call members of type parameter T.

Link copied to clipboard
open infix fun notContainClass(fqName: String): FilesRuleBuilder
open infix fun notContainClass(kClass: KClass<*>): FilesRuleBuilder

Filter or assertion criteria for not contain class.

Link copied to clipboard

Filter or assertion criteria for not contain classes.

Link copied to clipboard

Asserts that selected files do not form dependency cycles among themselves.

Link copied to clipboard

Filter or assertion criteria for not contain top level functions.

Link copied to clipboard

Filter or assertion criteria for not contain top level properties.

Link copied to clipboard

Filter or assertion criteria for not contain wildcard imports.

Link copied to clipboard
open fun notDependOnModules(vararg modulePaths: String): FilesRuleBuilder
open infix fun notDependOnModules(modulePaths: List<String>): FilesRuleBuilder

Filter or assertion criteria for not depend on modules.

Link copied to clipboard
open fun notDependOnPackages(vararg packages: String): FilesRuleBuilder
open infix fun notDependOnPackages(packages: List<String>): FilesRuleBuilder

Filter or assertion criteria for not depend on packages.

Link copied to clipboard

Filter or assertion criteria for not have classes.

Link copied to clipboard
open fun notHaveImportOf(vararg imports: String): FilesRuleBuilder
open infix fun notHaveImportOf(importFqName: String): FilesRuleBuilder
open infix fun notHaveImportOf(imports: List<String>): FilesRuleBuilder
open infix fun notHaveImportOf(kClass: KClass<*>): FilesRuleBuilder

Filter or assertion criteria for not have import of.

Link copied to clipboard

Filter or assertion criteria for not have top level functions.

Link copied to clipboard

Filter or assertion criteria for not have top level properties.

Link copied to clipboard

Filter or assertion criteria for not have wildcard imports.

Link copied to clipboard
open infix fun notInModule(modulePath: String): FilesRuleBuilder

Asserts that files do not reside in a module matching modulePath.

Link copied to clipboard
open fun notInModules(vararg modulePaths: String): FilesRuleBuilder
open infix fun notInModules(modulePaths: List<String>): FilesRuleBuilder

Asserts that files do not reside in modules matching modulePaths.

Link copied to clipboard
open fun notInPackage(vararg packagePatterns: String): FilesRuleBuilder
open infix fun notInPackage(packagePatterns: List<String>): FilesRuleBuilder

Asserts that files do not reside in packages matching packagePatterns.

open infix fun notInPackage(packagePattern: String): FilesRuleBuilder

Asserts that files do not reside in a package matching packagePattern.

Link copied to clipboard
open fun notNamed(vararg names: String): FilesRuleBuilder
open infix fun notNamed(name: String): FilesRuleBuilder
open infix fun notNamed(names: List<String>): FilesRuleBuilder

Filter or assertion criteria for notNamed.

Link copied to clipboard
open fun notNameEndsWith(vararg suffixes: String): FilesRuleBuilder
open infix fun notNameEndsWith(suffix: String): FilesRuleBuilder
open infix fun notNameEndsWith(suffixes: List<String>): FilesRuleBuilder

Filter or assertion criteria for not name ending with.

Link copied to clipboard
open fun notNameMatches(vararg patterns: String): FilesRuleBuilder
open infix fun notNameMatches(pattern: String): FilesRuleBuilder
open infix fun notNameMatches(patterns: List<String>): FilesRuleBuilder

Filter or assertion criteria for not name matching.

Link copied to clipboard
open fun notNameStartsWith(vararg prefixes: String): FilesRuleBuilder
open infix fun notNameStartsWith(prefix: String): FilesRuleBuilder
open infix fun notNameStartsWith(prefixes: List<String>): FilesRuleBuilder

Filter or assertion criteria for not name starting with.

Link copied to clipboard

Filter or assertion criteria for not reference class.

Link copied to clipboard

Asserts that files do not reference class type parameter T.

Link copied to clipboard
open fun onlyDependOnModules(vararg modulePaths: String): FilesRuleBuilder
open infix fun onlyDependOnModules(modulePaths: List<String>): FilesRuleBuilder

Filter or assertion criteria for only depend on modules.

Link copied to clipboard
open fun onlyDependOnPackages(vararg packages: String): FilesRuleBuilder
open infix fun onlyDependOnPackages(packages: List<String>): FilesRuleBuilder

Filter or assertion criteria for only depend on packages.

Link copied to clipboard
open infix fun satisfy(assertion: (FileDeclarationContext) -> Boolean): FilesRuleBuilder

Asserts that selected files satisfy a custom boolean condition.

Asserts that selected files satisfy a custom violation-collecting assertion.

open infix fun satisfy(description: String): FilesRuleBuilder

Asserts that selected files satisfy custom description description.

open fun satisfy(description: String, predicate: (FileDeclarationContext) -> Boolean): FilesRuleBuilder

Asserts that selected files satisfy custom predicate predicate with description.

Asserts that selected files satisfy a custom predicate within a SatisfyContext block identified by id and optional description.