Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load rake tasks from voxpupuli-rubocop #527

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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