Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add new experimental rule string-template-indent #1877

Merged
merged 1 commit into from
Mar 22, 2023

Conversation

paul-dingemans
Copy link
Collaborator

Description

Add new experimental rule string-template-indent for ktlint_official code style

This rule forces multiline string templates which are post-fixed with .trimIndent() to be formatted consistently. The opening and closing """ are placed on separate lines and the indentation of the content of the template is aligned with the """.

Closes #925

Checklist

  • PR description added
  • tests are added
  • KtLint has been applied on source code itself and violations are fixed
  • documentation is updated
  • CHANGELOG.md is updated

In case of adding a new rule:

…al` code style

This rule forces multiline string templates which are post-fixed with `.trimIndent()` to be formatted consistently. The opening and closing `"""` are placed on separate lines and the indentation of the content of the template is aligned with the `"""`.

Closes #925
@paul-dingemans paul-dingemans added this to the 0.49.0 milestone Mar 21, 2023
@paul-dingemans paul-dingemans merged commit b74f1d7 into master Mar 22, 2023
@paul-dingemans paul-dingemans deleted the 925-string-template-indent branch March 22, 2023 16:04
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

auto-indent bodies of multiline strings with .trimIndent()
1 participant