Closed grashwin closed 5 years ago
You have space between assignment, it should look following:
disabled_rules=filename
Related to pinterest/ktlint/issues/555
You have space between assignment, it should look following:
disabled_rules=filename
Related to pinterest/ktlint/issues/555
Thanks for the reply. I tried that but does not work. The debug log shows that it is without space
[DEBUG] Discovered .editorconfig (/some/path) {charset=utf-8, disabled_rules=filename, end_of_line=lf, indent_size=4, indent_style=space, insert_final_newline=true, trim_trailing_whitespace=true}
Just to be sure, have you set ktlint version in plugin configuration to 0.34.2
?
ktlint {
version.set("0.34.2")
}
Latest release of plugin, by default, uses 0.33.0
.
That worked. Sorry for the delay response.
Make sure to use latest ktlint version
I added the .editorconfig but still not able to disable the filename rule.
disabled_rules = filename
Turned on the debug and could see the settings are being applied
[DEBUG] Discovered .editorconfig (/some/path) {charset=utf-8, disabled_rules=filename, end_of_line=lf, indent_size=4, indent_style=space, insert_final_newline=true, trim_trailing_whitespace=true}
Still getting file name errors when i run
./gradlew ktlintFormat
[ERROR] class TestEnum should be declared in a file named TestEnum.kt (cannot be auto-corrected)