After our upgrade to the new ktlint version during the migration to Gradle 8, we adopted the default code style provided by ktlint, as we thought, that rules couldn't be changed or excluded. But there is a way to configure ktlint - inside the .editorconfig.
At the moment, we apply the default rules with a mix of settings from .editorconfig, which results in unreadable formatting.
Open question: Does the Plugin, that integrates Ktlint into our Gradle Project, support configuration through .editorconfig?
Research/Tech
After our upgrade to the new ktlint version during the migration to Gradle 8, we adopted the default code style provided by
ktlint
, as we thought, that rules couldn't be changed or excluded. But there is a way to configurektlint
- inside the.editorconfig
.At the moment, we apply the default rules with a mix of settings from
.editorconfig
, which results in unreadable formatting.Open question: Does the Plugin, that integrates Ktlint into our Gradle Project, support configuration through
.editorconfig
?Ktlint Rules Page jlleitschuh/ktlint-gradle - Our used Ktlint to Gradle Plugin Other Gradle Plugins
General Idea
Change the linting configuration, resulting in a format that is similar to before the upgrade.
Proposed Solution
E.g. add a preset of rules to the
.editorconfig
: