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
Codestring- 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
contentServicesIEnumerable<IContentService>resolverXrefResolverfileSystemIFileSystem
Methods
AuditAsync
#public Task<IReadOnlyList<BuildDiagnostic>> AuditAsync(BuildAuditContext context, CancellationToken cancellationToken)
Runs the auditor against context and returns its diagnostics.
Parameters
contextBuildAuditContextcancellationTokenCancellationToken
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)
;
}