Skip to content

Instantly share code, notes, and snippets.

@stephencoe
Created February 18, 2017 09:54
Show Gist options
  • Save stephencoe/db1630fc900f82c9863417a079ee6ee3 to your computer and use it in GitHub Desktop.
Save stephencoe/db1630fc900f82c9863417a079ee6ee3 to your computer and use it in GitHub Desktop.

Revisions

  1. stephencoe created this gist Feb 18, 2017.
    6 changes: 6 additions & 0 deletions yml-lint.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    #!/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))";
    }