File tree Expand file tree Collapse file tree 1 file changed +20
-12
lines changed
Expand file tree Collapse file tree 1 file changed +20
-12
lines changed Original file line number Diff line number Diff line change 11require 'rake/clean'
22require 'puppetlabs_spec_helper/rake_tasks'
3+ require 'puppet-lint/tasks/puppet-lint'
34require 'puppet-syntax/tasks/puppet-syntax'
45require 'rubocop/rake_task'
56
6- exclude_paths = [
7- 'spec/fixtures/**/*' ,
8- 'vendor/**/*' ,
9- 'pkg/**/*'
10- ]
7+ exclude_paths = %w(
8+ spec/**/*.pp
9+ pkg/**/*.pp
10+ )
11+
12+ disabled_checks = %w(
13+ 80chars
14+ class_inherits_from_params_class
15+ class_parameter_defaults
16+ documentation
17+ single_quote_string_with_variables
18+ variable_scope
19+ )
1120
1221task default : [ :spec , :lint , :rubocop ]
1322
14- PuppetLint . configuration . fail_on_warnings = true
15- PuppetLint . configuration . send ( 'relative' )
16- PuppetLint . configuration . send ( 'disable_80chars' )
17- # PuppetLint.configuration.send('disable_documentation')
18- PuppetLint . configuration . send ( 'disable_variable_scope' )
19- # PuppetLint.configuration.send('disable_single_quote_string_with_variables')
23+ PuppetLint :: RakeTask . new :lint do | config |
24+ config . fail_on_warnings = true
25+ config . relative = true
26+ config . disable_checks = disabled_checks
27+ config . ignore_paths = exclude_paths
28+ end
2029
21- PuppetLint . configuration . ignore_paths = exclude_paths
2230PuppetSyntax . exclude_paths = exclude_paths
2331
2432CLEAN . include ( 'coverage' )
You can’t perform that action at this time.
0 commit comments