forked from dev-sec/puppet-os-hardening
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
32 lines (24 loc) · 786 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
30
31
32
#!/usr/bin/env rake
# encoding: utf-8
require 'puppet-lint/tasks/puppet-lint'
require 'puppetlabs_spec_helper/rake_tasks'
PuppetLint.configuration.send('disable_autoloader_layout')
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.fail_on_warnings = true
PuppetLint.configuration.ignore_paths = ['vendor/**/*.pp']
if RUBY_VERSION > '1.9.2'
require 'rubocop'
require 'rubocop/rake_task'
desc 'Run all linters: rubocop and puppet-lint'
task :run_all_linters => [:rubocop, :lint]
# Rubocop
desc 'Run Rubocop lint checks'
task :rubocop do
RuboCop::RakeTask.new
end
task :default => [:run_all_linters, :spec]
else
desc 'Run all linters: rubocop and puppet-lint'
task :run_all_linters => [:lint]
task :default => [:lint, :spec]
end