Repository navigation
Give every Razor component a type summary, and check it - #448
Merged
Merged
Conversation
The Razor generator turns CS1591 off in the code it generates, so a component without a summary built cleanly and shipped with no IntelliSense text. Each public component of the MudBlazor, Fluent UI and shared Blazor packages now has a .razor.cs with its summary, pointing to the base type that holds its behavior. TypeDocCoverage compares an assembly's public types with its built documentation file; a gate in each Blazor package's unit test project uses it. check-xmldoc-refs.sh also reads the /// lines of .razor files.
…k, and keep each cref on one line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #441
The Razor generator starts each generated file with
#pragma warning disable 1591, so a public component without a type summary built cleanly and shipped with no IntelliSense text. Most components of the MudBlazor and Fluent UI packages had none.Polhem.Web.Blazor.Mud,Polhem.Web.Blazor.FluentandPolhem.Web.Blazorgets a<Name>.razor.csholdingpublic partial class <Name>with its summary. A component that draws a shared base type points to that base with<see cref>rather than repeating its behavior.TypeDocCoverage(tests/Polhem.Tests.Shared) compares an assembly's public types in its own namespace with the type entries of its built documentation file, leaving out the classes Razor generates for_Imports.razor. A*TypeDocGateTestsin the unit test projects ofPolhem.Web.Blazor,.Mud,.Fluentand.Serveruses it; each anchors on a known component so it cannot pass with nothing checked.check-xmldoc-refs.shalso reads.razorfiles: their///lines for<c>in both directions, and the rest as part of the code corpus..claude/rules/blazor.mdsays where a component's summary goes and which tests enforce it.Verified locally: the gates were red before the summaries and are green after, also under
--collect:"XPlat Code Coverage"; the four Blazor unit test projects pass;check-xmldoc-refs.shreports a planted<c>in a.razorfile both ways; clean Release build. CI: lite.