kotlinter-gradle
kotlinter-gradle copied to clipboard
Task formatKotlin does not respect ignored directories.
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: https://github.com/jeremymailen/kotlinter-gradle/issues/251#issuecomment-1577310228
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.