yamltidy is a formatter/tidier for YAML files.
Currently it can: Plans for the future: It can be configured via a YAML config file, similar to yamllint.

What it can't do:

For such things it's recommended to use a linter like yamllint.

Examples for a large number of input files can be found here: