Is it possible to import a detekt-config.yml into IntelliJ/Android Studio code style settings in some way?
j
Jukka Siivonen
03/23/2019, 3:30 PM
Detekt has IDEA plugin where you can choose config, then if you set it to show findings as errors you see them in live in code editor
m
Mike
03/23/2019, 4:28 PM
It will show them as warnings by default too, so 2 ways to see them.
g
GreyhairRedbear
03/23/2019, 9:21 PM
The reason why I'm asking is that I'd like to be able to have my IDE-built-in formatter use the rules given by detekt and not having to run the format task each time. It would be sufficient for me to just have a script that converts the detekt-config.yml (at least the relevant parts) to a IDEA-compatible codestyle.xml.
m
Mike
03/24/2019, 12:37 AM
I don’t think Detekt recommends using their formatting rules, and especially since there are official Kotlin coding conventions and built-in formatting in IntelliJ.