google / keep-sorted

keep-sorted is a language-agnostic formatter that sorts lines between two markers in a larger file.
Apache License 2.0
132 stars 15 forks source link

fix: Print options correctly when their lists or sets need to be YAML lists. #48

Closed JeffFaer closed 2 weeks ago

JeffFaer commented 3 weeks ago

Right now, options that need their lists or sets to be YAML lists aren't printing a roundtrippable string.

JeffFaer commented 2 weeks ago

But what we're serializing is currently always a []string, which probably can't fail to marshal? Maybe some weird encoding edge case or something? If it's even possible, it's probably a minor enough edge case to be irrelevant.

Yeah, that's more or less what I was thinking. Seems like marshalling []string should be very safe