jeremymailen / kotlinter-gradle

Painless, fast ktlint plugin for Gradle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Task formatKotlin does not respect ignored directories.

strindberg opened this issue · comments

We have configured the linter to ignore our (generated) code directory db like so:

tasks.lintKotlinMain {
    exclude("**/db/**")
}

This works fine. However, when running task formatKotlin, the formatter does not respect this setting but formats the code in the db directory.

I got it to work this way: #251 (comment)

Thank you, that's a good workaround. However, I still think there is room for improvement in the plugin: either that the format task inherits its exclusions from the lint task if no exclusions are specified, or that the format task also can be configured in the same way as the lint task, i.e. with an exclude-dsl.