Skip to content

Instantly share code, notes, and snippets.

@GeoffWilliams
Created December 10, 2018 23:59
Show Gist options
  • Save GeoffWilliams/e15aa824fbdd306ee272891992c629a3 to your computer and use it in GitHub Desktop.
Save GeoffWilliams/e15aa824fbdd306ee272891992c629a3 to your computer and use it in GitHub Desktop.
recursive yaml file validation, run by executing `rake`
# Check YAML files for syntax
task :default do
require 'yaml'
d = Dir["./**/*.yaml"]
d.each do |file|
begin
f = YAML.load_file(file)
rescue Exception
puts "Invalid YAML #{file}: #{$!}"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment