`detektMain` works fast and well in small modules,...
# detekt
e
detektMain
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?
s
Not my area of expertise, I think you'd have to ask the project maintainers
🙌 1
s
Citing the docs
Detekt 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/
👍 1
e
sounds convenient for me