安装
[root@node1 stolon]# yum install yamllint
使用
[root@node1 stolon]# yamllint values.yaml
values.yaml
2:1 warning missing document start "---" (document-start)
40:81 error line too long (121 > 80 characters) (line-length)
56:81 error line too long (97 > 80 characters) (line-length)
62:81 error line too long (108 > 80 characters) (line-length)
68:1 warning comment not indented like content (comments-indentation)
72:3 warning comment not indented like content (comments-indentation)
83:81 error line too long (87 > 80 characters) (line-length)
111:3 warning comment not indented like content (comments-indentation)
121:1 error syntax error: could not find expected ':' (syntax)
278:81 error line too long (102 > 80 characters) (line-length)
错误的话会有提示