Skip to content

Add XML documentation comments to public APIs#36

Merged
rickbutterfield merged 4 commits intov2/devfrom
copilot/add-xml-comments-to-services
Nov 21, 2025
Merged

Add XML documentation comments to public APIs#36
rickbutterfield merged 4 commits intov2/devfrom
copilot/add-xml-comments-to-services

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 21, 2025

Adds missing XML documentation comments to resolve CS1591 warnings for publicly visible types and members. Documentation follows the pattern of defining comments on interfaces and using <inheritdoc /> in implementations.

Changes

Service Interfaces

  • IAuditService, IEmissionsService, ICrawlService - Added method and parameter documentation
  • IAuditIssue, IAuditPageIssue, IAuditImageIssue - Added property and method documentation

Service Implementations

  • AuditService, EmissionsService, CrawlService - Applied <inheritdoc /> pattern
  • Fixed CS1572 warning in EmissionsService by removing non-existent version parameter

Audit Issues

  • All 11 implementations now use <inheritdoc /> for interface members

Schema Classes

  • TechnicalSeoSchema, SocialMediaSchema, SeoSchema, PageSchema - Added class-level and property documentation
  • Options (SchemaGenerator) - Added documentation

Example

/// <summary>
/// Service for calculating carbon emissions and energy consumption of web pages
/// </summary>
public interface IEmissionsService
{
    /// <summary>
    /// Calculate carbon emissions per byte of data transfer
    /// </summary>
    /// <param name="bytes">Number of bytes transferred</param>
    /// <param name="green">Whether the hosting uses green energy</param>
    EmissionResult PerByte(double bytes, bool green = false);
}

/// <inheritdoc />
public class EmissionsService : IEmissionsService
{
    /// <inheritdoc />
    public EmissionResult PerByte(double bytes, bool green = false) { ... }
}

Note: Generated files (*.generated.cs) remain undocumented per requirements.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • www.myget.org
    • Triggering command: /usr/bin/dotnet dotnet build (dns block)
    • Triggering command: /usr/bin/dotnet dotnet run --configuration Debug -- --outputFile /home/REDACTED/work/ContentAudit/ContentAudit/src/Umbraco.Community.ContentAudit/appsettings-schema.ContentAudit.json (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Run a dotnet build and check all the warnings for missing XML comments. Add comments where appropriate, but not in *.generated.cs files.

Where a service is inheriting from an interface, move the comment to the interface and use <inheritdoc />


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits November 21, 2025 14:10
Co-authored-by: rickbutterfield <200450+rickbutterfield@users.noreply.github.com>
Co-authored-by: rickbutterfield <200450+rickbutterfield@users.noreply.github.com>
Co-authored-by: rickbutterfield <200450+rickbutterfield@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown

Copilot AI changed the title [WIP] Add XML comments to service implementations Add XML documentation comments to public APIs Nov 21, 2025
@rickbutterfield rickbutterfield marked this pull request as ready for review November 21, 2025 14:32
@rickbutterfield rickbutterfield merged commit e5440fd into v2/dev Nov 21, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants