No release in over 3 years
Low commit activity in last 3 years
Extends puppet-lint to ensure that a reference is made only on a declaration within the same class
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

< 3.0, >= 1.0
 Project Readme

puppet-lint plugin reference on declaration in class check

License Test Release RubyGem Version RubyGem Downloads Donated by example42

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.

gem '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.

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

and will result in the following warning:

WARNING: 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.

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

and will result in the following warning:

WARNING: reference on a foreign class

Transfer Notice

This plugin was originally authored by example42. The maintainer preferred that Puppet Community take ownership of the module for future improvement and maintenance. Existing pull requests and issues were transferred over, please fork and continue to contribute here instead of example42.

License

This gem is licensed under the Apache-2 license.

Release information

To make a new release, please do:

  • update the version in the gemspec file
  • Install gems with bundle install --with release --path .vendor
  • generate the changelog with bundle exec rake changelog
  • Check if the new version matches the closed issues/PRs in the changelog
  • Create a PR with it
  • After it got merged, push a tag. GitHub actions will do the actual release to rubygems and GitHub Packages