Zfilipin has uploaded a new change for review.
https://gerrit.wikimedia.org/r/197678
Change subject: Fixed Style/HashSyntax RuboCop offense
......................................................................
Fixed Style/HashSyntax RuboCop offense
$ bundle exec rubocop --auto-correct
Inspecting 25 files
.CCC.....................
Offenses:
maintenance/jsduck/custom_tags.rb:16:16: C: [Corrected] Use the new
Ruby 1.9 hash syntax.
return { :tagname => @tagname, :doc => :multiline }
^^^^^^^^^^^
maintenance/jsduck/custom_tags.rb:16:38: C: [Corrected] Use the new
Ruby 1.9 hash syntax.
return { :tagname => @tagname, :doc => :multiline }
^^^^^^^
maintenance/jsduck/custom_tags.rb:19:16: C: [Corrected] Use the new
Ruby 1.9 hash syntax.
return { :tagname => @tagname, :doc => text }
^^^^^^^^^^^
maintenance/jsduck/custom_tags.rb:19:38: C: [Corrected] Use the new
Ruby 1.9 hash syntax.
return { :tagname => @tagname, :doc => text }
^^^^^^^
tests/browser/features/step_definitions/create_account_steps.rb:13:28:
C: [Corrected] Use the new Ruby 1.9 hash syntax.
visit(CreateAccountPage, :using_params => { :page_title => path })
^^^^^^^^^^^^^^^^
tests/browser/features/step_definitions/create_account_steps.rb:13:47:
C: [Corrected] Use the new Ruby 1.9 hash syntax.
visit(CreateAccountPage, :using_params => { :page_title => path })
^^^^^^^^^^^^^^
tests/browser/features/step_definitions/create_and_follow_wiki_link_step
s.rb:9:22: C: [Corrected] Use the new Ruby 1.9 hash syntax.
visit(ZtargetPage, :using_params => { :article_name => article })
^^^^^^^^^^^^^^^^
tests/browser/features/step_definitions/create_and_follow_wiki_link_step
s.rb:9:41: C: [Corrected] Use the new Ruby 1.9 hash syntax.
visit(ZtargetPage, :using_params => { :article_name => article })
^^^^^^^^^^^^^^^^
25 files inspected, 8 offenses detected, 8 offenses corrected
Bug: T91485
Change-Id: Ic2aff32e106c5b5eaa45839ad3310b97fcec6ddf
---
M .rubocop_todo.yml
M maintenance/jsduck/custom_tags.rb
M tests/browser/features/step_definitions/create_account_steps.rb
M tests/browser/features/step_definitions/create_and_follow_wiki_link_steps.rb
4 files changed, 4 insertions(+), 10 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/78/197678/1
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 97ef233..5b8c965 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -5,12 +5,6 @@
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
-# Offense count: 8
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, SupportedStyles.
-Style/HashSyntax:
- Enabled: false
-
# Offense count: 81
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
diff --git a/maintenance/jsduck/custom_tags.rb
b/maintenance/jsduck/custom_tags.rb
index 90fbc8b..a5da3b0 100644
--- a/maintenance/jsduck/custom_tags.rb
+++ b/maintenance/jsduck/custom_tags.rb
@@ -13,10 +13,10 @@
def parse_doc(scanner, _position)
if @multiline
- return { :tagname => @tagname, :doc => :multiline }
+ return { tagname: @tagname, doc: :multiline }
else
text = scanner.match(/.*$/)
- return { :tagname => @tagname, :doc => text }
+ return { tagname: @tagname, doc: text }
end
end
diff --git a/tests/browser/features/step_definitions/create_account_steps.rb
b/tests/browser/features/step_definitions/create_account_steps.rb
index 79507ca..6e6eb68 100644
--- a/tests/browser/features/step_definitions/create_account_steps.rb
+++ b/tests/browser/features/step_definitions/create_account_steps.rb
@@ -10,7 +10,7 @@
# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/CREDITS
#
Given(/^I go to Create account page at (.+)$/) do |path|
- visit(CreateAccountPage, :using_params => { :page_title => path })
+ visit(CreateAccountPage, using_params: { page_title: path })
end
Then(/^form has Create account button$/) do
diff --git
a/tests/browser/features/step_definitions/create_and_follow_wiki_link_steps.rb
b/tests/browser/features/step_definitions/create_and_follow_wiki_link_steps.rb
index 6197b6b..cfc5b2e 100644
---
a/tests/browser/features/step_definitions/create_and_follow_wiki_link_steps.rb
+++
b/tests/browser/features/step_definitions/create_and_follow_wiki_link_steps.rb
@@ -6,7 +6,7 @@
Given(/^I am on the (.+) page$/) do |article|
article = article.gsub(/ /, '_')
- visit(ZtargetPage, :using_params => { :article_name => article })
+ visit(ZtargetPage, using_params: { article_name: article })
end
Given(/^I create page "(.*?)" with content "(.*?)"$/) do |page_title,
page_content|
--
To view, visit https://gerrit.wikimedia.org/r/197678
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic2aff32e106c5b5eaa45839ad3310b97fcec6ddf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Zfilipin <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits