-
Notifications
You must be signed in to change notification settings - Fork 49
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
Disabling rule not working #336
Comments
Try restarting the gradle daemon. Sometimes it doesn't doesn't see the .editorconfig change as a change to build inputs. |
I even tried after pc restarting, still not working |
Had the same issue, |
For everyone like me: use disabled, not unset. The syntax in kotlinter requires you to call the string And for now you should use |
For anyone else running into this, another option is to disable with
|
Stopping the gradle deamon and running without one did not work for me. As a last resort I just disabled the plugin. |
@duncte123 what's your editorconfig look like and which rules are you expecting to disable? |
This my my editorconfig, I tried to match the settings I had set with the gradle configuration but even disabling all rulesets still validates them root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
[gradlew]
end_of_line = lf
[*.{kt,kts}]
ktlint_code_style = ktlint_official
ktlint_standard = enabled
ktlint_experimental = disabled
ktlint_custom-rule-set = disabled
klint_standard_no-wildcard-imports = disabled
klint_standard_function-signature = disabled
klint_standard_trailing-comma-on-call-site = disabled
klint_standard_multiline-expression-wrapping = disabled |
@duncte123 you have typos in your editor config. Your disabled rules should begin with |
Yes, that seems to be the case. Another test you can do is run the ktlint command line on your same project and editorconfig and see if you get the same result. That can often tell you if you're running into a gradle plugin issue or if a more fundamental issue is occurring with ktlint. |
Oh, thanks for spotting that. Not sure how I missed that. Fixing those typos in combination with disabling the daemon makes it work like a charm again, thanks! |
This is my .editorconfig file:
And disabling multiline if-else not working.
I'm using 3.15 version.
The text was updated successfully, but these errors were encountered: