Skip to content

[Repo Assist] Regression test for lambda with MultiLineLambdaClosingNewline (#2553)#3228

Merged
nojaf merged 1 commit into
mainfrom
repo-assist/fix-issue-2553-lambda-closing-paren-7979fe1da3c62a56
Feb 27, 2026
Merged

[Repo Assist] Regression test for lambda with MultiLineLambdaClosingNewline (#2553)#3228
nojaf merged 1 commit into
mainfrom
repo-assist/fix-issue-2553-lambda-closing-paren-7979fe1da3c62a56

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

🤖 This is an automated PR from Repo Assist.

Closes #2553

Summary

Adds a regression test for the formatting bug reported in #2553, where a lambda expression inside a chained method call (e.g. .Setup(fun ... -> <@ ... @>)) was formatted with the closing ) incorrectly placed on its own line in an awkward position when MultiLineLambdaClosingNewline = true and MaxLineLength = 100.

Root Cause

When the lambda body (a quotation expression <@ ... @>) caused the enclosing line to exceed MaxLineLength, the formatter was placing the closing ) on a separate line rather than properly wrapping the lambda body to a new line under the fun arrow.

Current Behaviour (Fixed)

The formatter now correctly wraps the lambda body to a new indented line:

Mock()
    .Setup(fun aaaaaaaaaaaa ->
        <@ aaaaaaaaaaaa.Abcdefghijklmnopqrs "Food" "IsTastier" @>
    )
    .Returns(false)
    .Create()

Test Status

✅ New regression test passes: closing parenthesis of lambda in chained call should not be placed on own line, 2553

Generated by Repo Assist for issue #2553

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@afb00b92a9514fee9a14c583f059a03d05738f70

…sue 2553

Closes #2553

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@nojaf

nojaf commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

/repo-assist add a changelog entry for this as well

@nojaf nojaf marked this pull request as ready for review February 26, 2026 15:45
@nojaf nojaf merged commit 4c5e72e into main Feb 27, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lambda with MultiLineLambdaClosingNewline is split weirdly

1 participant