1
0
Fork 0
mirror of https://github.com/rest-client/rest-client.git synced 2022-11-09 13:49:40 -05:00

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: Layout/SpaceBeforeBlockBraces:
Enabled: false Enabled: false
Layout/EmptyLinesAroundBlockBody:
Enabled: false
# Offense count: 37 # Offense count: 37
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters. # Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.

View file

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

View file

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