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

Newline inside value argument should not trigger trailing comma rule #1648

Conversation

paul-dingemans
Copy link
Collaborator

Description

  • Do not add a trailing comma in a function call if a newline character is only found inside a multiline argument. Only in case a newline character is found between arguments, this should be taken into account to add a trailing comma.

  • Refactor and cleanup unused branches in isMultiline method

Closes #1642

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:

…er is only found inside a multiline argument. Only in case a newline character is found between arguments, this should be taken into account to add a trailing comma.

* Refactor and cleanup unused branches in isMultiline method

Closes pinterest#1642
@paul-dingemans paul-dingemans merged commit 3e663e6 into pinterest:master Sep 22, 2022
@paul-dingemans paul-dingemans deleted the 1642-no-trailing-comma-for-multiline-argument branch September 22, 2022 18:14
@paul-dingemans paul-dingemans added this to the 0.48.0 milestone Jan 3, 2023
# 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.

Can't reformat correctly in a round with trailing_comma_on_call_site enabled
1 participant