diff --git a/Gemfile b/Gemfile index d965fa90..b470b765 100644 --- a/Gemfile +++ b/Gemfile @@ -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' diff --git a/Rakefile b/Rakefile index 2e74217e..c022216c 100644 --- a/Rakefile +++ b/Rakefile @@ -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