Closed rasros closed 1 year ago
I have it set up almost the same in projects which I lint and it seems to be working. I'll need to investigate more. The only difference is instead of your submodule style I have this in the root build file
allprojects {
apply plugin: 'org.jmailen.kotlinter'
}
Have you tried restarting the gradle daemon after making changes to your .editorconfig file? I think that bug got fixed at some point, but that used to be a confuser with settings in .editorconfig seemingly not get picked up.
After updating to 3.14.0 I started receiving this.
Property 'ktlint_disabled_rules' is deprecated: Update all your all '.editorconfig' files. See https://pinterest.github.io/ktlint/faq/#why-is-editorconfig-property-disabled_rules-deprecated-and-how-do-i-resolve-this for more information
I had to kill the Gradle daemon for the changes to .editorconfig
to take effect. After that, things started working again.
Ok, yeah the deprecation message is expected as the they've switched over to a disable line per rule you want to configure. Sounds like it's working so I can close for now. Although, beyond the first time, you shouldn't have to kill the Gradle daemon again -- the plugin sound check the editor config files and clear the cache if it can resolve them in the expected places although that might not be perfect.
How to reproduce:
buildSrc/build.gradle.kts
buildSrc/src/my.plugin.gradle.kts
submodule/build.gradle.kts
The remaining code in this module under
src
directory is what I want to format..editorconfig
These settings are however ignored: