You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up from #794 (merged). That PR removed ~28 inline fully-qualified type names in favor of imports, but no lint rule prevents recurrence.
Finding
There is no built-in detekt 1.23.8 or ktlint rule that flags an inline FQN used where an import would do. A real guard needs a custom detekt ruleset module (jar + RuleSetProvider + META-INF/services), wired type-resolution-aware against the existing detektMain/detektTest/detektIntegrationTest tasks so it can distinguish a genuine same-name collision (which must stay FQN'd) from a shortenable FQN — plus its own tests and a baseline for the legitimate collision cases.
Legitimate FQNs that a rule must NOT flag (from #794)
project DockerException vs dockerjava DockerException (Docker.kt, RetryUtil.kt, ContainerExecutor.kt, ContainerExecutorTest.kt)
fabric8 Container vs testcontainers Container (K8sServiceIntegrationTest.kt)
Follow-up from #794 (merged). That PR removed ~28 inline fully-qualified type names in favor of imports, but no lint rule prevents recurrence.
Finding
There is no built-in detekt 1.23.8 or ktlint rule that flags an inline FQN used where an import would do. A real guard needs a custom detekt ruleset module (jar +
RuleSetProvider+META-INF/services), wired type-resolution-aware against the existingdetektMain/detektTest/detektIntegrationTesttasks so it can distinguish a genuine same-name collision (which must stay FQN'd) from a shortenable FQN — plus its own tests and a baseline for the legitimate collision cases.Legitimate FQNs that a rule must NOT flag (from #794)
DockerExceptionvs dockerjavaDockerException(Docker.kt, RetryUtil.kt, ContainerExecutor.kt, ContainerExecutorTest.kt)Containervs testcontainersContainer(K8sServiceIntegrationTest.kt)java.lang.Long/Double/Float/Boolean::class.java(McpToolRegistry.kt)ResultCallback.Adapter<Frame>(DockerTest.kt — owned by build: treat Kotlin compiler warnings as errors (and fix the fallout) #780)Recommendation
Worthwhile only if the pattern recurs. If it does, build the custom rule as above. Low priority until then.