fleetlint Policy for a fleet of repositories
v0.7
Getting started

lint/configured/hugo

The Hugo build treats warnings as errors

Implements lint/configured for hugo.

Severitywarning
Tiers1, 2
Stackshugo
Scopeeach
Kindoutcome
Sourcelibrary v0.4.0
Selected byfleetlint-recommended@v0.4.0

Requirement

The task runner’s lint or build target, a hook, or CI runs hugo --panicOnWarning so a missing layout, a broken ref or a deprecated setting fails the build instead of printing a warning nobody reads.

Why

Hugo prints warnings for broken references and deprecated configuration and still exits 0; the flag is the only thing that turns them into a failed build.

Fix

Add --panicOnWarning to the hugo invocation in the lint or build target (see https://fleetlint.org/stacks/#hugo--static-sites).

Agent instruction: Add –panicOnWarning to the hugo build in the lint or build target and fix the warnings it surfaces instead of removing the flag.

Sources


Generated by fleetlint docs from catalog v0.4.0.