Add JSDoc generation from C# XML documentation comments#78
Add JSDoc generation from C# XML documentation comments#78ArcadeMode merged 21 commits intomasterfrom
Conversation
Co-authored-by: ArcadeMode <5969155+ArcadeMode@users.noreply.github.com>
Co-authored-by: ArcadeMode <5969155+ArcadeMode@users.noreply.github.com>
Co-authored-by: ArcadeMode <5969155+ArcadeMode@users.noreply.github.com>
… endings Co-authored-by: ArcadeMode <5969155+ArcadeMode@users.noreply.github.com>
Co-authored-by: ArcadeMode <5969155+ArcadeMode@users.noreply.github.com>
Co-authored-by: ArcadeMode <5969155+ArcadeMode@users.noreply.github.com>
ArcadeMode
left a comment
There was a problem hiding this comment.
Add a new class with tests to the generator.tests project that demonstrate various comments with different contents
…class Co-authored-by: ArcadeMode <5969155+ArcadeMode@users.noreply.github.com>
Added a comprehensive test in commit a46561b that demonstrates a Calculator class with various comment types including:
The test validates all JSDoc features working together in a single realistic example. All 12 JSDoc tests pass. |
ArcadeMode
left a comment
There was a problem hiding this comment.
Remove the last added test (the comprehensive one) the rest is fine. Then change the new renderer to not use interpolation expressions, instead chain append and appendline calls on the render context to not cause unnecessary intermediate string allocations
Do add tests for rendering with other tags like bold and italics. Also show the inner tag parsing inside throws returns and params
… tests Co-authored-by: ArcadeMode <5969155+ArcadeMode@users.noreply.github.com>
Changes completed in commit 00f462c:
All 503 tests pass. |
ArcadeMode
left a comment
There was a problem hiding this comment.
Add tests for comments with list and paramref. Also for exceptions without namespaces.
Finally also check how it processes missing closing tags for param bold and summary
…d XML Co-authored-by: ArcadeMode <5969155+ArcadeMode@users.noreply.github.com>
ArcadeMode
left a comment
There was a problem hiding this comment.
Improve the code quality by adressing my review comments
Co-authored-by: ArcadeMode <5969155+ArcadeMode@users.noreply.github.com>
Addressed all code review comments in commit c144f81: Code quality improvements:
New tests:
All 525 tests pass (1 skipped). |
…pressions, rename method Co-authored-by: ArcadeMode <5969155+ArcadeMode@users.noreply.github.com>
All review points addressed in commit 0273061:
All 525 tests pass (1 skipped). |
Co-authored-by: ArcadeMode <5969155+ArcadeMode@users.noreply.github.com>
Co-authored-by: ArcadeMode <5969155+ArcadeMode@users.noreply.github.com>
|
~300 lines of actual code, 2k are tests |
JSDoc Generation from C# XML Comments
Implementation Complete ✅
All tasks completed successfully:
<b>) and italic (<i>) tags<example>tag (treated like<c>and<code>)<br>tag for line breaks<br>inside<b>,<c>, and list tags<list>tags with various structures (spread over multiple lines)<br>tag before them<paramref>tags!:prefix automatically removedN1.OuterClass.InnerClass)seetags now keep full type pathFeatures Implemented
XML Comment Parsing:
<summary>,<remarks>,<param>,<returns>,<exception>tags<c>→ backticks,<paramref>→ backticks,<see>→ backticks<see>tags now preserve full type path including namespace for clarity and correctness<example>→ backticks (treated like code tags)<b>→**bold**and<i>→*italic*<br>→ single line break usingEnvironment.NewLine<list>tags with<item>,<term>,<description>, and<listheader>elements!:prefix from Roslyn error references<param>tags<exception>tagsJSDoc Generation:
ctx.Append().AppendLine()calls to avoid string allocationsEnvironment.NewLineconsistently throughout for cross-platform compatibility@param,@returns, and@throwstags!:prefix automatically removed for cleaner outputTest Coverage:
Code Quality
IsEmpty()method now on CommentInfo class (proper encapsulation)ExtractTypeFromCref,RenderListItem)ProcessInnerTagstoProcessFormatTagsfor better semantic clarityGetReferenceText- removed flawed namespace stripping logicEnvironment.NewLinefor cross-platform compatibility<br>,<list>, and list items create line breaksOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.