From ed2520df7a12bcad5d97cf9c412ad2e12b441a75 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Wed, 17 Nov 2021 11:58:30 +0100 Subject: [PATCH] Configure puppet-lint to fail on warnings again In a4bed8a2af6734744715178fd5f2b11e8aa7ded1 the checks were restructured to be reconfigurable but the fail_on_warnings setting was lost. This means the rake task isn't failing even if there are warnings. Fixes: a4bed8a2af6734744715178fd5f2b11e8aa7ded1 --- lib/puppetlabs_spec_helper/rake_tasks.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/puppetlabs_spec_helper/rake_tasks.rb b/lib/puppetlabs_spec_helper/rake_tasks.rb index 662ac4e8..40330271 100644 --- a/lib/puppetlabs_spec_helper/rake_tasks.rb +++ b/lib/puppetlabs_spec_helper/rake_tasks.rb @@ -171,6 +171,7 @@ # Must clear as it will not override the existing puppet-lint rake task since we require to import for # the PuppetLint::RakeTask Rake::Task[:lint].clear +PuppetLint.configuration.fail_on_warnings = true # Utilize PuppetLint global configuration so that these settings can be tweaked by # spec_helper.rb in an individual module PuppetLint.configuration.relative = true