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

IBuildAuditor Pennington.Generation

A build-time auditor that inspects discovered content and produces BuildDiagnostics. Auditors run during dev-mode startup and on file changes (results feed the diagnostic overlay), and again at build time (results land in Diagnostics).

Implement and register via services.AddTransient<IBuildAuditor, MyAuditor>(). Auditors should be cheap to invoke repeatedly because the runner re-runs every registered auditor on every content-tree change.

Properties

Code string
Stable identifier for the auditor (e.g. translation.audit). Surfaced on BuildDiagnostics via the source label so users can filter or suppress by code in CI dashboards.

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

namespace Pennington.Generation;

/// A build-time auditor that inspects discovered content and produces BuildDiagnostics. Auditors run during dev-mode startup and on file changes (results feed the diagnostic overlay), and again at build time (results land in Diagnostics). Implement and register via services.AddTransient<IBuildAuditor, MyAuditor>(). Auditors should be cheap to invoke repeatedly because the runner re-runs every registered auditor on every content-tree change.
public interface IBuildAuditor
{
    /// Runs the auditor against context and returns its diagnostics.
    
public Task<IReadOnlyList<BuildDiagnostic>> AuditAsync(BuildAuditContext context, CancellationToken cancellationToken)
; /// Stable identifier for the auditor (e.g. translation.audit). Surfaced on BuildDiagnostics via the source label so users can filter or suppress by code in CI dashboards.
public string Code { get; }
}