Repository navigation
chore(lint): drop the last fieldalignment nolints and reorder their structs - #643
Conversation
…tructs LeanerCloud#441, LeanerCloud#471 and LeanerCloud#491 have merged, so the structs that kept a "//nolint:govet // fieldalignment: file owned by open PR #N" marker to avoid conflicting with them can now be reordered. LeanerCloud#471 already removed the gcp markers; this removes the remaining four and reorders the structs into fieldalignment's optimal order, keeping every field comment: - pkg/ladder: AllocationInput (328 -> 264 pointer bytes) and BufferReshapeConfig (48 -> 24) - pkg/recfilter: DuplicateChecker (24 -> 16) - providers/azure/services/savingsplans: Client (112 -> 104) The blanket //nolint:govet also hid every other govet analyzer on those structs; with it gone they are checked again (and are clean). Closes LeanerCloud#610 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent review (IAmJSD's agent, fresh context, given only the diff, the issue and the PR text): VERDICT: APPROVE Blocking:
Non-blocking:
Attacked:
Body-stale:
Reviewer: rF2. Bar while the maintainers are away (set by IAmJSD as acting owner): one approving independent review on the head, two for money, auth and security paths. |
|
Local verification at |
Summary
#100 turned on
fieldalignmentin #589, #590, #593 and #596. A few structs sat in files that open PRs were also changing, so instead of being reordered they got a//nolint:govet // fieldalignment: file owned by open PR #Nmarker. Those PRs have all merged now: #441 at 06:41Z, #471 at 06:33Z and #491 at 06:51Z on 2026-10-26.git log -S"owned by open PR #471"shows the marker being added in chore(lint): reorder providers/gcp structs and re-enable fieldalignment #596 and removed in fix(gcp): fail closed on region-less storage SKUs and ambiguous SKU matches #471. Nothing is left to do for these.AllocationInputpkg/ladder/allocate.goBufferReshapeConfigpkg/ladder/capability.goDuplicateCheckerpkg/recfilter/dedupe.goClientproviders/azure/services/savingsplans/client.goA blanket
//nolint:govetturned off every govet analyzer on these structs, not only fieldalignment. Now that it is gone, those analyzers check the structs again, and they report nothing.Only field order changes. Is anything depending on the old order?
go vet(which checks for unkeyed composite literals) passes in all five modules, both with and without theintegrationtag.savingsplans.Clienthas only unexported fields, so no other package can build one with a struct literal.AllocationInput,BufferReshapeConfigorDuplicateChecker.Closes #610
Verification
Unit, lint and build checks on this branch:
golangci-lintv2.10.1 run with--allow-parallel-runnersreports:golangci-lint run --allow-parallel-runnerswith the repo's own.golangci.ymlreports0 issues.across the whole module, run from bothpkg/andproviders/azure/. The config already setsbuild-tags: integration.grep -rn "file owned by open PR" --include=*.go .andgrep -rln "nolint:govet" --include=*.go .return nothing.go build ./...,go vet ./...andgo vet -tags integration ./...pass in each ofpkg,providers/aws,providers/azure,providers/gcpandci_cd_sanity_tests.(cd pkg && go test -count=1 ./ladder/)(cd pkg && go test -count=1 ./recfilter/)(cd providers/azure && go test -count=1 ./services/savingsplans/)gocyclo -over 10 -ignore "_test\.go"on the four changed files reports nothing.Parent verification at
7580943(branch is up to date with main):go test -race -short -count=1 ./...in thepkgandproviders/azuremodules passes. This is the only branch for this repo in this batch, so there was no combined tree.Out of scope
fieldalignmentanalyzer, it also flags some structs in_test.gofiles underpkg/recfilter. The repo's golangci-lint config does not report these, so they are left alone.Maintainer: #610 currently has no triage labels, so there are none to mirror onto this PR. Please add any you want.
🤖 Generated with Claude Code