forked from ekohl/puppet-lint-stdlib_deprecated
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
29 lines (24 loc) · 780 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
begin
require 'rspec/core/rake_task'
rescue LoadError
# rspec in in an optional group
else
RSpec::Core::RakeTask.new(:spec)
end
begin
require 'rubocop/rake_task'
rescue LoadError
# RuboCop is an optional group
else
RuboCop::RakeTask.new(:rubocop) do |task|
# These make the rubocop experience maybe slightly less terrible
task.options = ['--display-cop-names', '--display-style-guide', '--extra-details']
# Use Rubocop's Github Actions formatter if possible
task.formatters << 'github' if ENV['GITHUB_ACTIONS'] == 'true'
end
end
default_deps = []
default_deps << :rubocop if Rake::Task.task_defined?(:rubocop)
default_deps << :spec if Rake::Task.task_defined?(:spec)
task default: default_deps if default_deps.any?