Hi everyone, when I integrate Ktlint to my project and testing it. I found that this coding convention from Kotlin (here) not detect by the Ktlint. What I had try is to add the
companion object
at the beginning of the class, which should be at the end of the class, and it pass.
I don’t know if I miss understand about the Ktlint, from what I understand is that Ktlint out of the box check the Kotlin convention too. If it’s not, do you have any suggestion about any tools I can use to follow Kotlin convention like I mentioned before? Thanks
I’m using the Ktlint gradle plugin here
r
romtsn
10/30/2021, 9:08 AM
yeah it's just missing functionality, you could use detekt, they have this rule, but there's no autocorrect, just linting
b
bobby
10/30/2021, 2:35 PM
if that’s the case, then what Ktlint brought to developers then? from what I see in the website, it only covers really a trivial things, like the new line at the end of the class, extra space, order of modifiers, is it really just that?