From 3a4b4ce545d2dd3b3f65fc841cd8230bf945def2 Mon Sep 17 00:00:00 2001 From: Herwin Date: Sat, 12 Oct 2024 17:57:31 +0200 Subject: [PATCH] Upgrade to the latest Rubocop version (1.66.1) --- .rubocop.yml | 12 ++++++++++++ .rubocop_todo.yml | 28 ++++++++++++++-------------- Gemfile | 2 +- 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index caa166288..59c8e979f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -5,6 +5,7 @@ AllCops: DisplayCopNames: true Exclude: - command_line/fixtures/bad_syntax.rb + - core/exception/fixtures/syntax_error.rb DisabledByDefault: true NewCops: disable @@ -46,6 +47,17 @@ Lint/InterpolationCheck: Lint/LiteralAsCondition: Enabled: false +# Required to support Ruby 3.0 +Lint/RedundantRequireStatement: + Exclude: + - core/fiber/**/*.rb + - library/fiber/**/*.rb + - optional/capi/fiber_spec.rb + +Lint/RedundantSafeNavigation: + Exclude: + - language/safe_navigator_spec.rb + Lint/RedundantSplatExpansion: Enabled: false diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 04834b189..45a897459 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2024-10-12 15:50:39 UTC using RuboCop version 1.28.2. +# on 2024-10-12 16:01:45 UTC using RuboCop version 1.66.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 @@ -21,7 +21,7 @@ Lint/DuplicateMethods: - 'fixtures/class.rb' # Offense count: 8 -# This cop supports safe auto-correction (--auto-correct). +# This cop supports safe autocorrection (--autocorrect). Lint/EnsureReturn: Exclude: - 'language/fixtures/ensure.rb' @@ -40,6 +40,7 @@ Lint/FloatOutOfRange: - 'core/string/modulo_spec.rb' # Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). Lint/ImplicitStringConcatenation: Exclude: - 'language/string_spec.rb' @@ -52,7 +53,7 @@ Lint/IneffectiveAccessModifier: - 'language/fixtures/private.rb' # Offense count: 71 -# This cop supports safe auto-correction (--auto-correct). +# This cop supports safe autocorrection (--autocorrect). Lint/LiteralInInterpolation: Exclude: - 'core/module/refine_spec.rb' @@ -66,30 +67,24 @@ Lint/LiteralInInterpolation: - 'language/undef_spec.rb' # Offense count: 8 -# This cop supports safe auto-correction (--auto-correct). +# This cop supports safe autocorrection (--autocorrect). Lint/MultipleComparison: Exclude: - 'language/precedence_spec.rb' # Offense count: 9 -# This cop supports safe auto-correction (--auto-correct). +# This cop supports safe autocorrection (--autocorrect). Lint/ParenthesesAsGroupedExpression: Exclude: - 'language/block_spec.rb' - 'language/method_spec.rb' # Offense count: 2 -# This cop supports safe auto-correction (--auto-correct). +# This cop supports safe autocorrection (--autocorrect). Lint/RedundantStringCoercion: Exclude: - 'core/io/print_spec.rb' -# Offense count: 1 -# This cop supports safe auto-correction (--auto-correct). -Lint/RedundantWithIndex: - Exclude: - - 'core/enumerator/with_index_spec.rb' - # Offense count: 25 Lint/RescueException: Exclude: @@ -107,6 +102,11 @@ Lint/RescueException: - 'language/rescue_spec.rb' - 'library/erb/filename_spec.rb' +# Offense count: 1 +Lint/SelfAssignment: + Exclude: + - 'core/gc/auto_compact_spec.rb' + # Offense count: 4 # Configuration parameters: IgnoreImplicitReferences. Lint/ShadowedArgument: @@ -127,8 +127,8 @@ Lint/UnderscorePrefixedVariableName: - 'language/block_spec.rb' # Offense count: 7 -# This cop supports safe auto-correction (--auto-correct). -# Configuration parameters: ContextCreatingMethods, MethodCreatingMethods. +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AutoCorrect, ContextCreatingMethods, MethodCreatingMethods. Lint/UselessAccessModifier: Exclude: - 'core/module/define_method_spec.rb' diff --git a/Gemfile b/Gemfile index 4df468ac8..ef29689db 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,3 @@ source 'https://rubygems.org' -gem 'rubocop', '= 1.28.2' +gem 'rubocop', '= 1.66.1'