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

Remove trailing trivia from IHeaderDictionary in "Use indexer" code fix #57649

Merged

Conversation

david-acker
Copy link
Member

Remove trailing trivia from IHeaderDictionary in "Use indexer" code fix

Description

Updates the "Use indexer" code fix for ASP0019 to remove trailing trivia from IHeaderDictionary to prevent formatting issues.

Fixes #57648

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions label Sep 2, 2024
@dotnet-policy-service dotnet-policy-service bot added area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework community-contribution Indicates that the PR has been added by a community member labels Sep 2, 2024
Copy link
Member

@captainsafia captainsafia left a comment

Choose a reason for hiding this comment

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

LGTM!

It seems like it's prudent to generally call WithoutTrailingTrivia() when using a pre-existing node in the SyntaxFactory? Wonder if there is an analyzer for this? 🤔

@captainsafia captainsafia merged commit f22b350 into dotnet:main Sep 5, 2024
27 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0-preview1 milestone Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ASP0019: Trailing trivia after IHeaderDictionary causes formatting issues with "Use indexer" code fix
2 participants