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

Daniel Svensson

09/22/2020, 8:26 AM
As kotlin doesn't have any granular
-Werror=...
etc I was hoping to convince detekt to error out if there are any: unused variables, unused methods, useless
foo?.bar
etc, but I can't seem to find it in the configuration. Am I missing something?
b

Brais Gabin

09/22/2020, 8:39 AM
I think that there was an issue talking about this. If detekt should flag the things that the compiler flag already. And the idea was to avoid the overlap. But
allWarningsAsErrors
have different problems: - It’s not granular - Doesn’t allow baseline - It affects the gradle cache (this one is a huge problem for my workflow) So I think that you can open an issue to talk again about this issue.
d

Daniel Svensson

09/22/2020, 8:43 AM
Ok. Thanks.
On the Kotlin side there has been an issue for treating specific warnings as errors open for 3 years... 😞 https://youtrack.jetbrains.com/issue/KT-18783
4 Views