Browse Source

Add Gemfile and puppet 4 checks

In anticipation of puppet 4, start trying to deal with puppet 4 things
that can be helpfully predicted by puppet lint plugins. Also fix lint
errors caught by the puppet-lint-absolute_classname-check gem.

Change-Id: Icc120da2373214a9222e9434e725477096e989d3
changes/07/208807/1
Colleen Murphy 4 years ago
parent
commit
a94f089535
3 changed files with 33 additions and 1 deletions
  1. 2
    0
      .gitignore
  2. 30
    0
      Gemfile
  3. 1
    1
      manifests/file.pp

+ 2
- 0
.gitignore View File

@@ -0,0 +1,2 @@
1
+Gemfile.lock
2
+.bundled_gems/

+ 30
- 0
Gemfile View File

@@ -0,0 +1,30 @@
1
+source 'https://rubygems.org'
2
+
3
+group :development, :test do
4
+  gem 'puppetlabs_spec_helper', :require => false
5
+
6
+  gem 'metadata-json-lint'
7
+  # This is nice and all, but let's not worry about it until we've actually
8
+  # got puppet 4.x sorted
9
+  # gem 'puppet-lint-param-docs'
10
+  gem 'puppet-lint-absolute_classname-check'
11
+  gem 'puppet-lint-absolute_template_path'
12
+  gem 'puppet-lint-trailing_newline-check'
13
+
14
+  # Puppet 4.x related lint checks
15
+  gem 'puppet-lint-unquoted_string-check'
16
+  gem 'puppet-lint-empty_string-check'
17
+  gem 'puppet-lint-leading_zero-check'
18
+  gem 'puppet-lint-variable_contains_upcase'
19
+  gem 'puppet-lint-spaceship_operator_without_tag-check'
20
+  gem 'puppet-lint-undef_in_function-check'
21
+
22
+  if puppetversion = ENV['PUPPET_GEM_VERSION']
23
+    gem 'puppet', puppetversion, :require => false
24
+  else
25
+    gem 'puppet', '~> 3.0', :require => false
26
+  end
27
+
28
+end
29
+
30
+# vim:ft=ruby

+ 1
- 1
manifests/file.pp View File

@@ -14,7 +14,7 @@ define logrotate::file (
14 14
   # directives (e.g. missingok, compress).
15 15
   validate_string($options[0])
16 16
 
17
-  include logrotate
17
+  include ::logrotate
18 18
   # This allows us to handle fully pathed files
19 19
   $escaped_path = regsubst($name, '/', '_', 'G')
20 20
 

Loading…
Cancel
Save