https://kotlinlang.org logo
#detekt
Title
# detekt
c

Czar

11/28/2019, 5:04 AM
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

schalkms

11/29/2019, 5:26 PM
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

marschwar

11/30/2019, 12:03 PM
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

Brais Gabin

11/30/2019, 12:09 PM
I think that spring is big enough to add those annotations as exceptions.
m

marschwar

11/30/2019, 12:19 PM
The all-open plugin is not restricted to annotated classes as far as I know.
c

Czar

11/30/2019, 8:53 PM
@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

marschwar

11/30/2019, 9:40 PM
Sorry, I meant disable the detekt rule.
15 Views