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

Intellij formatting of .editorconfig file breaks it #555

Closed
riclage opened this issue Aug 5, 2019 · 3 comments · Fixed by #561
Closed

Intellij formatting of .editorconfig file breaks it #555

riclage opened this issue Aug 5, 2019 · 3 comments · Fixed by #561

Comments

@riclage
Copy link

riclage commented Aug 5, 2019

I have a .editorconfig file as follows:

[*.{kt,kts}]
insert_final_newline=true
disabled_rules=import-ordering

However, if I auto-format this file with IntelliJ, it gets formatted to (note the spaces):

[*.{kt, kts}]
insert_final_newline = true
disabled_rules = import-ordering

After I do that, ktlint ignores the rules set in the file. The problem is with [*.{kt, kts}]. Currently, it seems, there can be no spaces between the file types.

@zarebski-m
Copy link

Using latest version of ktlint (0.34.2) and the problem of spaces around = sign is not present for me. There is another issue though: IntelliJ by default inserts space after comma in list:

disabled_rules = import-ordering, no-wildcard-imports

This makes ktlint to not disable rule no-wildcard-imports.

My workaround was to change IntelliJ formatting rule for .editorconfig to not add space after comma:

disabled_rules = import-ordering,no-wildcard-imports

@jonasfa
Copy link
Contributor

jonasfa commented Feb 27, 2020

The space after comma issue described by @zarebski-m still exists.

@Tapchicoma
Copy link
Collaborator

@jonasfa if you could reproduce it with latest Ktlint release, please, open a new issue.

@pinterest pinterest locked as resolved and limited conversation to collaborators May 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants