A puppet-lint plugin to check that classes are included by their absolute name.
$ gem install puppet-lint-absolute_classname-check
gem 'puppet-lint-absolute_classname-check', :require => false
Including a class by a relative name might lead to unexpected results in Puppet 3. This plugin is not recommended for use with Puppet code that has dropped support for Puppet 3 (EOL 20161231).
include foobar
include ::foobar
To disable this check, you can add --no-relative_classname_inclusion-check
to your puppet-lint command line.
$ puppet-lint --no-relative_classname_inclusion-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
.
PuppetLint.configuration.send('disable_relative_classname_inclusion')
This plugin was originally authored by Camptocamp. 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 Camptocamp.
Previously: https://github.com/camptocamp/puppet-lint-absolute_classname-check