require'yaml'# run `ruby validator.rb` in current directoryDir.children('projects').eachdo|folder|beginpath="projects/#{folder}/imports.yml"YAML.load(File.read(path))ifFile.exists?(path)rescue=>exceptionputs"#{exception}"puts"Format wrong with projects/#{folder}/imports.yml"endend