Commit f26f9274 authored by Cool Fire's avatar Cool Fire

Use syntax check script instead

parent 03ab9992
Pipeline #249 canceled with stages
in 11 minutes and 3 seconds
......@@ -10,7 +10,7 @@ ruby_2.1:
- ruby
script:
- ruby -v
- find . -name "*\.rb" -print0 | xargs -I {} -0 -n1 sh -c "ls {}; ruby -c {}"
- ruby scheck.rb
ruby_2.2:
image: ruby:2.2
......@@ -21,7 +21,7 @@ ruby_2.2:
- master
script:
- ruby -v
- find . -name "*\.rb" -print0 | xargs -I {} -0 -n1 sh -c "ls {}; ruby -c {}"
- ruby scheck.rb
ruby_2.3:
image: ruby:2.3
......@@ -32,7 +32,7 @@ ruby_2.3:
- master
script:
- ruby -v
- find . -name "*\.rb" -print0 | xargs -I {} -0 -n1 sh -c "ls {}; ruby -c {}"
- ruby scheck.rb
ruby_2.4:
image: ruby:2.4
......@@ -43,7 +43,7 @@ ruby_2.4:
- master
script:
- ruby -v
- find . -name "*\.rb" -print0 | xargs -I {} -0 -n1 sh -c "ls {}; ruby -c {}"
- ruby scheck.rb
jruby_1.7:
image: jruby:1.7
......@@ -54,7 +54,7 @@ jruby_1.7:
- master
script:
- ruby -v
- find . -name "*\.rb" -print0 | xargs -I {} -0 -n1 sh -c "ls {}; ruby --dev -c {}"
- ruby --dev scheck.rb
jruby_9.1:
image: jruby:9.1
......@@ -65,7 +65,7 @@ jruby_9.1:
- master
script:
- ruby -v
- find . -name "*\.rb" -print0 | xargs -I {} -0 -n1 sh -c "ls {}; ruby --dev -c {}"
- ruby --dev scheck.rb
rubocop:
stage: linting
......
#!/usr/bin/env ruby
ret = 0
Dir["**/*.rb"].each do |f|
res = %x(ruby -c #{f})
if res.empty?
ret = 1
puts "#{f} FAILED!"
else
puts "#{f.ljust(30)} #{res.rjust(30)}"
end
end
exit ret
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment