-
Notifications
You must be signed in to change notification settings - Fork 156
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
Using this plugin with the official IntelliJ IDE plugin #744
Comments
I think this page will help you: https://pinterest.github.io/ktlint/1.1.1/rules/code-styles/ |
Unfortunately, that page tells me how I can override the code style rules, but I don't know which rules I want to force my IDE to use the same rules as |
the code style used by default is whichever the underlying version of ktlint is using. So for ktlint version < 1 it is intellij style, and for >=1 it is ktlint_official. as for the configuration of specfic rules, again, this is tied to the version of ktlint being used. since you are using ktlint-gradle 11.6.1, the version of ktlint it is using by default is |
Summary
I've got a few projects that use this plugin to format our code before commit.
We also use the Ktlint IntelliJ plugin with auto formatting to fix code violations on-save before commit.
Problem
Currently, the rules applied by that plugin don't align with the rules applied by this plugin.
I'd like to make the IDE plugin use the rules in use by this plugin.
Environment
ktlint-gradle version
11.6.1
Android Studio
2023.1.1
Android Studio ktlint plugin (According to the docs, the plugin currently runs with ktlint version 1.1.0 and can use
.editorconfig
)What I've tried
I've tried to use the
ktlintApplyToIdea
to export the rules and apply them to the IDE, but I'm receivingBecause I don't know the default rules, I don't have the information required to
Use .editorconfig to synchronize formatting rules between IDEA and ktlint.
.Request
Is there some documentation on how I can export an xml ruleset, or guidance on this?
The text was updated successfully, but these errors were encountered: