fleetlint Policy for a fleet of repositories
v0.11 (latest)
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.8.0
Selected byfleetlint-recommended@v0.8.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.

A finding that names no file points at the task runner’s file, or Makefile when there is none.

Sources


Generated by fleetlint docs from catalog v0.8.0.