diff --git a/.rubocop-disables.yml b/.rubocop-disables.yml index 9e3741a..5bd16e0 100644 --- a/.rubocop-disables.yml +++ b/.rubocop-disables.yml @@ -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. diff --git a/.travis.yml b/.travis.yml index 182000c..d5af272 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,8 @@ rvm: cache: bundler script: - bundle exec rake test + - bundle exec rake test + - bundle exec rake rubocop branches: except: diff --git a/Rakefile b/Rakefile index 39b9873..31d6bb0 100644 --- a/Rakefile +++ b/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)