require 'rubocop/rake_task'

namespace :rubocop do
  desc 'Run RuboCop on new git files'
  RuboCop::RakeTask.new(:new) do |task|
    task.patterns = `git diff --cached --name-only --diff-filter=A -- *.rb`.split("\n")
  end

  desc 'Run RuboCop on all files'
  RuboCop::RakeTask.new(:all)
end

task rubocop: ['rubocop:all']

require 'rubocop/rake_task'

namespace :rubocop do
  desc 'Run RuboCop on new git files'
  RuboCop::RakeTask.new(:new) do |task|
    task.patterns = `git diff --cached --name-only --diff-filter=A -- *.rb`.split("\n")
    task.options << '--lint'
  end

  desc 'Run RuboCop on all files'
  RuboCop::RakeTask.new(:all) do |task|
    task.options << '--lint'
  end
end

task rubocop: ['rubocop:all']

Change Rubocup setting to only run lint and not other checks (including style)
Change Rubocup setting to only run lint and not other checks (including style)

Signed-off-by: Victor Fong <95c00c4b759dfd5c0c9bab0c67fa20ed75fca00d@emc.com>
