Added metadata lint and puppet-syntax gems

metadata-json-lint is a little tool to check the validity of
Puppet metatdata.json files.

puppet-syntax tool check the validity of templates,manifests and hiera
files (the goal here is to replace manual checks in the gate by a
standard? check `rake syntax`).

Change-Id: I60b9cdfe27eeb8a8f5ad3a238dd847ed3096cb6b
This commit is contained in:
Sebastien Badia 2014-10-09 16:50:53 +02:00
parent 2743465bdc
commit 94825922a0
2 changed files with 12 additions and 0 deletions

View File

@ -3,6 +3,8 @@ source 'https://rubygems.org'
group :development, :test do
gem 'puppetlabs_spec_helper', :require => false
gem 'puppet-lint', '~> 0.3.2'
gem 'metadata-json-lint'
gem 'puppet-syntax'
gem 'rake', '10.1.1'
gem 'rspec', '< 2.99'
gem 'json'

View File

@ -1,7 +1,17 @@
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
require 'puppet-syntax/tasks/puppet-syntax'
PuppetLint.configuration.fail_on_warnings = true
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.send('disable_class_parameter_defaults')
PuppetLint.configuration.send('disable_only_variable_string')
exclude_tests_paths = ['pkg/**/*','vendor/**/*']
PuppetLint.configuration.ignore_paths = exclude_tests_paths
PuppetSyntax.exclude_paths = exclude_tests_paths
desc "Lint metadata.json file"
task :metadata do
sh "metadata-json-lint metadata.json"
end