detekt 1.2.0 Spring Boot 2.2.1 Kotlin 1.3.60 I hav...
# detekt
c
detekt 1.2.0 Spring Boot 2.2.1 Kotlin 1.3.60 I have
kotlin.spring
plugin applied and a class annotated with
@Configuration
, but
ProtectedMemberInFinalClass
is still triggered. The class is effectively open due to `kotlin.spring`plugin and this worked before on detekt 1.0.1, Boot 2.2.0.RC1, Kotlin 1.3.50. Should I try to downgrade them one by one to find which version upgrade caused this or is it a known issue?
s
May I ask you to submit an issue to detekt's repo? Please provide a little more context. Which code is causing this? Please note that was no logic related change to this rule since February 2019.
Detekt 1.0.1 was released on the 24th of August.
As @Brais Gabin said, this rule was activated by default for v1.2.0. This might have caused your issue.
m
The kotlin-spring is a wrapper on top of all-open, and it behaves exactly the same way.
I think you should disable it as there are effectively no final classes in your project.
b
I think that spring is big enough to add those annotations as exceptions.
m
The all-open plugin is not restricted to annotated classes as far as I know.
c
@marschwar , why would I disable the kotlin.spring plugin? It supplies configuration I need for all-open, I don't see any benefit towards configuring all-open manually. @schalkms, I'll try to provide more info later and post an issue.
m
Sorry, I meant disable the detekt rule.