Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PuppetLint.configuration.ignore_paths ignored by puppet-lint #417

Closed
hesco opened this issue Apr 20, 2015 · 7 comments
Closed

PuppetLint.configuration.ignore_paths ignored by puppet-lint #417

hesco opened this issue Apr 20, 2015 · 7 comments

Comments

@hesco
Copy link

hesco commented Apr 20, 2015

exclude_paths = [
  "fixtures/etc/puppet/modules/apt/manifests/conf.pp",
  "/Users/escoh/sandbox/raas-deployment/fixtures/etc/puppet/modules/**/*",
  "fixtures/etc/puppet/modules/**/*",
  "fixtures/**/*",
  "vendor/**/*",
  "spec/**/*",
  "pkg/**/*",
  "spec/fixtures/modules/**/*",
]

PuppetLint.configuration.ignore_paths = exclude_paths

still reports:

fixtures/etc/puppet/modules/apt/manifests/conf.pp - WARNING: defined type not documented on line 1

Apparently this was broken in v0.5.0, and seems to be broken again in puppet-lint (1.1.0). Perhaps the issue is in here: lib/puppet-lint/tasks/puppet-lint.rb, not sure.

@egeland
Copy link

egeland commented Apr 23, 2015

I can confirm this is the case.

$ bundle exec puppet-lint --version
puppet-lint 1.1.0

$ bundle exec puppet --version
4.0.0

$ ruby --version
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux-gnu]

I have excluded vendor/**/* and yet get everything in there checked by puppet-lint:

...
vendor/ruby/2.2.0/gems/puppet-4.0.0/spec/fixtures/integration/node/environment/sitedir/00_a.pp:1:autoloader_layout:ERROR:a not in autoload module layout
vendor/ruby/2.2.0/gems/puppet-4.0.0/spec/fixtures/integration/node/environment/sitedir/01_b.pp:1:autoloader_layout:ERROR:b not in autoload module layout
vendor/ruby/2.2.0/gems/puppet-4.0.0/spec/fixtures/integration/node/environment/sitedir/04_include.pp:2:double_quoted_strings:WARNING:double quoted string containing no variables
...

@paul91
Copy link

paul91 commented May 5, 2015

Seeing the same behavior on:

$ puppet-lint --version
puppet-lint 1.1.0

$ ruby --version
ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin13]

denmat added a commit to envato-archive/puppet-scout that referenced this issue May 11, 2015
@azhurbilo
Copy link

+1

But I try reproduce lib/puppet-lint/tasks/puppet-lint.rb behaviour with pure ruby

require 'rake'

DEFAULT_PATTERN = '**/*.pp'

matched_files = FileList[DEFAULT_PATTERN]
matched_files = matched_files.exclude(*["modules/**/*","manifests/**/*"])

puts matched_files

and it works fine

@mterzo
Copy link
Contributor

mterzo commented Oct 29, 2015

Fixed in: efb1967

@rnelson0
Copy link
Collaborator

Puppet-lint 2.0.0 is now available. It was previously identified that this issue was fixed in master, but please confirm that you no longer see this behavior with 2.0.0 before we close the ticket. Thank you!

@hesco
Copy link
Author

hesco commented Jun 22, 2016

Thank you! I have installed the the upgraded package and look forward to another opportunity to see if this feature works.

@rnelson0
Copy link
Collaborator

I tested this with v2.0.0. When I remove all configuration ignore_paths settings, it wants to check ALL .pp files. When I use this diff of my Rakefile, everything is copacetic:

@@ -37,9 +34,10 @@ PuppetLint.configuration.disable_arrow_alignment
 PuppetLint.configuration.disable_class_inherits_from_params_class
 PuppetLint.configuration.disable_class_parameter_defaults
 PuppetLint.configuration.fail_on_warnings = true
+PuppetLint.configuration.ignore_paths = exclude_paths

 PuppetLint::RakeTask.new :lint do |config|
-  config.ignore_paths = exclude_paths
+  #config.ignore_paths = exclude_paths
 end

As such, this appears to be working and I will close it. Thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants