Skip to content

fix(yamlfmt): add flow mapping bracket spacing#596

Open
AnayGarodia wants to merge 1 commit into
Boeing:feat/3.0from
AnayGarodia:fix/3.0-yaml-bracket-spacing-585
Open

fix(yamlfmt): add flow mapping bracket spacing#596
AnayGarodia wants to merge 1 commit into
Boeing:feat/3.0from
AnayGarodia:fix/3.0-yaml-bracket-spacing-585

Conversation

@AnayGarodia

Copy link
Copy Markdown

Summary

Match Prettier bracketSpacing for YAML flow mappings: non-empty mappings receive one space after { and before }, while empty mappings and flow sequences remain unchanged. Colon and comma spacing are preserved exactly rather than being re-serialized.

Closes #585

Examples

  • {key: value} becomes { key: value }
  • {a:1,b:2} becomes { a:1,b:2 }
  • [a, b, c] remains [a, b, c]
  • Nested mappings inside sequences are handled recursively

Validation

  • go test ./...
  • go vet ./...
  • gofmt -s clean
  • golangci-lint v2.11.4: 0 issues

Copilot AI review requested due to automatic review settings July 22, 2026 07:52
@AnayGarodia
AnayGarodia requested a review from a team as a code owner July 22, 2026 07:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@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 Jul 22, 2026
@kehoecj kehoecj added this to the 3.0.0 milestone Jul 22, 2026

@kehoecj kehoecj left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AnayGarodia Approved! Will merge once merge conflicts are resolved

@kehoecj kehoecj added pr-action-requested PR is awaiting feedback from the submitting developer and removed waiting-on-maintainer-review PR is waiting to be reviewed and functionally tested by the maintainers labels Jul 24, 2026
@AnayGarodia
AnayGarodia force-pushed the fix/3.0-yaml-bracket-spacing-585 branch from c2d5527 to e42ce9a Compare July 24, 2026 07:53
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 pr-action-requested PR is awaiting feedback from the submitting developer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants