Skip to content

Fix invalid CodeDom comment generation when a new line starts with a slash #56640

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
merged 7 commits into from
Aug 9, 2021

Conversation

jnm2
Copy link
Contributor

@jnm2 jnm2 commented Jul 30, 2021

Fixes #56267

@danmoseley
Copy link
Member

Test failure is #56649

@danmoseley
Copy link
Member

LGTM, could you please change to SkipOnTargetFrameworks as suggested?

@jnm2
Copy link
Contributor Author

jnm2 commented Jul 30, 2021

@danmoseley I just realized there's no need to insert a space when generating an ordinary comment (e.g. //) and the line starts with more than one forward slash (resulting in ////. Shall I update?

@danmoseley
Copy link
Member

Up to you as long as there's tests 🙂

@jnm2 jnm2 force-pushed the invalid_comment_generation branch from 8a28709 to e8a9331 Compare August 2, 2021 04:06
@jnm2
Copy link
Contributor Author

jnm2 commented Aug 2, 2021

@danmoseley I noticed that the filename wasn't updated to StringExtensions.cs, so I did that and squashed into my last commit which introduced the file.

@danmoseley
Copy link
Member

Oops thanks

@jnm2 jnm2 force-pushed the invalid_comment_generation branch from 546fcb3 to e590303 Compare August 8, 2021 21:35
@jnm2
Copy link
Contributor Author

jnm2 commented Aug 8, 2021

GitHub showed that conflicts with main arose in the last week. I used a force push to fix this since no one has reviewed yet.

@danmoseley
Copy link
Member

Unrelated failures. Thanks for the fix @jnm2 !

@danmoseley danmoseley merged commit 7a799ce into dotnet:main Aug 9, 2021
@jnm2 jnm2 deleted the invalid_comment_generation branch August 9, 2021 03:32
@ghost ghost locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CodeDom creates invalid C# line starting with //// when a slash follows a newline in CodeComment.Text, causing warnings in Resources.Designer.cs files
3 participants