Page MenuHomePhabricator

Update puppet-lint to 2.*
Closed, ResolvedPublic


Steps to reproduce

  • No steps since this is a feature request.

We could install puppet-lint on a Jessie instance or even nodepool and create a experimental test or a non voting one that uses Jessie or nodepool then fix all the errors found under the 2.* version and then replace the trusty version with the Jessie or nodepool version.

Event Timeline

hashar raised the priority of this task from Low to Medium.Nov 22 2016, 8:10 PM
hashar added a subscriber: Dzahn.

Jenkins/CI now runs puppet-lint via bundler / rake. So bumping puppet-lint is all about changing the version in the /Gemfile at the root of the repository and doing a few tweaks.

diff --git a/Gemfile b/Gemfile
index 6a2a44f..676ef32 100644
--- a/Gemfile
+++ b/Gemfile
@@ -6,5 +6,5 @@ gem 'puppetlabs_spec_helper', '< 2.0.0'
 gem 'rake', '~> 10.4', '>= 10.4.2'
 gem 'git', '1.3.0'
-gem 'puppet-lint', '1.1.0'
+gem 'puppet-lint', '~> 2.0.0'
 gem 'rubocop', '~> 0.35.1', require: false
$ bundle update
Using puppet-lint 2.0.2 (was 1.1.0)
$ bundle exec rake puppetlint

Will want to use --no-140chars-check

CI now runs puppet-lint from the generic job that runs rake, hence there is not much more we can do on CI side. Switching to puppet-lint 2 can be done as I described in my previous comment, and the leftover work is similar to T93645.

It should be straightforward to do, most of the manifests already have been adjusted to pass puppet-lint 2.

Change 322907 had a related patch set uploaded (by Hashar; owner: Dzahn):
[operations/puppet] puppet-lint: ignore 'lines over 140 chars' warnings

Change 322907 merged by Dzahn:
[operations/puppet] puppet-lint: ignore 'lines over 140 chars' warnings

Got merged as well: - bump version

Welcome to puppet-lint 2.x