-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
30 lines (23 loc) · 693 Bytes
/
Rakefile
File metadata and controls
30 lines (23 loc) · 693 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# 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)
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
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
RSpec::Core::RakeTask.new(:spec_github) do |t|
t.rspec_opts = '--format RspecJunitFormatter --out rspec.xml'
end