Skip to content

Deduplicate XML documentation comments using inheritdoc cref - #960

Merged
Tyrrrz merged 1 commit into
primefrom
copilot/audit-refactor-xml-docs
Jul 28, 2026
Merged

Deduplicate XML documentation comments using inheritdoc cref#960
Tyrrrz merged 1 commit into
primefrom
copilot/audit-refactor-xml-docs

Conversation

Copilot AI commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Audit of XML doc comments revealed multiple groups of semantically duplicate <summary> blocks across sibling/overload symbols. All duplicates are replaced with <inheritdoc cref="…"/> pointing to the canonical member.

Groups deduplicated

  • operator != ("Equality check.") × 11 typesChannelId, VideoId, PlaylistId, ChannelHandle, ChannelSlug, UserName, Bitrate, FileSize, VideoQuality, Resolution, Container

    • Canonical: operator ==(T, T) in each type
  • operator < ("Comparison.") × 3 typesBitrate, FileSize, VideoQuality

    • Canonical: operator >(T, T) in each type
  • SearchClient.GetResultBatchesAsync 2-param overload

    • Canonical: GetResultBatchesAsync(string, SearchFilter, CancellationToken)
  • ConversionRequestBuilder.SetContainer(string) / SetFormat(string)

    • Canonicals: SetContainer(Container) / SetFormat(ConversionFormat)

Pattern applied

All replacements use explicit cref (sibling/overload context — no bare <inheritdoc/>):

// Before
/// <summary>Equality check.</summary>
public static bool operator !=(ChannelId left, ChannelId right) => !(left == right);

// After
/// <inheritdoc cref="operator ==(ChannelId, ChannelId)" />
public static bool operator !=(ChannelId left, ChannelId right) => !(left == right);

Not changed

ConversionExtensions.DownloadAsync(VideoId, string, …) overloads — these share a near-duplicate summary but each carries distinct <remarks>, and Roslyn cannot resolve a cref to a sibling method inside a C# 14 extension(VideoClient) block.

Copilot AI requested a review from Tyrrrz July 27, 2026 23:16
@Tyrrrz
Tyrrrz marked this pull request as ready for review July 28, 2026 07:53
Copilot AI review requested due to automatic review settings July 28, 2026 07:53
@Tyrrrz
Tyrrrz merged commit e6b2b89 into prime Jul 28, 2026
8 checks passed
@Tyrrrz
Tyrrrz deleted the copilot/audit-refactor-xml-docs branch July 28, 2026 07:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 reduces duplication in the library’s XML documentation by replacing repeated <summary> blocks on overloads/sibling members with <inheritdoc cref="…"/>, pointing at a single canonical member per group.

Changes:

  • Replaced duplicated operator != XML docs across multiple ID/value types with <inheritdoc cref="…"/>.
  • Replaced duplicated operator < XML docs in comparable value types with <inheritdoc cref="…"/>.
  • Switched select overload summaries in SearchClient and ConversionRequestBuilder to use <inheritdoc cref="…"/>.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
YoutubeExplode/Videos/VideoId.cs Replaces operator != summary with <inheritdoc cref="…"/>.
YoutubeExplode/Videos/Streams/VideoQuality.cs Deduplicates != and < operator docs via <inheritdoc cref="…"/>.
YoutubeExplode/Videos/Streams/FileSize.cs Deduplicates != and < operator docs via <inheritdoc cref="…"/>.
YoutubeExplode/Videos/Streams/Container.cs Replaces operator != summary with <inheritdoc cref="…"/>.
YoutubeExplode/Videos/Streams/Bitrate.cs Deduplicates != and < operator docs via <inheritdoc cref="…"/>.
YoutubeExplode/Search/SearchClient.cs Uses <inheritdoc cref="…"/> for the 2-parameter GetResultBatchesAsync overload.
YoutubeExplode/Playlists/PlaylistId.cs Replaces operator != summary with <inheritdoc cref="…"/>.
YoutubeExplode/Common/Resolution.cs Replaces operator != summary with <inheritdoc cref="…"/>.
YoutubeExplode/Channels/UserName.cs Replaces operator != summary with <inheritdoc cref="…"/>.
YoutubeExplode/Channels/ChannelSlug.cs Replaces operator != summary with <inheritdoc cref="…"/>.
YoutubeExplode/Channels/ChannelId.cs Replaces operator != summary with <inheritdoc cref="…"/>.
YoutubeExplode/Channels/ChannelHandle.cs Replaces operator != summary with <inheritdoc cref="…"/>.
YoutubeExplode.Converter/ConversionRequestBuilder.cs Uses <inheritdoc cref="…"/> for SetContainer(string) and SetFormat(string) overloads.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

/// <summary>
/// Equality check.
/// </summary>
/// <inheritdoc cref="operator ==(VideoId, VideoId)" />
/// <summary>
/// Equality check.
/// </summary>
/// <inheritdoc cref="operator ==(VideoQuality, VideoQuality)" />
/// <summary>
/// Comparison.
/// </summary>
/// <inheritdoc cref="operator >(VideoQuality, VideoQuality)" />
/// <summary>
/// Equality check.
/// </summary>
/// <inheritdoc cref="operator ==(FileSize, FileSize)" />
/// <summary>
/// Comparison.
/// </summary>
/// <inheritdoc cref="operator >(FileSize, FileSize)" />
/// <summary>
/// Equality check.
/// </summary>
/// <inheritdoc cref="operator ==(Resolution, Resolution)" />
/// <summary>
/// Equality check.
/// </summary>
/// <inheritdoc cref="operator ==(UserName, UserName)" />
/// <summary>
/// Equality check.
/// </summary>
/// <inheritdoc cref="operator ==(ChannelSlug, ChannelSlug)" />
/// <summary>
/// Equality check.
/// </summary>
/// <inheritdoc cref="operator ==(ChannelId, ChannelId)" />
/// <summary>
/// Equality check.
/// </summary>
/// <inheritdoc cref="operator ==(ChannelHandle, ChannelHandle)" />
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.

3 participants