Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env ruby
- require 'yaml'
- ARGV.each do |file|
- if File.file? file
- begin
- YAML.load_file(file)
- puts "#{file} OK"
- rescue Exception => e
- puts "#{file} #{e.message}"
- end
- end
- end
- # save as /usr/local/bin/yamlint and make it executable
- # quick: wget http://pastebin.com/raw/dGpQanF3 -O- | tr -d '\r' > /usr/local/bin/yamlint && chmod +x /usr/local/bin/yamlint
- # possible usage: find . -name '*.yml' | xargs yamlint
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement