10
Detect unused imports in Kotlin without IntelliJ?
(reddthat.com)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
I got the Kotlin compiler using sdkman, the closest thing to that command I found was: kotlinc -Xreturn-value-checker=full $(find . -name '*.kt')
It doesn't really work, it just gives errors for every single import that comes from a library (libKTX in my case)
My bad, I think the option I mentioned might have existed at some point but doesn't now.
Sadly it's probably a moating strategy for jetbrains to have that as an IDE exclusive feature.
The best you can probably do is trying to dig out that functionality from the android studio source ... https://android.googlesource.com/platform/tools/base/+/studio-master-dev/studio.md