Skip to content

luhring/yam

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yam 🍠

A sweet little formatter for YAML

Installation

go install github.com/chainguard-dev/yam@latest

Usage

Format...

yam a.yaml

Lint...

Just add --lint to the command:

yam a.yaml --lint

Formatting/Linting Options

To expect a gap (empty line) in between child elements of a given node, just pass a yq-style path to the node, using --gap. You can use this flag as many times as needed.

yam a.yaml --gap '.'
yam a.yaml --gap '.foo.bar'
yam a.yaml --gap '.people[].address'
yam a.yaml --gap '.recipes[0].ingredients'
yam a.yaml --gap '.types.*.inputs'

About

A sweet little formatter for YAML

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%