Skip to content

fix(tomlfmt): keep inline table arrays single-line - #643

Closed
aryansk wants to merge 2 commits into
Boeing:feat/3.0from
aryansk:codex/issue-631-inline-table-array
Closed

fix(tomlfmt): keep inline table arrays single-line#643
aryansk wants to merge 2 commits into
Boeing:feat/3.0from
aryansk:codex/issue-631-inline-table-array

Conversation

@aryansk

@aryansk aryansk commented Aug 5, 2026

Copy link
Copy Markdown

Summary

  • keep arrays nested in inline tables on one line, even when width-based expansion would otherwise make them multiline
  • add regression coverage for source-multiline arrays inside inline tables
  • update the inline-table fixture to reflect the TOML single-line invariant
  • record the fix in CHANGELOG.md under [Unreleased]Fixed

Fixes #631.

Validation

  • go test ./pkg/formatter/tomlfmt
  • go test ./...
  • go vet ./...
  • gofmt -s -l -e on changed Go files
  • git diff --check

AI disclosure

AI assistance was used to investigate the issue, implement the patch, and run validation. The contributor is responsible for understanding and reviewing every changed line.

Inline tables cannot contain newlines, so width-based array expansion must not override the single-line representation required by TOML. Add regression coverage for source multiline arrays, update the wide inline-table fixture, and record the fix in the changelog.

Fixes Boeing#631.

Assisted-by: ChatGPT
Signed-off-by: Aryan Singh K. <70511529+aryansk@users.noreply.github.com>
@aryansk
aryansk force-pushed the codex/issue-631-inline-table-array branch from 1b060b4 to 5dc532f Compare August 5, 2026 17:41
@kehoecj kehoecj added OSS Community Contribution Contributions from the OSS Community waiting-on-maintainer-review PR is waiting to be reviewed and functionally tested by the maintainers labels Aug 5, 2026
@kehoecj

kehoecj commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Thank you for your contribution @aryansk! Unfortunately this was superseded by #642 which we're going with for this fix. We appreciate you taking the time to work on this.

@kehoecj kehoecj closed this Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OSS Community Contribution Contributions from the OSS Community waiting-on-maintainer-review PR is waiting to be reviewed and functionally tested by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants