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:
parent
2ba8bdc8d5
commit
28d60a0a9a
3 changed files with 15 additions and 3 deletions
|
@ -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.
|
||||
|
|
|
@ -20,7 +20,8 @@ rvm:
|
|||
cache: bundler
|
||||
|
||||
script:
|
||||
bundle exec rake test
|
||||
- bundle exec rake test
|
||||
- bundle exec rake rubocop
|
||||
|
||||
branches:
|
||||
except:
|
||||
|
|
12
Rakefile
12
Rakefile
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue