voxpupuli/puppet-lint-resource_reference_syntax

Name: puppet-lint-resource_reference_syntax

Owner: Vox Pupuli

Description: null

Created: 2015-09-25 19:37:31.0

Updated: 2016-11-16 16:02:15.0

Pushed: 2018-01-04 14:01:17.0

Homepage: null

Size: 29

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

puppet-lint plugin resource reference check

Note, this plugin will check for Puppet resource reference syntax which will no longer work with Puppet 4.x.

Installation

To use this plugin, add the following like to the Gemfile in your Puppet code base and run bundle install.

'puppet-lint-resource_reference_syntax'
Usage

This plugin provides two new checks to puppet-lint.

resource_reference_without_whitespace

–fix support: No

This check will raise an error for any resource reference that has a whitespace between the Type reference and the opening bracket.

e.g. the following code is NOT good for Puppet 4:

quire => File ['/etc/motd']

and will result in the following error:

R: whitespce between reference type and title on line 4
resource_reference_without_title_capital

–fix support: No

This check will raise an error for any resource reference that uses the title with capital letter without enclosed quotes.

e.g. the following code will not work on Puppet 4:

quire => Service[Apache],
quire => Service[Apache, Mysql],
quire => Service[apache]

and will result in the following error:

R: resource reference with title with capital letter on line 4

The following references are good code for Puppet 4:

quire => Service['apache'],
quire => Service['apache', 'mysql'], 
quire => [ Service['apache'], Service['mysql'] ],

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.