Closed bjfish closed 4 years ago
It seems there's no consistency in how we define rubocop
task across projects.
if RUBY_VERSION >= '2.4' && RUBY_ENGINE == 'ruby'
require 'rubocop/rake_task'
RuboCop::RakeTask.new(:rubocop)
end
if RUBY_VERSION >= '2.4' && RUBY_ENGINE == 'ruby'
task :default => [:spec, :cucumber, :rubocop]
else
desc 'Run RuboCop on the lib directory'
task :rubocop do
sh 'bundle exec rubocop lib'
end
Do you plan to touch those Rakefiles as well @bjfish ?
@pirj I'd probably leave them alone unless I had some issue. They appear they'd work as is for my use case: bundle exec rake spec
.
@pirj I think it was done to limit what rubocop is applied to, but it also addresses this issue in a different way.
I encountered the following error:
because the
Gemfile
has the following condition for including this dependency:So, I've added the same condition to the
Rakefile
.