Add Puppet 4.x lint checks

- This change adds Puppet-lint bits for checking Puppet manifests.

Change-Id: I95506e7fd5261efde317cfaa99048055d3ed0ec3
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
(cherry picked from commit c4e0866009)
This commit is contained in:
Gael Chamoulaud 2015-10-30 11:53:07 +01:00 committed by Steven Hardy
parent 6ff4db95fa
commit bbf30e1ce1
3 changed files with 34 additions and 0 deletions

2
.gitignore vendored
View File

@ -33,6 +33,8 @@ nosetests.xml
.mr.developer.cfg
.project
.pydevproject
*.bundle
Gemfile.lock
# Mr Mac User
.DS_Store

26
Gemfile Normal file
View File

@ -0,0 +1,26 @@
source 'https://rubygems.org'
group :development, :test do
gem 'puppetlabs_spec_helper', :require => false
# FIXME: need to install puppet-lint gem from github.com because of
# https://github.com/rodjek/puppet-lint/issues/409
gem 'puppet-lint', :git => 'git://github.com/rodjek/puppet-lint.git'
gem 'puppet-lint-absolute_classname-check'
gem 'puppet-lint-absolute_template_path'
gem 'puppet-lint-trailing_newline-check'
# Puppet 4.x related lint checks
gem 'puppet-lint-unquoted_string-check'
gem 'puppet-lint-leading_zero-check'
gem 'puppet-lint-variable_contains_upcase'
gem 'puppet-lint-numericvariable'
end
if puppetversion = ENV['PUPPET_GEM_VERSION']
gem 'puppet', puppetversion, :require => false
else
gem 'puppet', :require => false
end
# vim:ft=ruby

6
Rakefile Normal file
View File

@ -0,0 +1,6 @@
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
PuppetLint.configuration.fail_on_warnings = true
PuppetLint.configuration.send('disable_80chars')