You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.2KB

  1. require 'puppetlabs_spec_helper/rake_tasks'
  2. require 'puppet_blacksmith/rake_tasks'
  3. require 'voxpupuli/release/rake_tasks'
  4. require 'puppet-strings/rake_tasks'
  5. if RUBY_VERSION >= '2.3.0'
  6. require 'rubocop/rake_task'
  7. RuboCop::RakeTask.new(:rubocop) do |task|
  8. # These make the rubocop experience maybe slightly less terrible
  9. task.options = ['-D', '-S', '-E']
  10. end
  11. end
  12. PuppetLint.configuration.log_format = '%{path}:%{linenumber}:%{check}:%{KIND}:%{message}'
  13. PuppetLint.configuration.fail_on_warnings = true
  14. PuppetLint.configuration.send('relative')
  15. PuppetLint.configuration.send('disable_140chars')
  16. PuppetLint.configuration.send('disable_class_inherits_from_params_class')
  17. PuppetLint.configuration.send('disable_documentation')
  18. PuppetLint.configuration.send('disable_single_quote_string_with_variables')
  19. exclude_paths = %w(
  20. pkg/**/*
  21. vendor/**/*
  22. .vendor/**/*
  23. spec/**/*
  24. )
  25. PuppetLint.configuration.ignore_paths = exclude_paths
  26. PuppetSyntax.exclude_paths = exclude_paths
  27. desc 'Run acceptance tests'
  28. RSpec::Core::RakeTask.new(:acceptance) do |t|
  29. t.pattern = 'spec/acceptance'
  30. end
  31. desc 'Run tests metadata_lint, lint, syntax, spec'
  32. task test: [
  33. :metadata_lint,
  34. :lint,
  35. :syntax,
  36. :spec,
  37. ]
  38. # vim: syntax=ruby