Skip to content

Instantly share code, notes, and snippets.

@stephencoe
Created February 18, 2017 09:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephencoe/db1630fc900f82c9863417a079ee6ee3 to your computer and use it in GitHub Desktop.
Save stephencoe/db1630fc900f82c9863417a079ee6ee3 to your computer and use it in GitHub Desktop.
YML Lint
#!/bin/bash
# Validate YML with pretty print output
yml-lint() {
ruby -e "require 'yaml';require'JSON';puts JSON.pretty_generate(JSON.parse(YAML.load_file(\"$@\").to_json))";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment