Skip to content

Commit

Permalink
Update RuboCop configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
mvz committed Feb 28, 2021
1 parent aa74b3b commit b7b4305
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 52 deletions.
15 changes: 14 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ AllCops:
- tmp/**/*
- vendor/**/*
DisplayCopNames: true
NewCops: enable
TargetRubyVersion: 2.3

# Spec blocks can be any size
Expand Down Expand Up @@ -38,4 +37,18 @@ Style/FrozenStringLiteralComment:
Layout/LineLength:
Max: 94


# New cops to enable. Needed for RuboCop 0.81.0 since it does not support AllCops/NewCops option

Lint/RaiseException:
Enabled: true
Lint/StructNewOverride:
Enabled: true
Style/HashEachMethods:
Enabled: true
Style/HashTransformKeys:
Enabled: true
Style/HashTransformValues:
Enabled: true

inherit_from: .rubocop_todo.yml
69 changes: 18 additions & 51 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,49 @@
# This configuration was generated by
# `rubocop --auto-gen-config --no-offense-counts --no-auto-gen-timestamp`
# using RuboCop version 1.9.0.
# using RuboCop version 0.81.0.
# 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.

# Configuration parameters: Include.
# Include: **/*.gemspec
Gemspec/RequiredRubyVersion:
Exclude:
- 'fixtures/cli-app/cli-app.gemspec'
- 'fixtures/empty-app/cli-app.gemspec'

Lint/AmbiguousBlockAssociation:
Exclude:
- 'lib/aruba/platforms/announcer.rb'

# Configuration parameters: AllowComments.
Lint/EmptyClass:
Exclude:
- 'spec/event_bus_spec.rb'

Lint/MissingSuper:
Exclude:
- 'lib/aruba/contracts/enum.rb'
- 'lib/aruba/matchers/collection/include_an_object.rb'

# Configuration parameters: CheckForMethodsWithNoSideEffects.
Lint/Void:
Exclude:
- 'lib/aruba/platforms/announcer.rb'
- 'lib/aruba/platforms/unix_environment_variables.rb'

# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
# Configuration parameters: IgnoredMethods.
Metrics/AbcSize:
Max: 118
Max: 116

# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
# IgnoredMethods: refine
# Configuration parameters: CountComments, ExcludedMethods.
# ExcludedMethods: refine
Metrics/BlockLength:
Max: 68

# Configuration parameters: CountComments, CountAsOne.
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 158

# Configuration parameters: IgnoredMethods.
Metrics/CyclomaticComplexity:
Max: 13
Max: 12

# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
# Configuration parameters: CountComments, ExcludedMethods.
Metrics/MethodLength:
Max: 59

# Configuration parameters: CountComments, CountAsOne.
# Configuration parameters: CountComments.
Metrics/ModuleLength:
Max: 198

# Configuration parameters: IgnoredMethods.
Metrics/PerceivedComplexity:
Max: 14
Max: 13

Naming/ConstantName:
Exclude:
Expand All @@ -79,7 +62,7 @@ Naming/MemoizedInstanceVariableName:
- 'lib/aruba/api/core.rb'

# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
# AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to
# AllowedNames: io, id, to, by, on, in, at, ip, db, os, pp
Naming/MethodParameterName:
Exclude:
- 'lib/aruba/aruba_path.rb'
Expand All @@ -88,7 +71,6 @@ Naming/MethodParameterName:
- 'lib/aruba/platforms/aruba_logger.rb'
- 'lib/aruba/platforms/unix_platform.rb'

# Cop supports --auto-correct.
Performance/Caller:
Exclude:
- 'lib/aruba/platforms/unix_platform.rb'
Expand All @@ -106,7 +88,6 @@ RSpec/ContextWording:
- 'spec/aruba/platform/windows_environment_variables_spec.rb'
- 'spec/support/shared_contexts/aruba.rb'

# Configuration parameters: IgnoredMetadata.
RSpec/DescribeClass:
Exclude:
- 'spec/aruba/api/runtime_spec.rb'
Expand All @@ -118,6 +99,7 @@ RSpec/DescribeClass:
- 'spec/aruba/matchers/file_spec.rb'
- 'spec/aruba/matchers/path_spec.rb'
- 'spec/aruba/platform/simple_table_spec.rb'
- 'spec/aruba/rspec_spec.rb'

# Configuration parameters: Max.
RSpec/ExampleLength:
Expand All @@ -127,8 +109,7 @@ RSpec/ExampleLength:
- 'spec/aruba/aruba_path_spec.rb'
- 'spec/aruba/matchers/collection_spec.rb'

# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
# Include: **/*_spec*rb*, **/spec/**/*
# Configuration parameters: CustomTransform, IgnoreMethods.
RSpec/FilePath:
Exclude:
- 'spec/aruba/platform/windows_environment_variables_spec.rb'
Expand All @@ -154,13 +135,10 @@ RSpec/InstanceVariable:
- 'spec/event_bus_spec.rb'
- 'spec/support/shared_contexts/aruba.rb'

# Configuration parameters: AggregateFailuresByDefault.
RSpec/MultipleExpectations:
Max: 5

# Configuration parameters: AllowSubject.
RSpec/MultipleMemoizedHelpers:
Max: 11

RSpec/NestedGroups:
Max: 6

Expand All @@ -174,8 +152,6 @@ Style/AccessModifierDeclarations:
Exclude:
- 'lib/aruba/matchers/collection/all.rb'

# Cop supports --auto-correct.
# Configuration parameters: AllowOnConstant.
Style/CaseEquality:
Exclude:
- 'lib/aruba/matchers/base/object_formatter.rb'
Expand All @@ -192,20 +168,11 @@ Style/Documentation:
- 'lib/aruba/platforms/command_monitor.rb'
- 'lib/aruba/setup.rb'

# Configuration parameters: MaxUnannotatedPlaceholdersAllowed, IgnoredMethods.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: annotated, template, unannotated
Style/FormatStringToken:
EnforcedStyle: unannotated

# Configuration parameters: MinBranchesCount.
Style/HashLikeCase:
Exclude:
- 'lib/aruba/cucumber/command.rb'
Enabled: false

# Configuration parameters: AllowedMethods.
# AllowedMethods: respond_to_missing?
Style/OptionalBooleanParameter:
Style/MethodMissingSuper:
Exclude:
- 'lib/aruba/api/core.rb'
- 'lib/aruba/platforms/aruba_file_creator.rb'
- 'lib/aruba/setup.rb'
- 'lib/aruba/platforms/command_monitor.rb'

0 comments on commit b7b4305

Please sign in to comment.