Skip to content

Add support for explicit document start marker --- in YAML docs#290

Open
guillp wants to merge 4 commits into
macisamuele:masterfrom
guillp:feature/explicit_start
Open

Add support for explicit document start marker --- in YAML docs#290
guillp wants to merge 4 commits into
macisamuele:masterfrom
guillp:feature/explicit_start

Conversation

@guillp
Copy link
Copy Markdown

@guillp guillp commented Aug 8, 2025

This adds an option --explicit-start which toggles the corresponding option in ruamel.yaml when formatting single-doc files.
Single doc files will then contain an explicit document start marker ---.
This doesn't change anything for multiple-docs files, which are already formatted with --- markers at the beginning and between each doc.

Enabling this option allows this pre-commit hook to produce outputs that match the default yamllint config which warns when the document-start marker is missing.

@guillp guillp changed the title Add support for explicit document start marker --- Add support for explicit document start marker --- in YAML docs Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants