Website data for no-color.org
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

pr-check: show when lines have whitespace

just showing it "didn't match the format | | |" can be confusing

+4 -1
+4 -1
.github/workflows/pr-check.rb
··· 56 56 fails = false 57 57 58 58 while f && !f.eof? 59 - line = f.gets 59 + line = f.gets.gsub(/\n\z/, "") 60 60 lc += 1 61 61 descr = nil 62 62 ··· 68 68 when :libraries, :software, :non_believers 69 69 if line.match(/^\{: rules/) 70 70 state = next_state(state) 71 + elsif line.strip != line 72 + puts "Line #{lc} has leading or trailing whitespace: #{line.inspect}" 73 + fails = true 71 74 else 72 75 parts = [] 73 76 if m = line.match(/^\| (.+) \|$/)