-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Fix invalid characters in generated XML docs #607
base: main
Are you sure you want to change the base?
Conversation
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #607 +/- ##
==========================================
+ Coverage 95.10% 98.97% +3.87%
==========================================
Files 54 55 +1
Lines 2716 2639 -77
==========================================
+ Hits 2583 2612 +29
+ Misses 99 4 -95
+ Partials 34 23 -11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This resolves #605
This pull request introduces several changes aimed at improving XML documentation generation and ensuring that symbols in descriptions are properly escaped. Additionally, it includes updates to the project files to generate documentation files and adds new tests to verify these changes.
Improvements to XML documentation generation:
src/Refitter.Core/XmlDocumentationGenerator.cs
: Added a new private methodEscapeSymbols
to properly escape<
and>
symbols in method summaries and remarks. UpdatedAppendMethodDocumentation
to useEscapeSymbols
for method summaries and remarks. [1] [2]Updates to project files:
src/Refitter.SourceGenerator/Refitter.SourceGenerator.csproj
: Enabled the generation of documentation files by setting<GenerateDocumentationFile>true</GenerateDocumentationFile>
.src/Refitter.Tests/Build/ProjectFileContents.cs
: Enabled the generation of documentation files by setting<GenerateDocumentationFile>true</GenerateDocumentationFile>
.New tests to verify changes:
src/Refitter.Tests/Examples/SymbolsInDescriptionTests.cs
: Added a new test classSymbolsInDescriptionTests
with tests to ensure that symbols in descriptions are properly escaped and that the generated code can be built successfully.Additional minor changes:
src/Refitter.Core/Settings/RefitGeneratorSettings.cs
: Added a missing closing tag in the XML documentation for theContractsNamespace
property.src/Refitter.SourceGenerator.Tests/CustomGenerated/CustomGenerated.cs
: Updated XML documentation remarks to use escaped symbols for<
and>
. [1] [2]