Skip to content

style: clear pre-existing lint and gofmt debt - #653

Open
james-nesbitt wants to merge 1 commit into
mainfrom
chore/lint-cleanup
Open

style: clear pre-existing lint and gofmt debt#653
james-nesbitt wants to merge 1 commit into
mainfrom
chore/lint-cleanup

Conversation

@james-nesbitt

Copy link
Copy Markdown
Collaborator

What

Clear pre-existing lint and gofmt debt on main. No functional changes.

Why

make lint currently fails on main with 5 issues, and three files are not gofmt-clean. This is unrelated to any feature work — it just means anyone running make lint locally starts from a red baseline, and new violations are easy to miss in the noise.

How

golangci-lint (5 → 0 issues):

  • pkg/product/mke/config/cluster_spec.go — double blank line in UnmarshalYAML (gci)
  • pkg/product/mke/config/host.go — formatting (gci)
  • pkg/configurer/windows.go — stray blank line after the InstallMCR opening brace (gofumpt, whitespace); leftover from [PRODENG-3471] Fix Windows MCR install failing on FIPS channels #640 removing version := "latest"
  • pkg/docker/image.go — rename wppool (varnamelen). Deliberately matches the name already used on the rig v2 migration branch, so that rebase stays clean.

gofmt (not covered by make lint, which sets run.tests: false):

  • pkg/product/mke/phase/validate_facts_test.go, test/platforms.go, test/smoke/smoke_test.go — struct field alignment and one trailing blank line

Everything except the wppool rename was applied by golangci-lint run --fix / gofmt -w; the rename was done via LSP so all three references moved together.

Testing

  • make lint0 issues
  • gofmt -l across ./pkg ./cmd ./test .clean
  • go build ./..., go vet ./..., and go vet -tags=integration ./test/... all pass
  • go test ./pkg/... passes

Links

  • JIRA: N/A (pure lint/format hygiene, no ticket)

Checklist

  • Tests added or updated (N/A — formatting only, no behaviour change)
  • Docs updated if user-visible behaviour changed (N/A)
  • No debug output or dead code left in

Written by AI: claude-sonnet-5

golangci-lint reported 5 pre-existing issues on main and three files were
not gofmt-clean. None are functional changes.

golangci-lint (now 0 issues):
- pkg/product/mke/config/cluster_spec.go: double blank line (gci)
- pkg/product/mke/config/host.go: formatting (gci)
- pkg/configurer/windows.go: blank line after the InstallMCR opening brace
  (gofumpt, whitespace)
- pkg/docker/image.go: rename 'wp' -> 'pool' (varnamelen); matches the name
  already used on the rig v2 migration branch

gofmt (not caught by make lint, which sets run.tests: false):
- pkg/product/mke/phase/validate_facts_test.go, test/platforms.go,
  test/smoke/smoke_test.go: field alignment and a trailing blank line

Written by AI: claude-sonnet-5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant