Skip to content

Commit

Permalink
update Rakefile
Browse files Browse the repository at this point in the history
  • Loading branch information
saz committed Mar 13, 2014
1 parent 9eb6039 commit 3727a2c
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
require 'rake'
require 'rubygems'
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 "Run puppet in noop mode and check for syntax errors."
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

0 comments on commit 3727a2c

Please sign in to comment.