-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Add tests demonstrating lambda comment formatting issue is fixed #81209
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
Merged
CyrusNajmabadi
merged 6 commits into
main
from
copilot/add-formatting-tests-issue-15-5-7
Nov 13, 2025
Merged
Add tests demonstrating lambda comment formatting issue is fixed #81209
CyrusNajmabadi
merged 6 commits into
main
from
copilot/add-formatting-tests-issue-15-5-7
Nov 13, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: CyrusNajmabadi <4564579+CyrusNajmabadi@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add formatting tests for inconsistent comment indentation issue
Add tests demonstrating lambda comment formatting issue is fixed
Nov 13, 2025
Copilot finished work on behalf of
CyrusNajmabadi
November 13, 2025 15:26
| } | ||
| """); | ||
|
|
||
| [Fact, WorkItem("https://github.com/dotnet/roslyn/issues/22713")] |
Member
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: CyrusNajmabadi <4564579+CyrusNajmabadi@users.noreply.github.com>
Copilot finished work on behalf of
CyrusNajmabadi
November 13, 2025 15:49
JoeRobich
approved these changes
Nov 13, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Testing lambda formatting with comments (Issue #25010)
Comprehensive tests to verify that the formatting issue with comments in lambda expressions has been resolved:
Summary
The issue described in #25010 has been fixed. The tests demonstrate that:
Test Details
Three new tests were added to
FormattingTests.cs:LambdaWithCommentAndStatement- Tests the exact scenario from issue Reformatting does not consistently indent comment and succeeding statement #25010LambdaWithMultipleCommentsAndStatements- Tests lambdas with multiple statements and commentsIfStatementWithCommentNotAffected- Control test showing if-statements work correctlyAll tests verify that when code with improper indentation is formatted, the output has consistent and correct indentation for both comments and statements within lambda expressions.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.