Skip to content

Add missing XML documentation for Microsoft.Extensions.FileSystemGlobbing APIs#125447

Merged
svick merged 4 commits intomainfrom
copilot/add-api-documentation-globbing
Mar 17, 2026
Merged

Add missing XML documentation for Microsoft.Extensions.FileSystemGlobbing APIs#125447
svick merged 4 commits intomainfrom
copilot/add-api-documentation-globbing

Conversation

Copy link
Contributor

Copilot AI commented Mar 11, 2026

Fixes #43908.

  • Add <summary> XML documentation to MatcherExtensions class
  • Fix FilePatternMatch.GetHashCode() <returns> tag
  • Fix constructor summaries to follow guidelines in FilePatternMatch, Matcher, InMemoryDirectoryInfo
  • Add protected constructor with doc to FileSystemInfoBase
  • Add protected constructor with doc to FileInfoBase
  • Add protected constructor with doc to DirectoryInfoBase
  • Fix property summaries in FileSystemInfoBase to follow "Gets..." pattern
  • Fix constructor summaries in DirectoryInfoWrapper, FileInfoWrapper, PatternMatchingResult to follow guidelines
  • Fix FileInfoWrapper.FullName remarks (incorrectly referenced FileSystemInfo.Name, now FileSystemInfo.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
DocId Summary Parameters TypeParameters ReturnValue Source File Path Docs URL
Microsoft.Extensions.FileSystemGlobbing namespace Missing NA NA NA https://github.com/dotnet/dotnet-api-docs/blob/master/xml/ns-Microsoft.Extensions.FileSystemGlobbing.xml https://review.docs.microsoft.com/en-us/dotnet/api/Microsoft.Extensions.FileSystemGlobbing?branch=master
Microsoft.Extensions.FileSystemGlobbing.Abstractions namespace Missing NA NA NA https://github.com/dotnet/dotnet-api-docs/blob/master/xml/ns-Microsoft.Extensions.FileSystemGlobbing.Abstractions.xml https://review.docs.microsoft.com/en-us/dotnet/api/Microsoft.Extensions.FileSystemGlobbing.Abstractions?branch=master
M:Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase.#ctor Missing NA NA NA https://github.com/dotnet/dotnet-api-docs/blob/master/xml/Microsoft.Extensions.FileSystemGlobbing.Abstractions/DirectoryInfoBase.xml https://review.docs.microsoft.com/en-us/dotnet/api/Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase.-ctor?branch=master
M:Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoWrapper.EnumerateFileSystemInfos Missing NA NA Missing https://github.com/dotnet/dotnet-api-docs/blob/master/xml/Microsoft.Extensions.FileSystemGlobbing.Abstractions/DirectoryInfoWrapper.xml https://review.docs.microsoft.com/en-us/dotnet/api/Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoWrapper.EnumerateFileSystemInfos?branch=master
M:Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoWrapper.GetFile(System.String) Missing Missing NA Missing https://github.com/dotnet/dotnet-api-docs/blob/master/xml/Microsoft.Extensions.FileSystemGlobbing.Abstractions/DirectoryInfoWrapper.xml https://review.docs.microsoft.com/en-us/dotnet/api/Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoWrapper.GetFile?branch=master
M:Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileInfoBase.#ctor Missing NA NA NA https://github.com/dotnet/dotnet-api-docs/blob/master/xml/Microsoft.Extensions.FileSystemGlobbing.Abstractions/FileInfoBase.xml https://review.docs.microsoft.com/en-us/dotnet/api/Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileInfoBase.-ctor?branch=master
M:Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileSystemInfoBase.#ctor Missing NA NA NA https://github.com/dotnet/dotnet-api-docs/blob/master/xml/Microsoft.Extensions.FileSystemGlobbing.Abstractions/FileSystemInfoBase.xml https://review.docs.microsoft.com/en-us/dotnet/api/Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileSystemInfoBase.-ctor?branch=master
M:Microsoft.Extensions.FileSystemGlobbing.InMemoryDirectoryInfo.EnumerateFileSystemInfos Missing NA NA Missing https://github.com/dotnet/dotnet-api-docs/blob/master/xml/Microsoft.Extensions.FileSystemGlobbing/InMemoryDirectoryInfo.xml https://review.docs.microsoft.com/en-us/dotnet/api/Microsoft.Extensions.FileSystemGlobbing.InMemoryDirectoryInfo.EnumerateFileSystemInfos?branch=master
M:Microsoft.Extensions.FileSystemGlobbing.InMemoryDirectoryInfo.GetDirectory(System.String) Missing Missing NA Missing https://github.com/dotnet/dotnet-api-docs/blob/master/xml/Microsoft.Extensions.FileSystemGlobbing/InMemoryDirectoryInfo.xml https://review.docs.microsoft.com/en-us/dotnet/api/Microsoft.Extensions.FileSystemGlobbing.InMemoryDirectoryInfo.GetDirectory?branch=master
P:Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoWrapper.Name Missing NA NA NA https://github.com/dotnet/dotnet-api-docs/blob/master/xml/Microsoft.Extensions.FileSystemGlobbing.Abstractions/DirectoryInfoWrapper.xml https://review.docs.microsoft.com/en-us/dotnet/api/Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoWrapper.Name?branch=master
P:Microsoft.Extensions.FileSystemGlobbing.InMemoryDirectoryInfo.FullName Missing NA NA NA https://github.com/dotnet/dotnet-api-docs/blob/master/xml/Microsoft.Extensions.FileSystemGlobbing/InMemoryDirectoryInfo.xml https://review.docs.microsoft.com/en-us/dotnet/api/Micro...

🔒 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.

…bing APIs

Co-authored-by: svick <287848+svick@users.noreply.github.com>
Copilot AI changed the title [WIP] Add missing API documentation for FileSystemGlobbing Add missing XML documentation for Microsoft.Extensions.FileSystemGlobbing APIs Mar 11, 2026
…temGlobbing

Co-authored-by: svick <287848+svick@users.noreply.github.com>
@svick svick marked this pull request as ready for review March 11, 2026 15:33
Copilot AI review requested due to automatic review settings March 11, 2026 15:33
@svick
Copy link
Member

svick commented Mar 11, 2026

cc: @carlossanlop, in case you're still interested

Copy link
Contributor

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 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.FullName remarks, property “Gets…” wording).
  • Add documented protected constructors 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) calls files.Any() before any null validation, so passing null will throw a NullReferenceException rather than the ArgumentNullException enforced by the other constructor. Consider validating files before computing hasMatches, and you can also drop the redundant Files = files; assignment since the chained constructor already sets it.
        public PatternMatchingResult(IEnumerable<FilePatternMatch> files)
            : this(files, hasMatches: files.Any())
        {
            Files = files;

@mrek-msft
Copy link
Member

Is there any real value? I think we do not need comment that constructor on X creates instance of X and similar.

@svick
Copy link
Member

svick commented Mar 16, 2026

@mrek-msft I think the value is mostly consistency. Empty documentation looks like we forgot to document it.

@svick
Copy link
Member

svick commented Mar 17, 2026

/ba-g This PR is only changing documentation, the iOS test failures are unrelated.

@svick svick merged commit 31aee70 into main Mar 17, 2026
84 of 90 checks passed
@svick svick deleted the copilot/add-api-documentation-globbing branch March 17, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API documentation debt - Microsoft.Extensions.FileSystemGlobbing

5 participants