Skip to content

Instantly share code, notes, and snippets.

@kabturek
Created July 18, 2012 08:13
Show Gist options
  • Save kabturek/3134986 to your computer and use it in GitHub Desktop.
Save kabturek/3134986 to your computer and use it in GitHub Desktop.
Simple script to check yml files
#!/usr/bin/env ruby
# encoding: utf-8
require 'yaml'
YAML::ENGINE.yamler = 'psych' # or 'syck' for old parser
d = Dir["./**/*.yml"]
d.each do |file|
begin
puts "checking : #{file}"
f = YAML.load_file(file)
rescue Exception
puts "failed to read #{file}: #{$!}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment