diff --git a/.rubocop.yml b/.rubocop.yml index 0b59a11512..0b5dcb80a2 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -54,10 +54,6 @@ Lint/RedundantRequireStatement: - 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 bd30f3f14a..f998002c6d 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 16:01:45 UTC using RuboCop version 1.66.1. +# on 2026-05-29 08:10:07 UTC using RuboCop version 1.86.2. # 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 @@ -11,17 +11,22 @@ Lint/DuplicateCaseCondition: Exclude: - 'language/case_spec.rb' -# Offense count: 6 +# Offense count: 20 Lint/DuplicateMethods: Exclude: - 'core/array/fixtures/encoded_strings.rb' - 'core/method/fixtures/classes.rb' + - 'core/module/const_added_spec.rb' + - 'core/module/define_method_spec.rb' - 'core/module/fixtures/classes.rb' + - 'core/module/method_added_spec.rb' + - 'core/module/name_spec.rb' + - 'core/proc/new_spec.rb' - 'core/unboundmethod/fixtures/classes.rb' - 'fixtures/class.rb' + - 'language/assignments_spec.rb' # Offense count: 8 -# This cop supports safe autocorrection (--autocorrect). Lint/EnsureReturn: Exclude: - 'language/fixtures/ensure.rb' @@ -39,12 +44,12 @@ Lint/FloatOutOfRange: Exclude: - 'core/string/modulo_spec.rb' -# Offense count: 2 +# Offense count: 3 # This cop supports safe autocorrection (--autocorrect). Lint/ImplicitStringConcatenation: Exclude: - - 'language/string_spec.rb' - 'core/string/chilled_string_spec.rb' + - 'language/string_spec.rb' # Offense count: 4 Lint/IneffectiveAccessModifier: @@ -53,12 +58,11 @@ Lint/IneffectiveAccessModifier: - 'core/module/fixtures/classes.rb' - 'language/fixtures/private.rb' -# Offense count: 71 +# Offense count: 12 # This cop supports safe autocorrection (--autocorrect). Lint/LiteralInInterpolation: Exclude: - 'core/module/refine_spec.rb' - - 'core/regexp/shared/new.rb' - 'core/string/shared/to_sym.rb' - 'language/alias_spec.rb' - 'language/defined_spec.rb' @@ -80,6 +84,16 @@ Lint/ParenthesesAsGroupedExpression: - 'language/block_spec.rb' - 'language/method_spec.rb' +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: AllowedMethods, InferNonNilReceiver, AdditionalNilMethods. +# AllowedMethods: instance_of?, kind_of?, is_a?, eql?, respond_to?, equal? +# AdditionalNilMethods: present?, blank?, try, try! +Lint/RedundantSafeNavigation: + Exclude: + - 'language/safe_navigator_spec.rb' + - 'language/fixtures/rescue_captures.rb' + # Offense count: 2 # This cop supports safe autocorrection (--autocorrect). Lint/RedundantStringCoercion: @@ -87,6 +101,7 @@ Lint/RedundantStringCoercion: - 'core/io/print_spec.rb' # Offense count: 1 +# Configuration parameters: AllowRBSInlineAnnotation. Lint/SelfAssignment: Exclude: - 'core/gc/auto_compact_spec.rb' @@ -97,7 +112,7 @@ Lint/ShadowedArgument: Exclude: - 'language/fixtures/super.rb' -# Offense count: 45 +# Offense count: 49 # Configuration parameters: AllowComments, AllowNil. Lint/SuppressedException: Enabled: false @@ -110,13 +125,14 @@ Lint/UnderscorePrefixedVariableName: - 'core/io/popen_spec.rb' - 'language/block_spec.rb' -# Offense count: 7 +# Offense count: 9 # This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: AutoCorrect, ContextCreatingMethods, MethodCreatingMethods. +# Configuration parameters: ContextCreatingMethods, MethodCreatingMethods. Lint/UselessAccessModifier: Exclude: - 'core/module/define_method_spec.rb' - 'core/module/fixtures/classes.rb' - 'core/module/module_function_spec.rb' - 'core/module/private_class_method_spec.rb' + - 'language/fixtures/def.rb' - 'language/fixtures/send.rb' diff --git a/bin/rubocop b/bin/rubocop index 38254f13e4..0937c47906 100755 --- a/bin/rubocop +++ b/bin/rubocop @@ -6,7 +6,7 @@ require 'bundler/inline' gemfile do source 'https://rubygems.org' - gem 'rubocop', '1.66.1' + gem 'rubocop', '1.86.2' end exec(Gem.bin_path('rubocop', 'rubocop'), *ARGV)