KatachiKonsistNoKotlinFilesException
A konsist { } constraint that covers files, none of which Konsist can parse.
Konsist 0.17.3 parses a file only when its name ends in .kt — .kts scripts included, they are not parsed. A constraint covering, say, only build.gradle.kts would therefore be handed an empty scope and pass by empty truth, which is the one answer this backend must never give silently.
A constraint covering no files at all is a different thing and is not an error: that is a place waiting to fill up, and the layout check already treats it as normal.
Example 1: catch a rule written over files Konsist cannot read
val failure = shouldThrow<KatachiArchitectureAssertionError> {
projectArchitecture.assert(FileConstraintCheck())
}
failure.violations.filterIsInstance<UncheckedFileConstraint>()
.single().cause.shouldBeInstanceOf<KatachiKonsistNoKotlinFilesException>()Content copied to clipboard