Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task formatKotlin does not respect ignored directories. #337

Open
strindberg opened this issue Aug 4, 2023 · 2 comments
Open

Task formatKotlin does not respect ignored directories. #337

strindberg opened this issue Aug 4, 2023 · 2 comments

Comments

@strindberg
Copy link

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.

@jasonab
Copy link
Contributor

jasonab commented Aug 4, 2023

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

@strindberg
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants