Skip to content

Commit

Permalink
Merge pull request #527 from bastelfreak/vp
Browse files Browse the repository at this point in the history
Load rake tasks from voxpupuli-rubocop
  • Loading branch information
bastelfreak authored Oct 3, 2024
2 parents 9d2d105 + 8715214 commit 9bee4d3
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9bee4d3

Please sign in to comment.