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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop 'indentSize' #245

Merged
merged 1 commit into from
Apr 4, 2022
Merged

Conversation

mateuszkwiecinski
Copy link
Collaborator

From the discussion in pinterest/ktlint#1434 (comment) I understood overriding an .editorConfig property via userData parameter won't be supported.
According to pinterest/ktlint#1442 passing indent_size will result in a runtime exception. Regardless if this lands in current form, in context of the discussion from previous PR - I'm proposing to remove the indentSize property from Kotlinter's extension.
Regardless of how the future of ktlint will look like, I think such change makes sense:
a) .editorconfig should be the preferred way of setting the indent_size parameter, mainly because it integrates with IntelliJ based IDEs.
b) it's less code to maintain 馃槢

The recommended migration path which probably should be mentioned in release notes is to replace kotlinter.indentSize with the following entry in {project_root}/.editorconfig:

[*.{kt, kts}]
indent_size = 4

@mateuszkwiecinski mateuszkwiecinski marked this pull request as ready for review April 3, 2022 11:54
Copy link
Owner

@jeremymailen jeremymailen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree completely. The indentSize in the gradle extension is vestigial at this point.
The documentation will be a little ahead of the release, but it's ok I think since we'll get the upgrade done this week.

@jeremymailen jeremymailen merged commit 54818e7 into jeremymailen:master Apr 4, 2022
@mateuszkwiecinski mateuszkwiecinski deleted the drop_indent_size branch April 4, 2022 07:37
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

Successfully merging this pull request may close these issues.

None yet

2 participants