fix: use 2-space indentation in generated compose.yaml#461
Merged
mathieu-benoit merged 3 commits intomainfrom Apr 13, 2026
Merged
fix: use 2-space indentation in generated compose.yaml#461mathieu-benoit merged 3 commits intomainfrom
mathieu-benoit merged 3 commits intomainfrom
Conversation
Agent-Logs-Url: https://github.com/score-spec/score-compose/sessions/ecaecef1-45e8-4406-a3a9-ff9e02fa1529 Co-authored-by: mathieu-benoit <11720844+mathieu-benoit@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
mathieu-benoit
April 11, 2026 14:40
View session
Contributor
Overview
Policies (0 improved, 0 worsened)
Packages and Vulnerabilities (1 package changes and 0 vulnerability changes)
Changes for packages of type
|
| Package | Versionscore-compose:latest |
Versionscore-compose:latest |
|
|---|---|---|---|
| ♾️ | github.com/score-spec/score-compose | 0.0.0-20260412232642-aa924900c12b+dirty |
0.0.0-20260412233125-021ea05909f4+dirty |
mathieu-benoit
approved these changes
Apr 11, 2026
Contributor
mathieu-benoit
left a comment
There was a problem hiding this comment.
I wanted a cleaner output file with 2-spaces indentation instead of 4-spaces, this LGTM
Contributor
|
@chris-stephenson, can I have a second pair of eyes by reviewing this one please? Thanks! FYI, also trying to validate this approach in the other Score implementations: |
This was referenced Apr 11, 2026
Agent-Logs-Url: https://github.com/score-spec/score-compose/sessions/b7ffe174-4c95-4a59-b5da-a2c4977e4b74 Co-authored-by: mathieu-benoit <11720844+mathieu-benoit@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Switch the
generatecommand from usingyaml.Marshal(which produces 4-space indented output) tocompose.WriteYAMLwithSetIndent(2), so that the generatedcompose.yamluses standard 2-space indentation. Update all test expected outputs to match the new 2-space format.What does this PR do?
The
generatecommand previously usedyaml.Marshalto serialise the Compose project, which produced 4-space indented YAML. This PR replaces that call withcompose.WriteYAML(backed bySetIndent(2)), aligning the generatedcompose.yamloutput with the conventional 2-space indentation used across the Compose ecosystem. All affected golden-string expectations ingenerate_test.go,generate_examples_test.go, andinit_test.goare updated accordingly.Types of changes
Checklist: