Skip to content

style: realign struct tags flagged by golines - #541

Merged
emoss08 merged 1 commit into
masterfrom
claude/trenova-sqlite-support-4oc8h8
Aug 12, 2026
Merged

style: realign struct tags flagged by golines#541
emoss08 merged 1 commit into
masterfrom
claude/trenova-sqlite-support-4oc8h8

Conversation

@emoss08

@emoss08 emoss08 commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Description

#540 merged with the Lint check red. This fixes the two golines findings it reported, restoring that check on master.

Dropping the zero-value default: tags in #540 shortened the bun tags in these two structs, which moved the column golines aligns them to. The lines were already over the limit beforehand, but golangci-lint runs with --new-from-rev, so they were only linted once the sweep touched them.

Related Issue or Discussion

Follow-up to #540. Failing job: https://github.com/emoss08/Trenova/actions/runs/31560662772/job/94002078090

Type of Change

  • Bug fix
  • Feature
  • Documentation
  • Refactor
  • Tests
  • Build, CI, or infrastructure

Scope

internal/core/domain/distancecontrol/distancecontrol.go and internal/core/domain/tenant/agentcontrol.go — struct tag padding only, 21 lines across the two files. No declarations, types, tag contents or validation rules change.

Formatted with github.com/golangci/golines v0.15.0, which is the fork golangci-lint v2.12.2 embeds. Worth recording, because segmentio/golines formats these two files differently and reports them clean — that is what let the failure through on #540 when I checked locally.

Only the two files CI flagged are touched. Running the fork across all of internal/core/domain/ wants to reformat 42 files and roughly 2500 lines of pre-existing drift, which --new-from-rev correctly leaves out of scope here.

Validation

  • cd services/tms && task test — passes
  • cd services/tms && task lintnot run. golangci-lint does not start in this environment: it is built against Go 1.25 while the module targets Go 1.26 and exits with can't load config. This change was instead produced by running the exact golines fork and version that golangci-lint embeds, so its output should match byte for byte. CI is the real check.
  • cd client && pnpm build — no client changes
  • cd client && pnpm lint — no client changes
  • Other: go build ./internal/core/domain/... — clean

Deployment Notes

Formatting only. No behaviour, schema, config or migration changes.

Workers Builds: trenova is expected to stay red. It has failed identically across #536, #537, #539 and #540, including on PRs that change no client files at all, and its logs sit behind an authenticated Cloudflare dashboard. It needs someone with dashboard access.

Checklist

  • I kept the change focused and reviewable.
  • I followed AGENTS.md, CLAUDE.md, and existing repository patterns.
  • I added or updated tests for behavior changes, or explained why tests are not applicable. — formatting only, no behaviour change.
  • I updated relevant documentation, examples, migrations, or configuration.
  • I did not include secrets, credentials, private customer data, unrelated refactors, or placeholder code.

Generated by Claude Code

Summary by CodeRabbit

  • Style
    • Improved code formatting and alignment for distance and agent control fields.
    • No user-facing behavior, data, or API changes.

Dropping the zero-value default tags shortened the bun tags in these two
structs, which moved the column golines aligns them to. The lines were already
over the limit beforehand, but golangci-lint runs with --new-from-rev, so they
were only linted once the sweep touched them.

Formatted with github.com/golangci/golines v0.15.0, which is the fork
golangci-lint v2.12.2 embeds. segmentio/golines formats these files differently
and leaves the lint failing, which is what let this through the first time.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FXYnxBszfwkNUeeAcVSSNf
@cloudflare-workers-and-pages

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
trenova ecf968d Aug 12 2026, 04:01 AM

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1db1816c-2f18-4a6e-992e-fa2bf07c7985

📥 Commits

Reviewing files that changed from the base of the PR and between 85f23dc and ecf968d.

📒 Files selected for processing (2)
  • services/tms/internal/core/domain/distancecontrol/distancecontrol.go
  • services/tms/internal/core/domain/tenant/agentcontrol.go

📝 Walkthrough

Walkthrough

The pull request adjusts whitespace alignment in DistanceControl and AgentControl struct declarations. Field names, types, tags, comments, mappings, and runtime behavior remain unchanged.

Changes

Struct Field Alignment

Layer / File(s) Summary
Align domain struct fields
services/tms/internal/core/domain/distancecontrol/distancecontrol.go, services/tms/internal/core/domain/tenant/agentcontrol.go
Whitespace alignment changed in the struct field declarations. No code semantics changed.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: claude

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the struct tag alignment changes made in the two domain files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/trenova-sqlite-support-4oc8h8

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@emoss08
emoss08 merged commit 214eab0 into master Aug 12, 2026
20 of 21 checks passed
@emoss08
emoss08 deleted the claude/trenova-sqlite-support-4oc8h8 branch August 12, 2026 15:03
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.

2 participants