Hi, is there a way to deny by default any dependen...
# konsist
t
Hi, is there a way to deny by default any dependencies that are not explicitly defined between layers? I expected that in this test, all the dependencies that I didn’t specified to be disallowed, but they are not. E.g. if I add a dependency from web to database the test passes:
Copy code
"hexagonal layers should respect dependency rules" {
        Konsist
            .scopeFromProduction()
            .assertArchitecture {
                // Domain
                val domain = Layer("Domain", "..domain..")

                domain.dependsOnNothing()

                //Infrastructure
                val configuration = Layer("Configuration", "..infra.config..")
                configuration.dependsOn(domain)

                val messaging = Layer("Messaging", "..infra.messaging..")
                messaging.dependsOn(domain)

                val web = Layer("Web", "..infra.web..")
                web.dependsOn(domain)

                val database = Layer("Database", "..infra.db..")
                database.dependsOn(domain)
            }
    }