Skip to content

Instantly share code, notes, and snippets.

@maxlinc
Created June 27, 2013 16:08
Show Gist options
  • Save maxlinc/5877775 to your computer and use it in GitHub Desktop.
Save maxlinc/5877775 to your computer and use it in GitHub Desktop.
Puppet Linting
require 'puppet-lint'
PuppetLint.configuration.log_format = '%{path}:%{linenumber} - %{KIND}: %{message}'
PuppetLint.configuration.send('disable_80chars')
task :lint do
linter = PuppetLint.new
PuppetLint.configuration.send("disable_documentation")
Dir['manifests/**/*.pp'].each do |pp|
linter.file = pp
linter.run
end
fail if linter.errors?
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment