Skip to content

fix(yamlfmt): normalize sequence spacing - #624

Open
Guflly wants to merge 1 commit into
Boeing:feat/3.0from
Guflly:fix/yaml-sequence-spacing
Open

fix(yamlfmt): normalize sequence spacing#624
Guflly wants to merge 1 commit into
Boeing:feat/3.0from
Guflly:fix/yaml-sequence-spacing

Conversation

@Guflly

@Guflly Guflly commented Jul 31, 2026

Copy link
Copy Markdown

Fixes #622.

The tokenizer already keeps the canonical - in TokDash; any extra horizontal spacing is emitted as the following TokSpace. Removing that extra spacing before flow expansion keeps mapping keys aligned with their siblings.

The unit regression checks the exact output and parses it as YAML. The CLI test runs format --fix, check, and a second format pass to cover validity and idempotence.

Validated with:

  • formatter and CLI tests
  • go vet ./...
  • golangci-lint run ./...
  • go generate ./pkg/filetype/...
  • a CGO-disabled build
  • 91.8% total coverage

@Guflly
Guflly requested a review from a team as a code owner July 31, 2026 21:48
@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 1, 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