Hi! ktlint is great. We tried to use it for something crazy, and I think we succeeded. Take a look at kotlin2dart , a Kotlin to Dart transpiler built as a set of rules for the ktlint engine. Contributors are welcome!
👎 1
😮 1
👍 2
h
hfhbd
01/08/2023, 12:41 PM
Fascinating idea to reuse the ktlint engine! I write a transpiler too, but Cobol to Kotlin. I am very curious about how "good" the ktlint engine is and why you chose ktlint instead ksp or even detekt.
y
yasyd
01/08/2023, 12:47 PM
I evaluated ksp and detekt. Detekt is similar to ktlint. My impression was that ktlint had a simpler design and was better documented. Ksp is higher level, I preferred a tool where I could work with lower level AST for kotlin code. I think it actually worked well. It is still a work in progress, but it is already very useful. I am using it daily for my work.
a
akuleshov7
01/09/2023, 2:55 AM
Yep, we also used ktlint as a framework in diktat: https://github.com/saveourtool/diktat/. But now are thinking that it could have been a mistake, detekt can help more with it’s complex analysis
👍 1
akuleshov7
01/09/2023, 2:59 AM
A huge dislike goes to you for the BSD license: you are taking MIT ktlint framework and do a licensing with BSD… Also - why did you copy ktlint modules to your project - why not use it as dependencies?
y
yasyd
01/09/2023, 4:38 AM
@akuleshov7 you are right i will change the license back to MIT.
i modified the ktlint engine code. i could not just link the original modules.
m
Matteo Mirk
03/14/2023, 9:01 AM
@akuleshov7 I started a side project for a library at work, I remembered seeing this tool here and will try to integrate it instead of ktlint+detekt. Will let you know how it goes!