spotless
spotless copied to clipboard
Add a JVM-based YAML formatter
Similar to #853, there'd ideally be a YAML formatter for Spotless. I've not yet investigated options, but a simple()
version maybe using Jackson's YAML mapper may be sufficient for a first option
Edit: looking at it, and the various formats for YAML it may not be as easy as I thought, given it needs to parse and then pretty-print, which can change the formats substantially (and do things like exclude comments):
---
hr:
- Mark McGwire
# Following node labeled SS
- &SS Sammy Sosa
rbi:
- *SS # Subsequent occurrence
- Ken Griffey
vs
hr: [Mark McGwire, Sammy Sosa]
rbi: [Sammy Sosa, Ken Griffey]