module

Hwaro::Services

Constants

ALL_BLOCKING_IDS = begin ids = Set(String).new CHECK_GROUPS.each do |group| group.blocked_by.each do |id| ids << id end group.checks.each do |spec| spec.blocked_by.each do |id| ids << id end end end ids end

Every id that aborts some check's scan, group-level or check-level.

CHECK_GROUPS = [CheckGroup.new(key: :config, default_heading: "config.toml", checks: [CheckSpec.new("file present & parseable", ["config-not-found", "config-parse-error"]), CheckSpec.new("base_url, title", ["base-url-missing", "base-url-trailing-slash", "title-default"]), CheckSpec.new("sitemap (changefreq, priority)", ["sitemap-changefreq-invalid", "sitemap-priority-range"]), CheckSpec.new("taxonomies (duplicates)", ["taxonomy-duplicate", "language-duplicate"]), CheckSpec.new("search (format)", ["search-format-invalid"]), CheckSpec.new("languages (default_language resolves)", ["default-language-undefined"]), CheckSpec.new("versions (content paths exist)", ["version-path-missing"]), CheckSpec.new("markdown / pwa (valid enums)", ["markdown-math-engine-invalid", "pwa-cache-strategy-invalid", "pwa-display-invalid"]), CheckSpec.new("image processing (widths set)", ["image-processing-widths-empty"]), CheckSpec.new("deployment / related (refs resolve)", ["deployment-target-undefined", "related-taxonomy-undefined"]), CheckSpec.new("menus (parent references)", ["menu-parent-undefined"]), CheckSpec.new("referenced files & dirs", ["config-path-missing", "config-dir-missing", "highlight-lexer-invalid"]), CheckSpec.new("build output (route evidence)", ["build-output-unusable", "build-output-stale"]), CheckSpec.new("sass (sources & enablement)", ["sass-dir-not-scanned", "sass-disabled-with-sources"])], blocked_by: CONFIG_BLOCKING_IDS), CheckGroup.new(key: :templates, default_heading: "templates/", checks: [CheckSpec.new("required files (page.html, section.html)", ["template-dir-missing", "template-required-missing", "template-section-missing"]), CheckSpec.new("template syntax", ["template-syntax-error", "template-read-error"])], blocked_by: ["template-dir-missing"]), CheckGroup.new(key: :content, default_heading: "content/", checks: [CheckSpec.new("directory present", ["content-dir-missing"]), CheckSpec.new("front matter (TOML/YAML parse)", ["content-frontmatter-invalid", "content-read-error"]), CheckSpec.new("front matter menus (declared in config)", ["menu-undeclared"], blocked_by: CONFIG_BLOCKING_IDS), CheckSpec.new("front matter templates (exist)", ["content-template-missing"], blocked_by: ["template-dir-missing"]), CheckSpec.new("front matter schema ([[content.schema]])", ["content-schema-violation"], blocked_by: CONFIG_BLOCKING_IDS), CheckSpec.new("section index files (_index.md)", ["structure-missing-index", "content-ignore-hides-sections", "taxonomy-term-file-unmatched"], blocked_by: CONFIG_BLOCKING_IDS), CheckSpec.new("translations (pages in every language)", ["translation-missing", "translation-orphan", "translation-key-collision"], blocked_by: CONFIG_BLOCKING_IDS)], blocked_by: ["content-dir-missing"])]

Single source of truth for the inline status lines emitted by hwaro doctor. Anything that adds a new diagnostic to Services::Doctor should also list its issue id(s) here so the check shows up in human output. The previous duplication — one list in this service and another in the CLI command — is gone, so updating one place is enough.

CONFIG_BLOCKING_IDS = ["config-not-found", "config-parse-error"]

The config failures that abort check_config before it can produce a Models::Config. Checks outside the config group that need one name these too — see CheckSpec#blocked_by.

Nested types