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

Restrict indentation of closing quotes to ktlint_official code style #1996

Merged
merged 2 commits into from
May 7, 2023

Conversation

paul-dingemans
Copy link
Collaborator

Description

Ktlint 0.48.2 and older allowed for an asymmetrical form of aligning the opening and closing quotes. E.g., if the opening quotes are after but on the same line as the assignment operator, and the closing quotes are on a next line, then the closing quotes may be aligned with the start position of the statement.

In 0.49.x the check of the closing quotes has accidentally been changed for all code styles while it should only have veen changed for the new ktlint_official code style only. As the ktlint_official code style will allways wrap multiline expression to start on a new line (via rule standard:multiline-expression-wrapping) the formatting will be consistent for both functions and properties.

Closes #1971

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:

…e to keep formatting of other code styles consistent with `0.48.x` and before

Closes #1971
@paul-dingemans paul-dingemans added this to the 0.49.1 milestone May 6, 2023
@paul-dingemans paul-dingemans merged commit fc16aa0 into master May 7, 2023
@paul-dingemans paul-dingemans deleted the 1971-indent-property-multiline-string branch May 7, 2023 14:06
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
1 participant