Zfilipin has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/250408

Change subject: Fixed Style/PerlBackrefs RuboCop offence
......................................................................

Fixed Style/PerlBackrefs RuboCop offence

Rakefile:24:8: C: [Corrected] Avoid the use of Perl-style backrefs.
    "#{$1}/**/*.pp"
       ^^

Bug: T106220
Change-Id: I319de9521ee4f49d80c893430f1bb38776105ae4
---
M .rubocop_todo.yml
M Rakefile
2 files changed, 1 insertion(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/08/250408/1

diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 2e8a33e..3437201 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -73,12 +73,6 @@
 
 # Offense count: 1
 # Cop supports --auto-correct.
-Style/PerlBackrefs:
-  Exclude:
-    - 'Rakefile'
-
-# Offense count: 1
-# Cop supports --auto-correct.
 Style/RedundantBegin:
   Exclude:
     - 'lib/mediawiki-vagrant/paste-puppet.rb'
diff --git a/Rakefile b/Rakefile
index 66fa072..30de9ed 100644
--- a/Rakefile
+++ b/Rakefile
@@ -21,7 +21,7 @@
 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"
+    "#{Regexp.last_match(1)}/**/*.pp"
   }
   config.ignore_paths += ['tmp/**/*.pp']
   config.log_format = '%{path}:%{linenumber} %{KIND}: %{message}'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I319de9521ee4f49d80c893430f1bb38776105ae4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Zfilipin <zfili...@wikimedia.org>

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

Reply via email to