Repository navigation
ktlint_standard_enum-entry-name-case = disabled does not work on .editorconfig #1785
Description
Activity
It works, see Goooler/AndroidOAuth2WebView#36.
I guess the issue is what you are using
"$projectDir/../.editorconfig"to override file path.daniel-lopes-optimizely commented
on Aug 23, 2023 AuthorMore actionsThe file path needs to be overridden because the project is a submodule of a bigger project.
The plugin fails if it can't find the file in the config path:Could not determine the dependencies of task ':spotlessApply'. > Could not create task ':spotlessKotlinApply'. > Could not create task ':spotlessKotlin'. > File signature can only be created for existing regular files, given: .../looker-sdk-codegen/.blablahPlus, the other settings I have in the .editorconfig file seem to work fine.
You can use
"$projectDir.parent/.editorconfig"here.Reacted by Daniel Lopesdaniel-lopes-optimizely commented
on Aug 23, 2023 AuthorMore actionsI'm getting odd behavior, and I'm not sure what happened but none of the settings work now.
I tried the path that you provided and tried the old one. There's no errors about the file not being found, but it does not seem to matter and it fails the validation.
What worked though was copying the .editconfig to the project directory and removing the setEditorConfigPath.
But I can't do that, not without telling the project maintainers that I now have to have two distinct .editorconfig files and that editor config path setting should work, right?Overriing
.editorconfigworks, I just tried with a simular case in Goooler/AndroidOAuth2WebView#36, I guess you are still setting a wrong path.daniel-lopes-optimizely commented
on Aug 23, 2023 AuthorMore actionsShouldn't the plugin fail if the file isn't found?
daniel-lopes-optimizely commented
on Aug 23, 2023 AuthorMore actionsIf I change the file name or path I get an error.
The current behaviour ignores the file content if it's not in the root directory.daniel-lopes-optimizely commented
on Aug 23, 2023 AuthorMore actionsI fixed this by deleting the .gradle and build directories. Not sure why I had to do this, but spotlessApply is working fine after that.
- added a commit that references this issue
on Aug 24, 2023
The .editorconfig file
The error:
The gradle.kts
Is this something you can help me figure out? I'm using the latest spotless gradle plugin, but I think this is related to ktlint. Let me know if I have to take this to the ktlint devs instead.