Skip to content

Conversation

@vbreuss
Copy link
Contributor

@vbreuss vbreuss commented Jan 16, 2026

This PR fixes XML documentation generation for generic types by ensuring proper XML escaping of type parameters in generated documentation comments.

Key Changes:

  • Added .EscapeForXmlDoc() calls to generic type parameters in method/delegate signatures within XML documentation
  • Added test case to verify mocking of protected virtual members

@vbreuss vbreuss self-assigned this Jan 16, 2026
Copilot AI review requested due to automatic review settings January 16, 2026 18:22
@vbreuss vbreuss added the bug Something isn't working label Jan 16, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes XML documentation generation for generic types by ensuring proper XML escaping of type parameters in generated documentation comments.

Changes:

  • Added .EscapeForXmlDoc() calls to generic type parameters in method/delegate signatures within XML documentation
  • Added test case to verify mocking of protected virtual members

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
Source/Mockolate.SourceGenerators/Sources/Sources.ForMock.Extensions.cs Applied XML escaping to generic type parameters in four locations where method/delegate parameter types appear in XML doc comments
Tests/Mockolate.Tests/Protected/ProtectedMockTests.cs Added test case for mocking classes with only protected virtual members

@vbreuss vbreuss enabled auto-merge (squash) January 16, 2026 18:23
@github-actions
Copy link

github-actions bot commented Jan 16, 2026

Test Results

    14 files  ±0      14 suites  ±0   5m 42s ⏱️ +27s
 2 166 tests +1   2 165 ✅ +1  1 💤 ±0  0 ❌ ±0 
14 497 runs  +7  14 496 ✅ +7  1 💤 ±0  0 ❌ ±0 

Results for commit ad27a1d. ± Comparison against base commit ecb3045.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Jan 16, 2026

🚀 Benchmark Results

Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.102
[Host] : .NET 10.0.2 (10.0.2, 10.0.225.61305), X64 RyuJIT x86-64-v3

Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15
LaunchCount=1 WarmupCount=10

Method Mean Error StdDev Gen0 Gen1 Allocated
Simple_Mockolate 1.545 μs 0.0093 μs 0.0082 μs 0.2270 - 3.72 KB
Simple_Moq 178.600 μs 0.5448 μs 0.4550 μs 0.4883 - 14.77 KB
Simple_NSubstitute 5.638 μs 0.0098 μs 0.0082 μs 0.5569 0.0076 9.14 KB
Simple_FakeItEasy 6.569 μs 0.0515 μs 0.0482 μs 0.4959 - 8.11 KB

@vbreuss vbreuss force-pushed the topic/correctly-escape-types-in-xmldoc branch from ce8a9a7 to ad27a1d Compare January 17, 2026 16:00
@sonarqubecloud
Copy link

@vbreuss vbreuss merged commit 6ab7f04 into main Jan 17, 2026
12 checks passed
@vbreuss vbreuss deleted the topic/correctly-escape-types-in-xmldoc branch January 17, 2026 16:09
@github-actions
Copy link

This is addressed in release v0.52.0.

@github-actions github-actions bot added the state: released The issue is released label Jan 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working state: released The issue is released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants