Closed sbe-arg closed 2 years ago
maybe something like a flag to skip yaml reformating/prettier altogether
Hi @sbe-arg
This is a duplicate of https://github.com/sethvargo/ratchet/issues/14 and noted in the README's known issues.
The library we use to parse the YAML into an AST tree does not preserve whitespace or indentation, so unfortunately there's nothing Ratchet can do here. The original version of YAML did regex-based replacements on the file, but that proved to be extremely error-prone, so now it parses and re-renders the AST tree.
The example you provided is concerning, since it's actually a different representation of the data. Are you able to reproduce this issue using the library natively? If so, I would recommend filing an issue there: https://github.com/go-yaml/yaml/issues/new
TL;DR
When running pin against a github actions step that has
ratchet converts this block into
unsure why is breaking this formating
is there a way to exclude the run: blocks from being reformated?
Expected behavior
don't reformat code inside run: blocks
Observed behavior
run blocks modified when they should not
Version
0.2.3
On what operating system are you using ratchet?
Linux
CI/CD workflow file
No response
Relevant log output
No response
Additional information
No response