Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compose formatter: YAML anchors broken by formatting #128

Open
justinbowes opened this issue May 26, 2023 · 1 comment
Open

Compose formatter: YAML anchors broken by formatting #128

justinbowes opened this issue May 26, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@justinbowes
Copy link

justinbowes commented May 26, 2023

YAML fragments are supported in docker-compose.yaml.

The following minimal example has its &anchor broken when formatted:

version: "3.5"

x-anchor: &anchor
  FOO: bar

services:
  example:
    image: alpine

Formatting makes the following change:

version: "3.5"

x-anchor: 
  &anchor
  FOO: bar

services:
  example:
    image: alpine

I would expect the compose formatter to not insert newlines that break supported syntax.

@justinbowes justinbowes changed the title YAML anchors broken by formatting Compose formatter: YAML anchors broken by formatting May 26, 2023
@bwateratmsft
Copy link
Contributor

Thanks @justinbowes! I'll move this to the compose language service repository.

@bwateratmsft bwateratmsft transferred this issue from microsoft/vscode-docker May 30, 2023
@bwateratmsft bwateratmsft added the bug Something isn't working label May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants