KatachiKonsistUnlocatableDeclarationException
A rejected element that cannot say where it is.
KonsistScope.must and its siblings accept any KoBaseProvider, because that is the bound declarations() comes back at. Almost everything Konsist hands back also carries KoPathProvider; one that does not could only be reported as a violation with no path, which the report format does not have a shape for.
Example 1: catch a rejection katachi could not point at a file
val failure = shouldThrow<KatachiArchitectureAssertionError> {
projectArchitecture.assert(FileConstraintCheck())
}
failure.violations.filterIsInstance<UncheckedFileConstraint>()
.single().cause.shouldBeInstanceOf<KatachiKonsistUnlocatableDeclarationException>()Content copied to clipboard