Rakefile 913 B

123456789101112131415161718192021222324252627282930
  1. require 'puppetlabs_spec_helper/rake_tasks'
  2. require 'puppet-lint/tasks/puppet-lint'
  3. require 'puppet-syntax/tasks/puppet-syntax'
  4. PuppetLint.configuration.relative = true
  5. PuppetLint.configuration.log_format = "%{path}:%{linenumber}:%{check}:%{KIND}:%{message}"
  6. PuppetLint.configuration.fail_on_warnings = true
  7. PuppetLint.configuration.send('disable_class_parameter_defaults')
  8. PuppetLint.configuration.send('disable_class_inherits_from_params_class')
  9. PuppetLint.configuration.send('disable_80chars')
  10. PuppetLint.configuration.send('disable_containing_dash')
  11. PuppetLint.configuration.send('disable_quoted_booleans')
  12. PuppetLint.configuration.send('disable_documentation')
  13. exclude_paths = [
  14. "pkg/**/*",
  15. "vendor/**/*",
  16. "spec/**/*",
  17. ]
  18. Rake::Task[:lint].clear
  19. PuppetLint.configuration.ignore_paths = exclude_paths
  20. PuppetSyntax.exclude_paths = exclude_paths
  21. desc "Run syntax, lint"
  22. task :test => [
  23. :syntax,
  24. :lint,
  25. ]