format-staged/Rakefile

27 lines
577 B
Text
Raw Normal View History

2022-05-25 20:21:33 +02:00
# frozen_string_literal: true
require 'bundler/gem_tasks'
begin
Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
warn e.message
warn 'Run `bundle install` to install missing gems'
exit e.status_code
end
require 'rubocop/rake_task'
desc 'Run RuboCop'
RuboCop::RakeTask.new(:lint)
2022-05-29 10:20:33 +02:00
desc 'Run RuboCop for GitHub'
RuboCop::RakeTask.new(:lint_github) do |t|
t.requires << 'code_scanning'
t.formatters << 'CodeScanning::SarifFormatter'
t.options << '-o' << 'rubocop.sarif'
end
2022-05-29 11:14:54 +02:00
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)