Skip to content
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

ktlint-idea unsupport: Not Usable After Version 11.6.1 #774

Open
thxwelchs opened this issue Sep 5, 2024 · 2 comments
Open

ktlint-idea unsupport: Not Usable After Version 11.6.1 #774

thxwelchs opened this issue Sep 5, 2024 · 2 comments

Comments

@thxwelchs
Copy link

thxwelchs commented Sep 5, 2024

It seems that the ktlint-idea plugin is no longer supported after version 11.6.1. Attempts to use the plugin in later versions result in failure. Clarification on this issue and possible resolutions would be appreciated.

org.jlleitschuh.gradle.ktlint-idea

@ievgen-kapinos
Copy link

Seems READMe.md is outdated and to be updated
#775

@ievgen-kapinos
Copy link

ievgen-kapinos commented Oct 1, 2024

Anyway, this request makes sence. We have no instruction on how to configure IDE to re-format files in a same way as we have after running gradle clean ktlintFormat. I have .editorconfig file with recommended content
https://pinterest.github.io/ktlint/latest/rules/configuration-intellij-idea/

...
[*.{kt,kts}]
...
ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL
ij_kotlin_name_count_to_use_star_import = 2147483647
ij_kotlin_name_count_to_use_star_import_for_members = 2147483647
ij_kotlin_packages_to_use_import_on_demand = unset

Anyway, when I'm clicking in Idea Code > Reformat Code only basic formatting from .editorconfig file is applied. Command gradle clean ktlintCheck fails after such re-formatting. IDE does not know which ruleset version to apply, e.g. in my case version 1.3.0 is hardcoded in Gradle build script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants