ursus
06/15/2026, 11:49 AMForbiddenImport work for you? I turned it on now
style:
ForbiddenImport:
active: true
forbiddenImports:
- import: "java.time.*"
reason: "Use kotlinx.datetime instead"
and I'm getting 100s of
Execution failed for task ':call-blocker:ui:detektDebug' (registered by plugin 'dev.detekt').
> java.lang.IllegalStateException: Analyzing /Users/foo/AndroidStudioProjects/bar/call-blocker/ui/src/main/kotlin/com/foo/callblocker/ui/CallBlockRoleRequester.kt led to an exception.
Location: java.base/java.util.concurrent.CompletableFuture.wrapInCompletionException(CompletableFuture.java:323)
The original exception message was: dev.detekt.api.InvalidConfigurationError: Provided configuration file is invalid: Structure must be from type Map<String,Any>!
null cannot be cast to non-null type kotlin.String
Running detekt '2.0.0-alpha.3' on Java '25.0.3+9-LTS' on OS 'Mac OS X'
If the exception message does not help, please feel free to create an issue on our GitHub page.Brais Gabin
06/16/2026, 6:52 AM- import: "java... you need to use - value: "java...ursus
06/16/2026, 7:29 AM