#check

    Read-only validation. It walks the same pages as a build but writes nothing.

    Import as justjavac/fus/check.

    check_site(options) returns a CheckReport with errors, warnings, pages, assets and issues; check_site_with(options, formats, contents) validates custom registries too. CheckReport::is_ok() is what the CLI turns into an exit code.

    It reports: unparsable config, missing source or theme directories, missing and cyclic layouts, missing includes, unknown plugin names, drafts skipped without --drafts, unclosed front matter, empty permalinks, colliding output paths and missing titles (a warning). Warnings never fail a build; errors do.

    CheckIssue

    pub struct CheckIssue {
    level : IssueLevel
    message : String
    }

    One finding produced by check_site.

    message is written for humans and names the offending file, layout or key.

    CheckIssue::level_name

    fn CheckIssue::level_name(self : CheckIssue) -> String

    The severity of an issue as a lowercase word, for consoles and CI logs.

    CheckReport

    pub struct CheckReport {
    errors : Int
    warnings : Int
    pages : Int
    assets : Int
    issues : Array[CheckIssue]
    }

    Result of check_site.

    errors and warnings are counts, issues holds every finding in discovery order, and pages/assets report how much input was scanned. A report with zero errors means a build would very likely succeed.

    CheckReport::is_ok

    fn CheckReport::is_ok(self : CheckReport) -> Bool

    Whether the site passed validation, i.e. no errors were found.

    IssueLevel

    pub enum IssueLevel {
    Error
    Warning
    }

    Severity of one validation finding.

    check_site

    Validate a site without writing any output, using the built-in formats.

    check_site_with

    Validate a site with an explicit format registry.

    Checks the configuration file, the content and layout directories, front matter delimiters, layout chains, include targets, duplicate permalinks, unknown plugins and skipped drafts. Only reads files: _site and .fus-cache are never modified, so this is safe to run in CI.

    Source Files