Re:Codecov breach impacts GoDaddy, Atlassian, P&G etc.
by sundbry on Monday April 19, 2021 @01:13AM
(#26859290)
You just parse and reserialize it. The trick is handling comments.
Re:Codecov breach impacts GoDaddy, Atlassian, P&G etc.
by dathinab on Monday April 19, 2021 @04:24PM
(#26867557)
Don't underestimate YAML and not fully compliant YAML parsers(1) and sterilizer's with everything but nice results.
(1): Which can be necessary to prevent accidental problems like NO defaulting to false not "NO" and similar. I personally strongly recommend against anything where string quotes are optional for human written/edited serialization formats (and comments are a must have).
There's a CLI linter for pretty much every language I've used, but how would you prettify a valid YAML file? Any reformatting will change it semantically.