voxpupuli/puppet-lint-appends-check

Name: puppet-lint-appends-check

Owner: Vox Pupuli

Description: null

Created: 2015-03-11 21:54:19.0

Updated: 2016-12-14 08:15:29.0

Pushed: 2016-12-14 08:15:28.0

Homepage: null

Size: 13

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

puppet-lint-appends-check

Build Status Gem Version Gem Downloads Coverage Status Gemnasium

A puppet-lint plugin to check that the append (+=) operator is unused.

Installing
From the command line
m install puppet-lint-appends-check
In a Gemfile
'puppet-lint-appends-check', :require => false
Checks
Append operator use

Use of the append operator can lead to unexpected behavior.

What you have done
_users = ['myself', 'someone']

s test {
sh_users += ['someone_else']

What you should have done
_users = ['myself', 'someone', 'someone_else']


_users = hiera('ssh_users')
Auto fixing

There is not one way to properly fix this type of style error, so running puppet-lint's fix feature will not have any effect.

Disabling the check

To disable this check, you can add --no-appends-check to your puppet-lint command line.

ppet-lint --no-appends-check path/to/file.pp

Alternatively, if you?re calling puppet-lint via the Rake task, you should insert the following line to your Rakefile.

etLint.configuration.send('disable_appends')

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.