Skip to content

Commit 14e1a29

Browse files
committed
Update to latest rubocop
Running on ruby 4.0 I get warnings about `tsort` and a bunch from `rubocop-ast`
1 parent 38c283b commit 14e1a29

3 files changed

Lines changed: 27 additions & 15 deletions

File tree

.rubocop.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ Lint/RedundantRequireStatement:
5454
- library/fiber/**/*.rb
5555
- optional/capi/fiber_spec.rb
5656

57-
Lint/RedundantSafeNavigation:
58-
Exclude:
59-
- language/safe_navigator_spec.rb
60-
6157
Lint/RedundantSplatExpansion:
6258
Enabled: false
6359

.rubocop_todo.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2024-10-12 16:01:45 UTC using RuboCop version 1.66.1.
3+
# on 2026-05-29 08:10:07 UTC using RuboCop version 1.86.2.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -11,17 +11,22 @@ Lint/DuplicateCaseCondition:
1111
Exclude:
1212
- 'language/case_spec.rb'
1313

14-
# Offense count: 6
14+
# Offense count: 20
1515
Lint/DuplicateMethods:
1616
Exclude:
1717
- 'core/array/fixtures/encoded_strings.rb'
1818
- 'core/method/fixtures/classes.rb'
19+
- 'core/module/const_added_spec.rb'
20+
- 'core/module/define_method_spec.rb'
1921
- 'core/module/fixtures/classes.rb'
22+
- 'core/module/method_added_spec.rb'
23+
- 'core/module/name_spec.rb'
24+
- 'core/proc/new_spec.rb'
2025
- 'core/unboundmethod/fixtures/classes.rb'
2126
- 'fixtures/class.rb'
27+
- 'language/assignments_spec.rb'
2228

2329
# Offense count: 8
24-
# This cop supports safe autocorrection (--autocorrect).
2530
Lint/EnsureReturn:
2631
Exclude:
2732
- 'language/fixtures/ensure.rb'
@@ -39,12 +44,12 @@ Lint/FloatOutOfRange:
3944
Exclude:
4045
- 'core/string/modulo_spec.rb'
4146

42-
# Offense count: 2
47+
# Offense count: 3
4348
# This cop supports safe autocorrection (--autocorrect).
4449
Lint/ImplicitStringConcatenation:
4550
Exclude:
46-
- 'language/string_spec.rb'
4751
- 'core/string/chilled_string_spec.rb'
52+
- 'language/string_spec.rb'
4853

4954
# Offense count: 4
5055
Lint/IneffectiveAccessModifier:
@@ -53,12 +58,11 @@ Lint/IneffectiveAccessModifier:
5358
- 'core/module/fixtures/classes.rb'
5459
- 'language/fixtures/private.rb'
5560

56-
# Offense count: 71
61+
# Offense count: 12
5762
# This cop supports safe autocorrection (--autocorrect).
5863
Lint/LiteralInInterpolation:
5964
Exclude:
6065
- 'core/module/refine_spec.rb'
61-
- 'core/regexp/shared/new.rb'
6266
- 'core/string/shared/to_sym.rb'
6367
- 'language/alias_spec.rb'
6468
- 'language/defined_spec.rb'
@@ -80,13 +84,24 @@ Lint/ParenthesesAsGroupedExpression:
8084
- 'language/block_spec.rb'
8185
- 'language/method_spec.rb'
8286

87+
# Offense count: 1
88+
# This cop supports unsafe autocorrection (--autocorrect-all).
89+
# Configuration parameters: AllowedMethods, InferNonNilReceiver, AdditionalNilMethods.
90+
# AllowedMethods: instance_of?, kind_of?, is_a?, eql?, respond_to?, equal?
91+
# AdditionalNilMethods: present?, blank?, try, try!
92+
Lint/RedundantSafeNavigation:
93+
Exclude:
94+
- 'language/safe_navigator_spec.rb'
95+
- 'language/fixtures/rescue_captures.rb'
96+
8397
# Offense count: 2
8498
# This cop supports safe autocorrection (--autocorrect).
8599
Lint/RedundantStringCoercion:
86100
Exclude:
87101
- 'core/io/print_spec.rb'
88102

89103
# Offense count: 1
104+
# Configuration parameters: AllowRBSInlineAnnotation.
90105
Lint/SelfAssignment:
91106
Exclude:
92107
- 'core/gc/auto_compact_spec.rb'
@@ -97,7 +112,7 @@ Lint/ShadowedArgument:
97112
Exclude:
98113
- 'language/fixtures/super.rb'
99114

100-
# Offense count: 45
115+
# Offense count: 49
101116
# Configuration parameters: AllowComments, AllowNil.
102117
Lint/SuppressedException:
103118
Enabled: false
@@ -110,13 +125,14 @@ Lint/UnderscorePrefixedVariableName:
110125
- 'core/io/popen_spec.rb'
111126
- 'language/block_spec.rb'
112127

113-
# Offense count: 7
128+
# Offense count: 9
114129
# This cop supports safe autocorrection (--autocorrect).
115-
# Configuration parameters: AutoCorrect, ContextCreatingMethods, MethodCreatingMethods.
130+
# Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
116131
Lint/UselessAccessModifier:
117132
Exclude:
118133
- 'core/module/define_method_spec.rb'
119134
- 'core/module/fixtures/classes.rb'
120135
- 'core/module/module_function_spec.rb'
121136
- 'core/module/private_class_method_spec.rb'
137+
- 'language/fixtures/def.rb'
122138
- 'language/fixtures/send.rb'

bin/rubocop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require 'bundler/inline'
66
gemfile do
77
source 'https://rubygems.org'
88

9-
gem 'rubocop', '1.66.1'
9+
gem 'rubocop', '1.86.2'
1010
end
1111

1212
exec(Gem.bin_path('rubocop', 'rubocop'), *ARGV)

0 commit comments

Comments
 (0)