From 69fa604cb4851eec3bad94299d04ee40b4b77b6e Mon Sep 17 00:00:00 2001 From: pulltheflower Date: Mon, 15 Mar 2021 15:44:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- validator.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 validator.rb diff --git a/validator.rb b/validator.rb new file mode 100644 index 000000000..5c009ba8d --- /dev/null +++ b/validator.rb @@ -0,0 +1,13 @@ +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 -- GitLab