Skip to content

Commit

Permalink
Alphabetically sort RuboCop cops configuration
Browse files Browse the repository at this point in the history
It makes it easier to add/remove cops as they are grouped around cop
departments.
  • Loading branch information
p0deje committed May 28, 2020
1 parent b786b11 commit cf09d58
Showing 1 changed file with 89 additions and 90 deletions.
179 changes: 89 additions & 90 deletions rb/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,56 +5,50 @@ require:
AllCops:
TargetRubyVersion: 2.5

Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space

Style/BlockDelimiters:
EnforcedStyle: braces_for_chaining
Layout/EmptyLinesAroundAttributeAccessor:
Enabled: true

Style/Alias:
EnforcedStyle: prefer_alias_method
Layout/EmptyLinesAroundClassBody:
Enabled: false

Lint/SuppressedException:
Layout/EmptyLinesAroundModuleBody:
Enabled: false

Style/RegexpLiteral:
EnforcedStyle: mixed
Layout/LineLength:
Max: 130
IgnoredPatterns:
- '\s+# rubocop'
- '^\s*#'
- '^\s*it .*, except: \{.*\} do$'

# Consider documenting all top-level classes and modules
Style/Documentation:
Enabled: false
Layout/SpaceAroundMethodCallOperator:
Enabled: true

# Port Integers do not need underscores
Style/NumericLiterals:
Enabled: false
Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space

# Bug
Naming/FileName:
Exclude:
- 'lib/selenium-webdriver.rb'
Lint/DeprecatedOpenSSLConstant:
Enabled: true

Naming/MethodParameterName:
AllowedNames:
- x
- y
- ex
- by
- id
- io
Lint/RaiseException:
Enabled: true

Style/CommentedKeyword:
Lint/StructNewOverride:
Enabled: true

Lint/SuppressedException:
Enabled: false

# TODO: Refactor Chrome::Bridge#create_capabilities
Metrics/PerceivedComplexity:
Max: 8
Metrics/AbcSize:
Max: 27
Exclude:
- 'lib/selenium/webdriver/remote/capabilities.rb'
- 'lib/selenium/webdriver/remote/http/curb.rb'
- 'lib/selenium/webdriver/support/color.rb'

Metrics/CyclomaticComplexity:
Max: 9
Metrics/BlockLength:
Exclude:
- 'lib/selenium/webdriver/remote/capabilities.rb'
- "**/*_spec.rb"
- 'selenium-webdriver.gemspec'

Metrics/ClassLength:
CountComments: false
Expand All @@ -63,24 +57,10 @@ Metrics/ClassLength:
- 'lib/selenium/webdriver/remote/bridge.rb'
- 'lib/selenium/webdriver/remote/capabilities.rb'

Metrics/AbcSize:
Max: 27
Exclude:
- 'lib/selenium/webdriver/remote/http/curb.rb'
- 'lib/selenium/webdriver/support/color.rb'

Layout/LineLength:
Max: 130
IgnoredPatterns:
- '\s+# rubocop'
- '^\s*#'
- '^\s*it .*, except: \{.*\} do$'

Metrics/ModuleLength:
CountComments: false
Metrics/CyclomaticComplexity:
Max: 9
Exclude:
- 'lib/selenium/webdriver/common/platform.rb'
- 'spec/**/*'
- 'lib/selenium/webdriver/remote/capabilities.rb'

Metrics/MethodLength:
CountComments: false
Expand All @@ -90,73 +70,82 @@ Metrics/MethodLength:
- 'lib/selenium/webdriver/common/driver.rb'
- 'lib/selenium/webdriver/remote/http/default.rb'

Metrics/BlockLength:
Metrics/ModuleLength:
CountComments: false
Exclude:
- "**/*_spec.rb"
- 'selenium-webdriver.gemspec'
- 'lib/selenium/webdriver/common/platform.rb'
- 'spec/**/*'

Metrics/ParameterLists:
CountKeywordArgs: false

Layout/EmptyLinesAroundClassBody:
Enabled: false

Layout/EmptyLinesAroundModuleBody:
Enabled: false

Style/StringLiterals:
Enabled: false
# TODO: Refactor Chrome::Bridge#create_capabilities
Metrics/PerceivedComplexity:
Max: 8
Exclude:
- 'lib/selenium/webdriver/remote/capabilities.rb'

Style/Dir:
Naming/FileName:
Exclude:
- 'selenium-webdriver.gemspec'
- 'lib/selenium-webdriver.rb'

RSpec/ExampleWording:
Enabled: false
Naming/MethodParameterName:
AllowedNames:
- x
- y
- ex
- by
- id
- io

RSpec/MultipleExpectations:
RSpec/AnyInstance:
Enabled: false

RSpec/ExampleLength:
RSpec/BeforeAfterAll:
Exclude:
- 'spec/unit/selenium/webdriver/socket_poller_spec.rb'

RSpec/ContextWording:
Enabled: false

RSpec/DescribeClass:
Enabled: false

RSpec/ContextWording:
Enabled: false
RSpec/DescribedClass:
EnforcedStyle: explicit

RSpec/AnyInstance:
RSpec/ExampleLength:
Enabled: false

RSpec/MessageSpies:
RSpec/ExampleWording:
Enabled: false

RSpec/BeforeAfterAll:
Exclude:
- 'spec/unit/selenium/webdriver/socket_poller_spec.rb'

RSpec/InstanceVariable:
Exclude:
- 'spec/unit/selenium/webdriver/socket_poller_spec.rb'

RSpec/DescribedClass:
EnforcedStyle: explicit
RSpec/MessageSpies:
Enabled: false

Layout/EmptyLinesAroundAttributeAccessor:
Enabled: true
RSpec/MultipleExpectations:
Enabled: false

Layout/SpaceAroundMethodCallOperator:
Enabled: true
Style/Alias:
EnforcedStyle: prefer_alias_method

Lint/DeprecatedOpenSSLConstant:
Enabled: true
Style/BlockDelimiters:
EnforcedStyle: braces_for_chaining

Lint/RaiseException:
Enabled: true
Style/CommentedKeyword:
Enabled: false

Lint/StructNewOverride:
Enabled: true
Style/Dir:
Exclude:
- 'selenium-webdriver.gemspec'

# Consider documenting all top-level classes and modules
Style/Documentation:
Enabled: false

Style/ExponentialNotation:
Enabled: true
Expand All @@ -170,5 +159,15 @@ Style/HashTransformKeys:
Style/HashTransformValues:
Enabled: true

# Port Integers do not need underscores
Style/NumericLiterals:
Enabled: false

Style/RegexpLiteral:
EnforcedStyle: mixed

Style/SlicingWithRange:
Enabled: true

Style/StringLiterals:
Enabled: false

0 comments on commit cf09d58

Please sign in to comment.