使用方法:
yamllint /home/xj/moveit2_UR5/install/ur5_moveit_config/share/ur5_moveit_config/config/moveit_controllers.yaml
如果没有,安装命令:
sudo apt install yamllint
比如,下面这个报错,报错内容是,第3行太长,89个字符,超过要求的80个字符了,所以需要换行。
另一个经常出现的错误是:应该留出最后一行是空行,并且空行不能有空格。
警告不用管。
xj@xj:~$ yamllint /home/xj/moveit2_UR5/install/ur5_moveit_config/share/ur5_moveit_config/config/moveit_controllers.yaml
/home/xj/moveit2_UR5/install/ur5_moveit_config/share/ur5_moveit_config/config/moveit_controllers.yaml3:1 warning missing document start "---" (document-start)3:81 error line too long (89 > 80 characters) (line-length)21:5 warning comment not indented like content (comments-indentation)