Run rubocop on Travis, add rake task.

This commit is contained in:
Andy Brody 2017-07-05 03:15:00 -04:00
parent 2ba8bdc8d5
commit 28d60a0a9a
3 changed files with 15 additions and 3 deletions

View File

@ -315,6 +315,9 @@ Layout/SpaceAroundOperators:
Layout/SpaceBeforeBlockBraces:
Enabled: false
Layout/EmptyLinesAroundBlockBody:
Enabled: false
# Offense count: 37
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.

View File

@ -20,7 +20,8 @@ rvm:
cache: bundler
script:
bundle exec rake test
- bundle exec rake test
- bundle exec rake rubocop
branches:
except:

View File

@ -38,12 +38,11 @@ desc 'Regenerate authors file'
task :authors do
Dir.chdir(File.dirname(__FILE__)) do
File.open('AUTHORS', 'w') do |f|
f.write( <<-EOM
f.write <<-EOM
The Ruby REST Client would not be what it is today without the help of
the following kind souls:
EOM
)
end
sh 'git shortlog -s | cut -f 2 >> AUTHORS'
@ -130,3 +129,12 @@ Rake::RDocTask.new do |t|
t.rdoc_files.include('README.md')
t.rdoc_files.include('lib/*.rb')
end
############################
require 'rubocop/rake_task'
RuboCop::RakeTask.new(:rubocop) do |t|
t.options = ['--display-cop-names']
end
alias_task(:lint, :rubocop)