npm install -g yaml-lint
yamllint file.yaml
1:1 warning missing document start "---" (document-start)
1:18 error trailing spaces (trailing-spaces)
4:9 error wrong indentation: expected 6 but found 8 (indentation)
8:9 error wrong indentation: expected 6 but found 8 (indentation)
12:9 error wrong indentation: expected 6 but found 8 (indentation)
17:9 error wrong indentation: expected 4 but found 8 (indentation)
github address: yamllint