Created
December 10, 2018 23:59
-
-
Save GeoffWilliams/e15aa824fbdd306ee272891992c629a3 to your computer and use it in GitHub Desktop.
recursive yaml file validation, run by executing `rake`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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