Skip to content

Commit

Permalink
Get ignore_paths from the configuration
Browse files Browse the repository at this point in the history
I noticed that ignore_paths is not working when set as documented.
```
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
```

Simply because @ignore_paths is defined on task creation.

There are two examples, the one configuring the tasks works of course,
the second like above doesn't work without my addition.
  • Loading branch information
lazyfrosch committed Feb 24, 2015
1 parent 62dfab3 commit efb1967
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/puppet-lint/tasks/puppet-lint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ def define(args, &task_block)
PuppetLint.configuration.send("#{config}=".to_sym, value) unless value.nil?
end

if PuppetLint.configuration.ignore_paths
@ignore_paths = PuppetLint.configuration.ignore_paths
end

RakeFileUtils.send(:verbose, true) do
linter = PuppetLint.new
matched_files = FileList[@pattern]
Expand Down

0 comments on commit efb1967

Please sign in to comment.