diff --git a/.rubocop.yml b/.rubocop.yml index 2175ced2b..01d92ad6d 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -7,7 +7,6 @@ AllCops: - tmp/**/* - vendor/**/* DisplayCopNames: true - NewCops: enable TargetRubyVersion: 2.3 # Spec blocks can be any size @@ -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 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 0da5f8ab5..efe3bbcd3 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -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: @@ -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' @@ -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' @@ -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' @@ -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: @@ -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' @@ -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 @@ -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' @@ -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'