-
-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
The YAML header is not recognized properly and messes up the output.
Steps to reproduce
Example from gitlab CI/CD inputs: https://docs.gitlab.com/ci/inputs/examples/#use-cicd-inputs-in-variable-expressions
spec:
inputs:
linter:
lint-path:
---
"run-$[[ inputs.linter ]]-lint":
script: ./lint --$[[ inputs.linter ]] --path=$[[ inputs.lint-path ]]Current behavior
- With
YAMLFIX_EXPLICIT_START=trueand additional---is added at the top. - With
YAMLFIX_EXPLICIT_START=falsethe---between the header and the rest is removed.
Desired behavior
If a --- is somewhere in the file (still comments at the top could be allowed, I guess), do not handle it.
However I am not sure, whether the "usual" header style or whatever Gitlab is using allows an additional --- at the top.
Environment
$ uvx --with yamlfix python -c "import yamlfix.version; print(yamlfix.version.version_info())"
------------------------------------------------------------------
yamlfix: 1.17.0
Python: 3.12.8
Platform: macOS-15.5-arm64-arm-64bit
------------------------------------------------------------------
fredleger
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working