Egor K.
06/20/2024, 10:58 AMdetektMain
works fast and well in small modules, but if I run detektMain
on the whole project, it takes too long and requires too much RAM. The regular detekt
command works fine. I suppose it’s because type checking requires a lot of resources. Maybe @Sam you know a way to run detektMain
(with type checking) without such high resource requirements?Sam
06/20/2024, 10:59 AMschalkms
06/22/2024, 8:11 PMDetekt offers a compiler plugin for K1 which allows you to run detekt as part of the Kotlin compilation process. This allows you to run detekt on your code without having separate tasks to invoke and results in much faster execution of detekt, especially if you're using type resolution. Please note that Detekt Compiler Plugin is an experimental extension of detekt.https://detekt.dev/docs/gettingstarted/compilerplugin/
Egor K.
06/23/2024, 3:25 PM