From f7ba060eea15d90009a238703ccb97c5183b8fb1 Mon Sep 17 00:00:00 2001 From: Gael Chamoulaud Date: Thu, 19 Mar 2015 20:09:22 +0100 Subject: [PATCH] Add Puppet 4.x lint checks - This changes the puppet-lint requirement to 1.1.x, so that we can use puppet-lint plugins. Most of these plugins are for 4.x compat, but some just catch common errors. Change-Id: I5f5859ab24c4d5f2f0b3737303ece9ddcb70927f Signed-off-by: Gael Chamoulaud --- Gemfile | 13 ++++++++++++- manifests/init.pp | 2 +- tests/init.pp | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 2243a4c5..aca61249 100644 --- a/Gemfile +++ b/Gemfile @@ -2,8 +2,19 @@ source 'https://rubygems.org' group :development, :test do gem 'puppetlabs_spec_helper', :require => false - gem 'puppet-lint', '~> 0.3.2' + + gem 'puppet-lint', '~> 1.1.0' gem 'metadata-json-lint' + 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' + gem 'rspec-puppet', '~> 1.0.1' gem 'rake', '10.1.1' gem 'rspec', '< 2.99' diff --git a/manifests/init.pp b/manifests/init.pp index 4f86308c..b2d58c15 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -74,7 +74,7 @@ class tempest( $swift_available = false ) { - include 'tempest::params' + include '::tempest::params' if $install_from_source { ensure_packages([ diff --git a/tests/init.pp b/tests/init.pp index 88322241..578eb0f7 100644 --- a/tests/init.pp +++ b/tests/init.pp @@ -9,4 +9,4 @@ # Learn more about module testing here: # http://docs.puppetlabs.com/guides/tests_smoke.html # -include tempest +include ::tempest