diff --git a/README.md b/README.md index 37b6526..2dc9f8e 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,7 @@ rake syntax:templates rake test # Run tests rake travis_release # Deprecated: use the "release" task instead rake validate # Check syntax of Ruby files and call :syntax and :metadata_lint +rake voxpupuli:custom:lint_all # Lint with all puppet-lint checks ``` ## Additionally included Tools diff --git a/voxbox/Rakefile b/voxbox/Rakefile index 58c2cc8..db972f7 100644 --- a/voxbox/Rakefile +++ b/voxbox/Rakefile @@ -4,3 +4,27 @@ require 'voxpupuli/release/rake_tasks' require 'ra10ke' Ra10ke::RakeTask.new + +namespace :voxpupuli do + namespace :custom do + desc 'Lint with all puppet-lint checks' + task :lint_all do + # re-enable by puppetlabs disabled checks from puppetlabs/spec_helper + # see: https://github.com/puppetlabs/puppetlabs_spec_helper/blob/70de49db0a242f83e9ff39ea8a03c830339f8368/lib/puppetlabs_spec_helper/rake_tasks.rb#L169-L177 + puppet_lint_enable_checks = %w[ + 140chars + class_inherits_from_params_class + class_parameter_defaults + autoloader_layout + documentation + single_quote_string_with_variables + ] + + puppet_lint_enable_checks.each do |check| + PuppetLint.configuration.send(:"enable_#{check}") + end + + Rake::Task[:lint].invoke + end + end +end