voxpupuli/puppet-lint-reference_on_declaration_outside_of_class-check

Name: puppet-lint-reference_on_declaration_outside_of_class-check

Owner: Vox Pupuli

Description: null

Created: 2016-05-01 10:13:02.0

Updated: 2017-01-02 00:48:43.0

Pushed: 2017-01-02 00:51:02.0

Homepage: null

Size: 16

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

puppet-lint plugin reference on declaration in class check

Note: this plugin will check for references which are declared outside of the class where the reference is used.

Installation

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

'puppet-lint-reference_on_declaration_outside_of_class-check'
Usage

This plugin provides one new check to puppet-lint.

reference_on_declaration_outside_of_class

–fix support: No

This check will raise a warning for any resource reference that is not declared inside the same class.

ass 'foo' {
package { 'foo':
  ensure => present,
}
file { '/tmp/foo':
  ensure  => file,
  require => Package['foo2'],
}

and will result in the following warning:

ING: reference on non local resource declaration
reference_on_foreign_class

–fix support: No

This check will raise a warning for any class reference that is not declared inside the class.

lass 'demo' {
 class { 'demo::install': }
 include demo::config
 Class['demo::install'] -> Class['foobar']

and will result in the following warning:

ING: reference on a foreign class

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.