What do you use or prefer, KtLint vs Detekt? Why?
# announcements
m
What do you use or prefer, KtLint vs Detekt? Why?
s
We use both. Ktlint is mostly for code style checks, and Detekt's main target are code smells.
☝️ 1
4
u
@sngrekov Does Ktlint have ready set of rules equal to official Jetbrains’ code style?
a
It only has that.
No configuration. Which means no decisions to make, nothing to argue about and no special files to manage.
While this might sound extreme, keep in mind that ktlint tries to capture (reflect) official code style from kotlinlang.org and Android Kotlin Style Guide (+ we respect your .editorconfig and support additional ruleset|s).
u
@Alan Evans Thanks for pointing! However it seems to be not all the rules: https://github.com/shyiko/ktlint/#standard-rules Anything not (yet) supported?
a
True, I suppose it may be incomplete.
s
@4ntoine Yes, Kotlin's official styleguide it is not fully covered by Ktlint
m
Thanks @sngrekov and @Alan Evans. It was helpful 🙂
👍 1
469 Views