Skip to content
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

Keep comments when removing unnecessary lambda expressions #76015

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

CyrusNajmabadi
Copy link
Member

Fixes #71300

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner November 22, 2024 00:35
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Nov 22, 2024
@dibarbet
Copy link
Member

Fixes #71300

Is 71300 the right issue? Seems already closed and not related

if (lastIndex < triviaList.Count && triviaList[lastIndex].IsEndOfLine())
lastIndex++;

return triviaList.Take(lastIndex);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't quite get why we need this filtering at a glance - mind adding a comment on it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like its trying to get all the trivia up to the last comment and new line - but not sure why we aren't taking all the trivia?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the idea is that we want to grab up through the last comment and the newline that follows and only move those over if it exists. we don't want to generally move things like when the user only has blank lines above the inner call. i will doc :)

@drewnoakes
Copy link
Member

Fixes #71300

Is 71300 the right issue? Seems already closed and not related

Should be #60741

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead VSCode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IDE0200 is not reported in .NET 8 but works in .NET 7 for injected dependencies
4 participants