-
Notifications
You must be signed in to change notification settings - Fork 512
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
Errant comma added between parameter lambda and parenthesis (when trailing lambda present) #1557
Comments
Tnx for reporting. This bug already seems to be around since version 0.42.x. The trailing comma should not be added to the argument list whenever a function call is followed by a lambda. |
Heh, I was upgrading from 0.41 😄 |
Current behavior of KtLint is consistent with default formatting of IntelliJ IDEA. Omitting the trailing comma in this would lead to a conflict with IntelliJ IDEA. As of that it can not be fixed in KtLint for now (see #1526). |
I feel like this is an IntelliJ bug. Filed https://youtrack.jetbrains.com/issue/KTIJ-23068/ijkotlinallowtrailingcommaoncallsite-adds-extraneous-comma-after-lambda |
I do agree with you that this is a bug on the IntelliJ side. Tnx for creating the bug there and copy the reference here. |
Resolved by #1648 in version |
ktlint 0.46.1
Rules:
Input:
Actual output:
Expected output:
No change from input.
The text was updated successfully, but these errors were encountered: