title: Program to lint YAML files?
body: <p>So my team is currently working on an application that uses a lot of YAML and we need to enforce some rules for common formatting. The best would be a command-line program so we can plug it into our CI.</p>
  
  <p>Most importantly, we want to force 2-space indentation and indentation of lists, like this:</p>
  
  <pre><code>list:
  - not indented
  - not indented            # this is BAD
  
  list:
    - indented
    - indented              # this is GOOD
  
  mapping:
       5 space indentation  # this is BAD
  </code></pre>
  
  <p>Also it would be great to preventing trailing spaces and non-sense syntaxes.</p>
  
  <p>I've found some websites that check YAML validity (i.e. whether it's possible to load it or not) -- but no linting. The same for yaml-lint, a Ruby app that only "checks if your YAML files can be loaded".</p>
  
  <p><strong>Is there a linter for YAML</strong>, similar to flake8 for python or eslint for javascript?</p>