Skip to content

Commit 84883d8

Browse files
committed
Add rubocop task to travis
1 parent 39e5aff commit 84883d8

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,18 @@ branches:
66
only:
77
- master
88
bundler_args: --without development system_tests
9+
script:
10+
- bundle exec rake $CHECK
11+
env:
12+
- CHECK=test
913
rvm:
1014
- 1.9.3
1115
- 2.0.0
1216
- 2.1.10
1317
- 2.2.7
1418
- 2.3.4
1519
- 2.4.1
20+
matrix:
21+
include:
22+
- rvm: 2.4.1
23+
env: CHECK=rubocop

Rakefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,14 @@ rescue LoadError
1717
$stderr.puts 'Changelog generation requires Ruby 2.0 or higher'
1818
end
1919

20+
begin
21+
require 'rubocop/rake_task'
22+
23+
RuboCop::RakeTask.new(:rubocop) do |task|
24+
task.options = %w[-D -E]
25+
end
26+
rescue LoadError
27+
$stderr.puts 'Rubocop is not available for this version of Ruby.'
28+
end
29+
2030
# vim: syntax=ruby

0 commit comments

Comments
 (0)