From 92d3172e5cb9f8ada94aa3875e80586b4d4f48a3 Mon Sep 17 00:00:00 2001 From: Joshua Hoblitt Date: Fri, 28 Nov 2014 18:31:24 -0700 Subject: [PATCH] fail on linter warnings --- Gemfile | 2 +- Rakefile | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index b7b20f4..c229012 100644 --- a/Gemfile +++ b/Gemfile @@ -8,7 +8,7 @@ end gem 'rake', :require => false gem 'puppetlabs_spec_helper', :require => false -gem 'puppet-lint', :require => false +gem 'puppet-lint', '>= 1.1.0', :require => false gem 'puppet-syntax', :require => false gem 'rspec-puppet', :git => 'https://github.com/rodjek/rspec-puppet.git', diff --git a/Rakefile b/Rakefile index c4ec559..c53ba07 100644 --- a/Rakefile +++ b/Rakefile @@ -3,10 +3,15 @@ require 'puppet-syntax/tasks/puppet-syntax' require 'puppet-lint/tasks/puppet-lint' require 'rspec-system/rake_task' -PuppetSyntax.exclude_paths = ["spec/fixtures/**/*"] PuppetLint.configuration.send("disable_class_inherits_from_params_class") PuppetLint.configuration.send("disable_80chars") PuppetLint.configuration.ignore_paths = ['pkg/**/*.pp', 'spec/**/*.pp', 'tests/**/*.pp'] +PuppetSyntax.exclude_paths = ['spec/fixtures/**/*'] + +PuppetLint::RakeTask.new :lint do |config| + config.pattern = 'manifests/**/*.pp' + config.fail_on_warnings = true +end task :default => [ :syntax,