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

dimsuz

12/15/2021, 6:57 PM
Judging from source code, detekt currently doesn't support type resolution in KMM commonMain modules. Is there an issue I could track for this feature? Would be awesome to have.
g

gammax

12/15/2021, 7:15 PM
You're correct and no, there is no issue to track :(
s

schalkms

12/15/2021, 7:15 PM
It's actually supported by detekt. https://github.com/detekt/detekt/pull/3453
g

gammax

12/15/2021, 7:27 PM
I’m not entirely sure we support Type Resolution for
commonMain
. I’m sure we do for Android & JVM source sets. IIRC we don’t for common, native & JS srcset but I might be wrong.
d

dimsuz

12/16/2021, 12:36 AM
Yeah, what I've found was this line, which disables type resoulution for common (with a helpful why-comment). A pity though, because I'm integrating detekt in a new kmm project which promises large amounts of code in a
commonMain
which I'd like to check in this nice mode. I can understand that it's not trivial to implement though...
Hmm, but on the other hand I've just found this comment, which says that
commonMain
will be checked by
detektMetadataMain
🙂 Will try it tomorrow.
s

schalkms

12/16/2021, 9:08 PM
Ups sorry.. I overlooked the
commonMain
comment.
3 Views