[MediaWiki-commits] [Gerrit] RuboCop setup - change (mediawiki...Gather)

2015-09-10 Thread jenkins-bot (Code Review)
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, >

[MediaWiki-commits] [Gerrit] RuboCop setup - change (mediawiki...Gather)

2015-09-10 Thread Zfilipin (Code Review)
Zfilipin has uploaded a new change for review.

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

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

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/84/237384/1

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