-
Notifications
You must be signed in to change notification settings - Fork 50
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
.editorconfig file per module? #321
Comments
It should honor an .editorconfig file in the root directory and editorconfig files further down the tree can modify that behavior as per the spec for editorconfig. Largely this behavior is implemented in the underlying ktlint library via ec4j. |
Should not be anything unusual - standard root project with several subprojects. We do apply the kotliner plugin to the root to do config, but I guess I'm not sure if that actually carries over. We also apply the plugin to all the submodules. |
Ok, I think I figured it out - the gradle daemon is caching the |
Ok, yeah, the .editorconfig not being re-evaluated is an issue that's come up, although I thought we fixed it in https://github.com/jeremymailen/kotlinter-gradle/releases/tag/3.12.0. |
Looks like that was using Sorry, that was using 3.14. I will say that often I was not changing code files in between formatting runs, just the |
The fix was basically to track the .editorconfig files as inputs to the build to correctly re-run tasks when they changed. |
Yeah, I'll close this for now and open a bug for editorconfig staleness. |
I'm not sure what the expected behavior is here - I have a
.editorconfig
file in my root, but the submodules do not respect the rules in that file. If I copy that file into each submodule, then kotlinter/ktlint respects those rules, but this seems like a bad pattern. Do I need to configure kotlinter somehow to use my root.editorconfig
or am I supposed to copy it?The text was updated successfully, but these errors were encountered: