jenkins-bot has submitted this change and it was merged.

Change subject: Fix puppet-lint configuration to exclude submodules
......................................................................


Fix puppet-lint configuration to exclude submodules

Fix the code to find and exclude submodule paths from puppet-lint runs
to work with puppet-lint 1.1.0.
See https://github.com/rodjek/puppet-lint/issues/331

Change-Id: Ife56a7f6ff102a22e476c513beb2fe8a34f767cc
---
M Rakefile
1 file changed, 9 insertions(+), 7 deletions(-)

Approvals:
  Dduvall: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Rakefile b/Rakefile
index b6d13ea..e38fabb 100644
--- a/Rakefile
+++ b/Rakefile
@@ -4,12 +4,14 @@
 #
 require 'puppet-lint/tasks/puppet-lint'
 
-PuppetLint.configuration.send('disable_80chars')
-PuppetLint.configuration.send('disable_class_parameter_defaults')
-PuppetLint.configuration.send('disable_autoloader_layout')
-
-gitmodules = File.expand_path '../.gitmodules', __FILE__
-
-PuppetLint.configuration.ignore_paths = 
IO.readlines(gitmodules).grep(/\s*path\s*=\s*(\S+)/) { "#{$1}/**/*.pp" }
+# Work around bug in puppet-lint configuration
+# https://github.com/rodjek/puppet-lint/issues/331
+Rake::Task[:lint].clear
+PuppetLint::RakeTask.new(:lint) do |config|
+  gitmodules = File.expand_path('../.gitmodules', __FILE__)
+  config.ignore_paths = IO.readlines(gitmodules).grep(/\s*path\s*=\s*(\S+)/) { 
"#{$1}/**/*.pp" }
+  config.disable_checks = ['80chars', 'class_parameter_defaults', 
'autoloader_layout']
+  config.log_format = '%{path}:%{linenumber} %{KIND}: %{message}'
+end
 
 task :default => [:lint]

-- 
To view, visit https://gerrit.wikimedia.org/r/202985
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ife56a7f6ff102a22e476c513beb2fe8a34f767cc
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: BryanDavis <bda...@wikimedia.org>
Gerrit-Reviewer: Dduvall <dduv...@wikimedia.org>
Gerrit-Reviewer: Ori.livneh <o...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to