提交 b33e7674 编写于 作者: BaiXuePrincess's avatar BaiXuePrincess 🐕

Merge branch 'feature/add-format-validator' into 'master'

feat: 添加格式验证程序

See merge request codechina/mirrors-settings!201
require 'yaml'
# run `ruby validator.rb` in current directory
Dir.children('projects').each do |folder|
begin
path = "projects/#{folder}/imports.yml"
YAML.load(File.read(path)) if File.exists?(path)
rescue => exception
puts "#{exception}"
puts "Format wrong with projects/#{folder}/imports.yml"
end
end
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册