diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-12-30 13:39:04 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-12-30 13:39:04 -0200 |
commit | 8a074424708a2ca7c7625e138fe29621ae3315a8 (patch) | |
tree | 0a1a47e55d7d49114cf246b9efea1e0907ee1cbd /Rakefile | |
parent | a1bde593bf95ea1048a35ad6c42cbad8c7a51971 (diff) | |
parent | 6fcf75d46a5c7fcd00fd4470270552b543cf4452 (diff) | |
download | puppet-common-master.tar.gz puppet-common-master.tar.bz2 |
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..85326bb --- /dev/null +++ b/Rakefile @@ -0,0 +1,19 @@ +require 'puppetlabs_spec_helper/rake_tasks' +require 'puppet-lint/tasks/puppet-lint' +PuppetLint.configuration.send('disable_80chars') +PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"] + +desc "Validate manifests, templates, and ruby files" +task :validate do + Dir['manifests/**/*.pp'].each do |manifest| + sh "puppet parser validate --noop #{manifest}" + end + Dir['spec/**/*.rb','lib/**/*.rb'].each do |ruby_file| + sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/ + end + Dir['templates/**/*.erb'].each do |template| + sh "erb -P -x -T '-' #{template} | ruby -c" + end +end + +task :test => [:lint, :syntax , :validate, :spec] |