This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy under /_llms/. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

XrefAuditor Pennington.Generation

IBuildAuditor that scans markdown source files for xref: references whose UID does not resolve through the live XrefResolver. Catches typos and stale links pre-render so the dev overlay flags them on the page that contains them and the build report lists them once per route.

Properties

Code string
Stable identifier surfaced on every diagnostic this auditor emits.

Constructors

XrefAuditor

#
public XrefAuditor(IEnumerable<IContentService> contentServices, XrefResolver resolver, IFileSystem fileSystem)

Wires the auditor to the content discovery surface, the xref resolver, and the file system.

Parameters

contentServices IEnumerable<IContentService>
resolver XrefResolver
fileSystem IFileSystem

Methods

AuditAsync

#
public Task<IReadOnlyList<BuildDiagnostic>> AuditAsync(BuildAuditContext context, CancellationToken cancellationToken)

Runs the auditor against context and returns its diagnostics.

Parameters

context BuildAuditContext
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<BuildDiagnostic>>

Pennington.Generation.XrefAuditor

namespace Pennington.Generation;

/// IBuildAuditor that scans markdown source files for xref: references whose UID does not resolve through the live XrefResolver. Catches typos and stale links pre-render so the dev overlay flags them on the page that contains them and the build report lists them once per route.
public class XrefAuditor
{
    /// Runs the auditor against context and returns its diagnostics.
    
public Task<IReadOnlyList<BuildDiagnostic>> AuditAsync(BuildAuditContext context, CancellationToken cancellationToken)
; /// Stable identifier surfaced on every diagnostic this auditor emits.
public string Code { get; }
/// Wires the auditor to the content discovery surface, the xref resolver, and the file system.
public XrefAuditor(IEnumerable<IContentService> contentServices, XrefResolver resolver, IFileSystem fileSystem)
; }