From 8715214a49e84a73857f15acfe7511a3a5e62afd Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Wed, 2 Oct 2024 22:52:18 +0200 Subject: [PATCH] Load rake tasks from voxpupuli-rubocop We do the same on all our other gems. --- Rakefile | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Rakefile b/Rakefile index ae526920..6c0fd53e 100644 --- a/Rakefile +++ b/Rakefile @@ -57,16 +57,10 @@ end task update: %i[update_common_tests update_meta_schemas] -require 'rubocop/rake_task' -RuboCop::RakeTask.new(:rubocop) do |task| - # These make the rubocop experience maybe slightly less terrible - task.options = ['-D', '-S', '-E'] - - # Use Rubocop's Github Actions formatter if possible - if ENV['GITHUB_ACTIONS'] == 'true' - rubocop_spec = Gem::Specification.find_by_name('rubocop') - task.formatters << 'github' if Gem::Version.new(rubocop_spec.version) >= Gem::Version.new('1.2') - end +begin + require 'voxpupuli/rubocop/rake' +rescue LoadError + # the voxpupuli-rubocop gem is optional end task default: :test