Created
January 23, 2020 22:35
-
-
Save jjb/e34b94d8b8da6cc4f68d7b28118e1a8f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lines = `find . -name '*.rb'`.split("\n") | |
problems = [] | |
lines.each_slice(100) do |slice| | |
threads = [] | |
slice.each do |l| | |
threads << Thread.new do | |
result = `ruby -c #{l}` | |
if "Syntax OK" == result.strip | |
print "." | |
else | |
print "!" | |
problems << l | |
end | |
end | |
end | |
threads.each{|t| t.join } | |
end | |
puts "problems:\n#{problems}" unless 0 == problems.size |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment