Replies: 3 comments 10 replies
|
Would it be possible to use the default Android Studio Linting and Formatting? |
|
I voted ktfmt, but when I tried it out it made quite significant changes to all the code. This will not help us when we looking up old commits. So I change my vote to keep using ktlint. I found out there is an unofficial ktlint plugin for IntelliJ: https://plugins.jetbrains.com/plugin/15057-ktlint-unofficial- I am open to @artakka's suggestion to remove formatting checks from CI. |
|
I voted for ktlint. I think consistency is key. Linting in CLI should be consistent with the IDE. If we do not trust CLI linting for now, I would cut an issue for that improvement and tackle that separately. And call bankruptcy on our current Gradle setup. :) To improve, sometimes we must degrade. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Right now we use ktlint for linting Kotlin files. However, this linter setup is causing issues (#675) with it not matching the IntelliJ style. I tried to fix this but actually, the authors of ktlint do not recommend using both IntelliJ and ktlint for formatting.
For me locally the
:ktlintFormattask is broken. And when I look at ktlint.gradle it uses deprecated Gradle syntax and is set up in a way that is no longer supported by ktlint.All in all, the linting / formatting setup needs to be tweaked a bit more.
6 votes ·
All reactions