Skip to content

Add a JVM-based YAML formatter #910

Closed
@jamietanna

Description

@jamietanna

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]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions