yamllint

Linter for YAML files that checks syntax and style issues.

brewmacoslinux
Try with needOr install directly
Source

About

Linter for YAML files

Commands

yamllint

Examples

check YAML file for errors and style problems$ yamllint myfile.yaml
lint all YAML files in a directory recursively$ yamllint .
check YAML file with custom configuration rules$ yamllint -c custom-config.yaml myfile.yaml
lint YAML and show output in parseable format$ yamllint -f parsable myfile.yaml
validate YAML syntax without checking style rules$ yamllint -d relaxed myfile.yaml