forked from increments/circleci-coverage_reporter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
29 lines (22 loc) · 763 Bytes
/
Rakefile
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
# frozen_string_literal: true
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'rubocop/rake_task'
require 'yard'
require 'circleci_reporter/rake_task'
require 'rubycritic/rake_task'
RSpec::Core::RakeTask.new do |task|
task.verbose = false
end
RuboCop::RakeTask.new
YARD::Rake::YardocTask.new
CircleCIReporter.configure do |config|
config.reporters << CircleCIReporter::Reporters::Link.new(path: 'doc/index.html', name: 'YARD')
end
desc 'Run RubyCritic'
task :rubycritic do
base_options = "-p #{ENV['CIRCLE_ARTIFACTS'] || '.'}/rubycritic --mode-ci --no-browser"
sh "bundle exec rubycritic #{base_options} -f html lib"
sh "bundle exec rubycritic #{base_options} -f json lib" if ENV['CIRCLECI']
end
task default: %i[spec rubocop]