From a0e0ba395d200536747b9860eee39921f06c9166 Mon Sep 17 00:00:00 2001 From: "R. Tyler Croy" Date: Sun, 30 Jun 2013 20:10:38 -0700 Subject: [PATCH] Correct the Rakefile's lint target for the new local-modules tree --- Rakefile | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) diff --git a/Rakefile b/Rakefile index 70c25e7..cd9c87b 100644 --- a/Rakefile +++ b/Rakefile @@ -2,24 +2,9 @@ require 'puppet-lint/tasks/puppet-lint' PuppetLint.configuration.send('disable_names_containing_dash') PuppetLint.configuration.send('disable_80chars') +PuppetLint.configuration.send('disable_documentation') - -def ignored_modules - ## - ## We're going to ignore all the submodules, since we don't really care how - ## crappy their code is - ignores = [] - regex = /(".*?")/ - File.open('.gitmodules').each_line do |line| - matches = line.match(regex) - if matches - ignores << matches[1].gsub('"', '') - end - end - return ignores -end - -PuppetLint.configuration.ignore_paths = ignored_modules.map { |p| "#{p}/**/*.pp" } +PuppetLint.configuration.ignore_paths = ["modules/**/*.pp"] def each_manifest(&block) @@ -27,18 +12,8 @@ def each_manifest(&block) yield filename end - Dir.glob("modules/**/*.pp") do |filename| - found = false - ignored_modules.each do |ignore| - if filename.start_with? ignore - found = true - break - end - end - - unless found - yield filename - end + Dir.glob("local-modules/**/*.pp") do |filename| + yield filename end end