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

Change subject: RuboCop setup
......................................................................


RuboCop setup

Basic configuration file was created, according to recommendation at
https://www.mediawiki.org/wiki/Manual:Coding_conventions/Ruby#Base_confi
guration

TODO file was regenerated with the new version of RuboCop.

Bug: T112097
Change-Id: I6460cc6f8eef300b16dfb571a4c5457c3c935159
---
M .rubocop.yml
M .rubocop_todo.yml
M Gemfile
M Gemfile.lock
4 files changed, 99 insertions(+), 24 deletions(-)

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



diff --git a/.rubocop.yml b/.rubocop.yml
index cc32da4..efddb4b 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -1 +1,24 @@
 inherit_from: .rubocop_todo.yml
+
+AllCops:
+  StyleGuideCopsOnly: true
+
+# Uncomment when the violation is fixed
+# Metrics/LineLength:
+#   Max: 100
+
+Metrics/MethodLength:
+  Enabled: false
+
+Style/Alias:
+  Enabled: false
+
+Style/SignalException:
+  Enabled: false
+
+# Uncomment when the violation is fixed
+# Style/StringLiterals:
+#   EnforcedStyle: single_quotes
+
+Style/TrivialAccessors:
+  ExactNameMatch: true
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 78f2eba..69a695d 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -1,39 +1,75 @@
-# This configuration was generated by `rubocop --auto-gen-config`
-# on 2014-12-05 09:03:35 -0700 using RuboCop version 0.27.1.
+# This configuration was generated by
+# `rubocop --auto-gen-config`
+# on 2015-09-10 16:28:27 +0200 using RuboCop version 0.34.1.
 # The point is for the user to remove these configuration records
 # one by one as the offenses are removed from the code base.
 # Note that changes in the inspected code, or installation of new
 # versions of RuboCop, may require this file to be generated again.
 
-# Offense count: 9
-Lint/AmbiguousRegexpLiteral:
-  Enabled: false
-
-# Offense count: 1
-Lint/ParenthesesAsGroupedExpression:
-  Enabled: false
-
-# Offense count: 1
-# Configuration parameters: CountComments.
-Metrics/ClassLength:
-  Max: 109
-
-# Offense count: 54
+# Offense count: 26
 # Configuration parameters: AllowURI, URISchemes.
 Metrics/LineLength:
-  Max: 428
+  Max: 112
 
-# Offense count: 13
-Style/Documentation:
-  Enabled: false
+# Offense count: 2
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle, SupportedStyles.
+Style/AlignParameters:
+  Exclude:
+    - 'tests/browser/features/support/pages/gather_page.rb'
 
-# Offense count: 1
-# Configuration parameters: AllowedVariables.
-Style/GlobalVars:
+# Offense count: 2
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle, SupportedStyles, 
UseHashRocketsWithSymbolValues.
+Style/HashSyntax:
   Enabled: false
 
 # Offense count: 1
 # Cop supports --auto-correct.
-Style/RedundantSelf:
+# Configuration parameters: Width.
+Style/IndentationWidth:
+  Exclude:
+    - 'tests/browser/features/step_definitions/anonymous_steps.rb'
+
+# Offense count: 1
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes.
+Style/RegexpLiteral:
+  Exclude:
+    - 'tests/browser/features/step_definitions/anonymous_steps.rb'
+
+# Offense count: 1
+# Cop supports --auto-correct.
+Style/SpaceAfterColon:
+  Exclude:
+    - 'tests/browser/features/support/pages/gather_page.rb'
+
+# Offense count: 2
+# Cop supports --auto-correct.
+# Configuration parameters: MultiSpaceAllowedForOperators.
+Style/SpaceAroundOperators:
+  Exclude:
+    - 'tests/browser/features/step_definitions/add_to_collection_steps.rb'
+    - 'tests/browser/features/step_definitions/recent_collections_steps.rb'
+
+# Offense count: 5
+# Cop supports --auto-correct.
+Style/SpaceInsideParens:
+  Exclude:
+    - 'tests/browser/features/step_definitions/common_steps.rb'
+    - 'tests/browser/features/support/pages/gather_recent_page.rb'
+
+# Offense count: 4
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle, SupportedStyles.
+Style/StringLiterals:
   Enabled: false
 
+# Offense count: 3
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle, SupportedStyles.
+Style/TrailingBlankLines:
+  Exclude:
+    - 'tests/browser/features/step_definitions/edit_collection_steps.rb'
+    - 'tests/browser/features/step_definitions/new_collection_steps.rb'
+    - 'tests/browser/features/support/pages/gather_user_collection_page.rb'
diff --git a/Gemfile b/Gemfile
index 207bd57..729d789 100644
--- a/Gemfile
+++ b/Gemfile
@@ -4,3 +4,4 @@
 source 'https://rubygems.org'
 
 gem 'mediawiki_selenium', '~> 1.5.0'
+gem 'rubocop', '~> 0.34.1', require: false
diff --git a/Gemfile.lock b/Gemfile.lock
index 3d25184..1d63efd 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,6 +1,9 @@
 GEM
   remote: https://rubygems.org/
   specs:
+    ast (2.1.0)
+    astrolabe (1.3.1)
+      parser (~> 2.2)
     builder (3.2.2)
     childprocess (0.5.6)
       ffi (~> 1.0, >= 1.0.11)
@@ -55,12 +58,23 @@
       watir-webdriver (>= 0.6.11)
     page_navigation (0.9)
       data_magic (>= 0.14)
+    parser (2.2.2.6)
+      ast (>= 1.1, < 3.0)
+    powerpack (0.1.1)
+    rainbow (2.0.0)
     rest-client (1.8.0)
       http-cookie (>= 1.0.2, < 2.0)
       mime-types (>= 1.16, < 3.0)
       netrc (~> 0.7)
     rspec-expectations (2.99.2)
       diff-lcs (>= 1.1.3, < 2.0)
+    rubocop (0.34.1)
+      astrolabe (~> 1.3)
+      parser (>= 2.2.2.5, < 3.0)
+      powerpack (~> 0.1)
+      rainbow (>= 1.99.1, < 3.0)
+      ruby-progressbar (~> 1.4)
+    ruby-progressbar (1.7.5)
     rubyzip (1.1.7)
     selenium-webdriver (2.46.2)
       childprocess (~> 0.5)
@@ -82,3 +96,4 @@
 
 DEPENDENCIES
   mediawiki_selenium (~> 1.5.0)
+  rubocop (~> 0.34.1)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6460cc6f8eef300b16dfb571a4c5457c3c935159
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Zfilipin <zfili...@wikimedia.org>
Gerrit-Reviewer: Dduvall <dduv...@wikimedia.org>
Gerrit-Reviewer: Hashar <has...@free.fr>
Gerrit-Reviewer: Jdlrobson <jrob...@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