lint/configured/hugo
The Hugo build treats warnings as errors
Implements lint/configured for hugo.
| Severity | warning |
| Tiers | 1, 2 |
| Stacks | hugo |
| Scope | each |
| Kind | outcome |
| Source | library v0.8.0 |
| Selected by | fleetlint-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
- https://csrc.nist.gov/pubs/sp/800/218/final (standard, PW.7.2: Perform the code review and/or code analysis based on the organization’s secure coding standards)
- https://fleetlint.org/baseline/#static-analysis (convention)
- https://gohugo.io/commands/hugo/ (spec)
- https://fleetlint.org/stacks/#hugo–static-sites (convention)
Generated by fleetlint docs from catalog v0.8.0.