Add missing XML documentation for Microsoft.Extensions.FileSystemGlobbing APIs#125447
Add missing XML documentation for Microsoft.Extensions.FileSystemGlobbing APIs#125447
Conversation
…bing APIs Co-authored-by: svick <287848+svick@users.noreply.github.com>
…temGlobbing Co-authored-by: svick <287848+svick@users.noreply.github.com>
|
cc: @carlossanlop, in case you're still interested |
There was a problem hiding this comment.
Pull request overview
This PR addresses API documentation debt in Microsoft.Extensions.FileSystemGlobbing by adding/fixing XML documentation comments so the public surface is correctly described in generated docs.
Changes:
- Add missing type/ctor XML docs and standardize constructor summaries across key globbing and abstraction types.
- Fix incorrect/low-quality XML docs (e.g.,
GetHashCode()<returns>,FileInfoWrapper.FullNameremarks, property “Gets…” wording). - Add documented
protectedconstructors to the abstraction base types to ensure constructors are properly documented.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/PatternMatchingResult.cs | Updates constructor XML summaries (but exposes an existing null-handling bug in the 1-arg ctor). |
| src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/MatcherExtensions.cs | Adds missing <summary> for the extensions class. |
| src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Matcher.cs | Standardizes constructor summaries to “Initializes a new instance…”. |
| src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/InMemoryDirectoryInfo.cs | Standardizes constructor summaries (incl. case-sensitivity wording). |
| src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/FilePatternMatch.cs | Fixes ctor summary and improves GetHashCode() documentation. |
| src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/FileSystemInfoBase.cs | Adds documented protected ctor; updates property summaries to “Gets…”. |
| src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/FileInfoWrapper.cs | Fixes ctor summary and corrects FullName remarks to reference FileSystemInfo.FullName. |
| src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/FileInfoBase.cs | Adds documented protected ctor. |
| src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/DirectoryInfoWrapper.cs | Standardizes ctor summary. |
| src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/DirectoryInfoBase.cs | Adds documented protected ctor. |
Comments suppressed due to low confidence (1)
src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/PatternMatchingResult.cs:22
PatternMatchingResult(IEnumerable<FilePatternMatch> files)callsfiles.Any()before any null validation, so passing null will throw aNullReferenceExceptionrather than theArgumentNullExceptionenforced by the other constructor. Consider validatingfilesbefore computinghasMatches, and you can also drop the redundantFiles = files;assignment since the chained constructor already sets it.
public PatternMatchingResult(IEnumerable<FilePatternMatch> files)
: this(files, hasMatches: files.Any())
{
Files = files;
|
Is there any real value? I think we do not need comment that constructor on X creates instance of X and similar. |
src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/InMemoryDirectoryInfo.cs
Outdated
Show resolved
Hide resolved
|
@mrek-msft I think the value is mostly consistency. Empty documentation looks like we forgot to document it. |
src/libraries/Microsoft.Extensions.FileSystemGlobbing/src/Abstractions/DirectoryInfoBase.cs
Show resolved
Hide resolved
|
/ba-g This PR is only changing documentation, the iOS test failures are unrelated. |
Fixes #43908.
<summary>XML documentation toMatcherExtensionsclassFilePatternMatch.GetHashCode()<returns>tagprotectedconstructor with doc toFileSystemInfoBaseprotectedconstructor with doc toFileInfoBaseprotectedconstructor with doc toDirectoryInfoBaseFileSystemInfoBaseto follow "Gets..." patternDirectoryInfoWrapper,FileInfoWrapper,PatternMatchingResultto follow guidelinesFileInfoWrapper.FullNameremarks (incorrectly referencedFileSystemInfo.Name, nowFileSystemInfo.FullName)Original prompt
This section details on the original issue you should resolve
<issue_title>API documentation debt - Microsoft.Extensions.FileSystemGlobbing</issue_title>
<issue_description>Area owners: @maryamariyan @carlossanlop @jozkee
The APIs in the list below are missing some or all of their documentation. Please add the missing documentation directly in triple slash comments in source. We will make sure it gets ported to dotnet-api-docs after it's merged.
Make sure to follow the documentation guidelines defined in the dotnet-api-docs wiki:
https://github.com/dotnet/dotnet-api-docs/wiki
Also please add me as a PR reviewer.
Community contributions are welcome.
Microsoft.Extensions.FileSystemGlobbing
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.