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

Support for .editorconfig properties in dsl #370

Closed
robertoestivill opened this issue Jul 24, 2020 · 3 comments
Closed

Support for .editorconfig properties in dsl #370

robertoestivill opened this issue Jul 24, 2020 · 3 comments
Labels

Comments

@robertoestivill
Copy link

Ktlint supports .editorconfig files with properties.

https://github.com/pinterest/ktlint#custom-ktlint-specific-editorconfig-properties

However, I found that not all of the supported properties have the equivalent property/method exposed in the plugin dsl, meaning that we can not get the same level of configuration.

Is there any way to accomplish this?
I'm specifically looking to configure kotlin_imports_layout

Thanks.

@JLLeitschuh
Copy link
Owner

Can you elaborate upon your use case here? What are you trying to accomplish here and why?

@robertoestivill
Copy link
Author

Sorry if haven't been clear. Let me explain further.

I wanna configure Ktlint to run the import-ordering rule with the ascii configuration.

Ktlint supports this by reading .editorconfig properties as linked in my first message. However, I want to avoid having one in my code base, as working on a editor with editorconfig support is not require for developers.

I went through the available configurations in in the readme file but I didn't find what I need.

Is it too crazy to think that this plugin should expose DSL property/methods to configure all the Ktlint supported parameters/configs?

I know is a cat/mouse game with the Ktlint project, but is there anyway to accomplish this so whenever there's a new version of Ktlint with support for something new, you don't have to update the plugin?

I hope this is clearer now.
Thanks for your speedy response.

@Tapchicoma
Copy link
Collaborator

I would advice you to add .editorconfig to your project, you just need to add it in your project root dir.

Plugin will not support any ktlint specific .editorconfig properties.

Regarding kotlin_imports_layout field - it will be become supported by IDEA with Kotlin 1.4 release and will not be ktlint specific: pinterest/ktlint#753

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

No branches or pull requests

3 participants