Skip to content

lint: complete fieldalignment cleanup and re-enable the linter [go part] #100

Open

Description

@cristim

Split from LeanerCloud/cloud-commitments-cli#1373 (cross-component issue, monorepo split)

PR #1364 (lint-debt-clear) globally disables the fieldalignment linter in .golangci.yml as deferred debt after partially applying struct-reorder fixes. Per the no-masking directive this deferral must be tracked and closed: re-apply fieldalignment across the repo (struct field reordering for memory layout), restore/preserve all field documentation comments while reordering (a prior pass deleted several, including concurrency-invariant comments), remove any leftover _rvc autofix artifact names, and re-enable the linter in .golangci.yml. One mechanical PR.

Origin: pre-merge review of #1364, flagged against the 2026-06-30 no-masking-CI-debt directive; owner accepted deferral with tracked follow-up.

Scope for this repo

cloud-commitments-go's own .golangci.yml carries the identical disable, with the identical comment:

      enable-all: true
      disable:
        # fieldalignment: many production structs have alignment violations that
        # pre-date this PR; fixing them is a separate concern. Suppress globally
        # rather than per-struct since golangci-lint v2.10.x (CI) doesn't treat
        # severity:warning as a non-fatal exit, unlike v2.11+.
        - fieldalignment

This applies to this repo's own Go code: pkg/, providers/aws, providers/azure, providers/gcp, tests/e2e, plus the root module. Re-run fieldalignment (via go vet -vettool=$(which fieldalignment) or golangci-lint run --enable-only fieldalignment ./... per module) across all of them.

Acceptance criteria

  • Struct field reordering applied across every module in this repo's go.work (., pkg, providers/aws, providers/azure, providers/gcp, tests/e2e) to satisfy fieldalignment.
  • All pre-existing field documentation comments preserved across the reordering, including any concurrency-invariant comments.
  • No leftover _rvc autofix artifact names remain.
  • fieldalignment removed from the disable: list in .golangci.yml and the linter re-enabled.
  • golangci-lint run passes clean with fieldalignment enabled across all modules.

Activity

  1. cristim commented on Oct 17, 2026

    @cristim
    MemberAuthor

    Checked against main: still valid (fieldalignment is disabled in .golangci.yml). The cleanup reorders struct fields across every module and would conflict with nearly every open PR that edits structs (#307, #423, #424, #433, #471, #473, #491, #493, #503). Blocked until those PRs settle; do it last, one module per PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions