I am using https://github.com/garethr/puppet-module-skeleton as my Puppet module skeleton. For a particular module I am then using puppet-lint via rake. The relevant sections in my Rakefile are as follows:
require 'puppet-lint/tasks/puppet-lint'
PuppetLint.configuration.relative = true
PuppetLint.configuration.send("disable_80chars")
PuppetLint.configuration.log_format = "%{path}:%{linenumber}:%{check}:%{KIND}:%{message}"
PuppetLint.configuration.fail_on_warnings = true
# Forsake support for Puppet 2.6.2 for the benefit of cleaner code.
# http://puppet-lint.com/checks/class_parameter_defaults/
PuppetLint.configuration.send('disable_class_parameter_defaults')
# http://puppet-lint.com/checks/class_inherits_from_params_class/
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
exclude_paths = [
"pkg/**/*",
"vendor/**/*",
"spec/**/*",
]
PuppetLint.configuration.ignore_paths = exclude_paths
When running bundle exec rake lint
I get the expected output from puppet-lint, except that puppet-lint is checking files in, for example, vendor/bundle
and spec/fixtures/modules
as well. Besides not beeing intended, it seems to contradict the last six lines of the above Rakefile snippet. What's wrong?
As you linked, this is currently broken
It has been fixed in this commit: https://github.com/rodjek/puppet-lint/commit/0f2e2db90d5a14382eafbdfebff74048a487372f
However, this was made after the release of
1.1.0
So you can either use the direct Github reference in bundler (or wait for the next release)
Or use the work-around you posted: