Updated RuboCop to the latest version

Updated RuboCop configuration according to recommended settings.
Updated RuboCop TODO file.

Bug: 117989
Change-Id: If934078beabc5498f929bbd7a26689dbd2ab7810
This commit is contained in:
Željko Filipin
2015-11-18 11:58:19 +01:00
parent 0aa649e084
commit f01bcefe74
4 changed files with 60 additions and 79 deletions

View File

@@ -1 +1,23 @@
inherit_from: .rubocop_todo.yml
AllCops:
StyleGuideCopsOnly: true
# Uncomment when the repository is cleaned up
# Metrics/LineLength:
# Max: 100
Metrics/MethodLength:
Enabled: false
Style/Alias:
Enabled: false
Style/SignalException:
Enabled: false
Style/StringLiterals:
EnforcedStyle: single_quotes
Style/TrivialAccessors:
ExactNameMatch: true

View File

@@ -1,101 +1,46 @@
# This configuration was generated by `rubocop --auto-gen-config`
# on 2014-10-21 16:45:03 +0200 using RuboCop version 0.26.1.
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2015-11-18 11:57:22 +0100 using RuboCop version 0.35.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: 1
Lint/AmbiguousRegexpLiteral:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
Lint/BlockAlignment:
Enabled: false
# Offense count: 1
# Configuration parameters: AlignWith, SupportedStyles.
Lint/DefEndAlignment:
Enabled: false
# Offense count: 1
Metrics/CyclomaticComplexity:
Max: 7
# Offense count: 17
# Offense count: 18
# Configuration parameters: AllowURI, URISchemes.
Metrics/LineLength:
Max: 168
# Offense count: 1
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 16
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/AccessModifierIndentation:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/BracesAroundHashParameters:
Enabled: false
# Offense count: 6
# Cop supports --auto-correct.
# Configuration parameters: IndentWhenRelativeTo, SupportedStyles, IndentOneStep.
Style/CaseIndentation:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: PreferredMethods.
Style/CollectionMethods:
Enabled: false
# Offense count: 9
Style/Documentation:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
Style/EmptyLinesAroundAccessModifier:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
Style/EmptyLinesAroundBody:
Enabled: false
# Offense count: 1
# Configuration parameters: AllowedVariables.
Style/GlobalVars:
Enabled: false
Exclude:
- 'tests/browser/features/step_definitions/accept_language_steps.rb'
# Offense count: 7
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues.
Style/HashSyntax:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
Style/IndentationConsistency:
Enabled: false
# Offense count: 90
# Cop supports --auto-correct.
# Configuration parameters: Width.
Style/IndentationWidth:
Enabled: false
# Offense count: 2
# Cop supports --auto-correct.
Style/LeadingCommentSpace:
Enabled: false
# Offense count: 8
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleForEmptyBraces, SupportedStyles.
@@ -105,7 +50,10 @@ Style/SpaceInsideHashLiteralBraces:
# Offense count: 10
# Cop supports --auto-correct.
Style/SpaceInsideParens:
Enabled: false
Exclude:
- 'tests/browser/features/step_definitions/ime_steps.rb'
- 'tests/browser/features/support/pages/ime_page.rb'
- 'tests/browser/features/support/pages/panel_page.rb'
# Offense count: 130
# Cop supports --auto-correct.
@@ -113,13 +61,22 @@ Style/SpaceInsideParens:
Style/StringLiterals:
Enabled: false
# Offense count: 216
# Offense count: 212
# Cop supports --auto-correct.
Style/Tab:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/TrailingBlankLines:
Enabled: false
Exclude:
- 'tests/browser/features/step_definitions/accept_language_steps.rb'
- 'tests/browser/features/step_definitions/autonym_steps.rb'
- 'tests/browser/features/step_definitions/common_steps.rb'
- 'tests/browser/features/step_definitions/font_selection_steps.rb'
- 'tests/browser/features/step_definitions/live_preview_of_display_language_steps.rb'
- 'tests/browser/features/step_definitions/panel_steps.rb'
- 'tests/browser/features/step_definitions/persistent_settings_steps.rb'
- 'tests/browser/features/step_definitions/textarea_font_steps.rb'
- 'tests/browser/features/step_definitions/triggers_steps.rb'
- 'tests/browser/features/support/modules/language_module.rb'
- 'tests/browser/features/support/pages/edit_page.rb'
- 'tests/browser/features/support/pages/ime_page.rb'
- 'tests/browser/features/support/pages/main_page.rb'
- 'tests/browser/features/support/pages/panel_page.rb'
- 'tests/browser/features/support/pages/preferences_page.rb'

View File

@@ -1,4 +1,4 @@
source "https://rubygems.org"
gem 'mediawiki_selenium', '~> 1.6.2'
gem "rubocop", "~> 0.29.1", require: false
gem "rubocop", "~> 0.35.1", require: false

View File

@@ -59,7 +59,7 @@ GEM
watir-webdriver (>= 0.6.11)
page_navigation (0.9)
data_magic (>= 0.14)
parser (2.2.2.6)
parser (2.2.3.0)
ast (>= 1.1, < 3.0)
powerpack (0.1.1)
rainbow (2.0.0)
@@ -70,12 +70,13 @@ GEM
rspec-core (2.99.2)
rspec-expectations (2.99.2)
diff-lcs (>= 1.1.3, < 2.0)
rubocop (0.29.1)
rubocop (0.35.1)
astrolabe (~> 1.3)
parser (>= 2.2.0.1, < 3.0)
parser (>= 2.2.3.0, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.4)
ruby-progressbar (~> 1.7)
tins (<= 1.6.0)
ruby-progressbar (1.7.5)
rubyzip (1.1.7)
selenium-webdriver (2.48.1)
@@ -85,6 +86,7 @@ GEM
websocket (~> 1.0)
syntax (1.2.0)
thor (0.19.1)
tins (1.6.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.1)
@@ -98,4 +100,4 @@ PLATFORMS
DEPENDENCIES
mediawiki_selenium (~> 1.6.2)
rubocop (~> 0.29.1)
rubocop (~> 0.35.1)