-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Fix incorrect codespit of xml doc comments #76108
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
Conversation
@ToddGrun ptal |
namespace N | ||
{ | ||
/// foo | ||
/// $$ |
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.
As I can see from the written test, the expected behaviour is going to be that it generated another broken xml-doc line, assuming it is already in a valid state given the "///", instead of checking for a proper summary-wrapped xml doc?
We already have an analyzer/code-completion that turns
/// Bla
class C { }
into
/// <summary>
/// Bla
/// </summary>
class C { }
if we remove and re-add one of the slashes in the line.
However, if we have two lines within our broken summary, like so
/// Bla
/// Bla Bla
class C { }
removing and re-adding one of the slashes will turn it into a half-fixed summary block
/// <summary>
/// Bla
/// </summary>
/// Bla Bla
class C { }
This could make sense, if the lower summary xml docs were wrapped in other / already existing xml doc tags, but they are not, thus they should always belong to the upper generated summary xml.
Those are some of my thoughts on the behaviour, and why I dont think this fix necessarily fixes the underlying issue completely
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.
I'm fixing the issue where the code spit is utterly wrong, duplicating code improperly.
You're welcome to submit other behavioral changes.
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.
Fixes #75838