Skip to content

chore(lint): reorder providers/azure structs for fieldalignment - #593

Merged
cristim merged 3 commits into
mainfrom
chore/100-fieldalignment-azure
Oct 20, 2026
Merged

cristim merged 3 commits into
mainfrom
chore/100-fieldalignment-azure

Conversation

@cristim

@cristim cristim commented Oct 20, 2026

Copy link
Copy Markdown
Member

Part of #100. Third of four per-module PRs; the .golangci.yml change lands in the last one.

Changes

Checks

  • No unsafe.Sizeof or binary.Read/Write on these structs; cli, mcp and platform at origin/main have no unkeyed composite literals of module structs (AST scan).
  • go build, go vet, go test -timeout 300s -count=1 ./... and golangci-lint (fieldalignment enabled, tests excluded as in the cli) pass in providers/azure, with and without GOWORK=off.

🤖 Generated with Claude Code

Reorder struct fields to the fieldalignment-optimal layout. serviceResult and the AssertConsumptionUnitVariants table get keyed or reordered literals so the reorder cannot silently reassign values. Client in services/savingsplans/client.go keeps its order with a nolint because open PR #491 modifies that file.

Part of #100

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

  • Run on-demand review

This review includes 23 billable files and costs up to $5.75.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 5 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 88 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: LeanerCloud/cloud-commitments-go/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 25902920-177b-4287-ab09-6025fa7fe3a9
📥 Commits

Reviewing files that changed from the base of the PR and between 5162518 and c1e6349.

📒 Files selected for processing: 23
  • providers/azure/internal/recommendations/consumption.go
  • providers/azure/internal/recommendations/converter.go
  • providers/azure/mocks/consumption_fixtures.go
  • providers/azure/mocks/pricing_http.go
  • providers/azure/provider.go
  • providers/azure/recommendations.go
  • providers/azure/recommendations_multi_subscription.go
  • providers/azure/recommendations_test.go
  • providers/azure/services/cache/client.go
  • providers/azure/services/compute/client.go
  • providers/azure/services/compute/exchange.go
  • providers/azure/services/compute/exchange_operations.go
  • providers/azure/services/cosmosdb/client.go
  • providers/azure/services/database/client.go
  • providers/azure/services/internal/reservations/displayname.go
  • providers/azure/services/internal/reservations/purchase.go
  • providers/azure/services/internal/reservations/purchasecommitment.go
  • providers/azure/services/internal/reservations/reservationstest/capture.go
  • providers/azure/services/managedredis/client.go
  • providers/azure/services/savingsplans/benefit_recommendations.go
  • providers/azure/services/savingsplans/client.go
  • providers/azure/services/search/client.go
  • providers/azure/services/synapse/client.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

cristim and others added 2 commits October 20, 2026 17:57
…r in providers/azure

Rebuild each reordered struct body so every field keeps its own doc comment directly above it and group headers head only the fields they describe (repeated per contiguous run where the layout splits a group). Documented fields are blank-line separated so no undocumented field sits under another field comment.

Part of #100

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cristim

cristim commented Oct 20, 2026

Copy link
Copy Markdown
Member Author

Merge gate verdict (claude-cc-libs)

Every gate holds at head c1e6349:

  • Two independent reviews approve the reviewed head fdbe489. The branch was then updated from main, and the PR diff is byte-identical to the reviewed diff (compared mechanically).
  • CI is green on c1e6349, which is the reviewed change on top of current main.
  • 0 unresolved threads; MERGEABLE/CLEAN.

CodeRabbit is waived as a merge gate under the 2026-10-19 decision. Squash-merging.

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