yamllint

In order to clean your YAML files, you can use this really useful and easily configuration tool: yamllint.

Example:

$ yamllint -c yamllint.yml roles/
roles/Projects/influxdb/tasks/db_users.yml
  22:77     error    no new line character at the end of file  (new-line-at-end-of-file)

yamllint is written in Python, so it can be install in virtualenv.