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

format/configured/go

A formatter is configured

Implements format/configured for go.

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

Requirement

golangci-lint v2 enables formatters: in its configuration, or gofmt, gofumpt, goimports or golangci-lint fmt runs in a hook, the task runner or CI. Another formatter is added with accept:.

Why

Without one formatter every editor reformats differently and diffs fill with whitespace churn that hides the real change.

Fix

Enable formatters (gofumpt, goimports) in .golangci.yml and run golangci-lint fmt from the fmt target and a hook.

Agent instruction: Add formatters: enable: [gofumpt, goimports] to .golangci.yml and a golangci-lint fmt hook; reformat the code base in a separate commit.

Sources


Generated by fleetlint docs from catalog v0.4.0.