From 0fec96164406c290954a47493b35778a155c65ef Mon Sep 17 00:00:00 2001 From: Dave Machado Date: Mon, 10 Jul 2017 00:12:19 -0400 Subject: [PATCH] Skip schema lines and split lines by pipe-char --- build/validate.rb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/build/validate.rb b/build/validate.rb index d44cefb3..633aeac2 100755 --- a/build/validate.rb +++ b/build/validate.rb @@ -1,9 +1,20 @@ #!/usr/bin/env ruby + args = ARGV filename = args[0] File.foreach(filename).with_index do |line, line_num| line_num += 1 - puts "#{line_num}: #{line}" +# puts "#{line_num}: #{line}" + if line.start_with?('|') + # Skip table schema lines + if line.eql? "|---|---|---|---|---|\n" + next + end + values = line.split("|") + values.each.with_index do |v, vn| + puts "#{vn}: #{v}" + end + end end