Skip to content

Commit 4db4ad8

Browse files
committed
Update rubocop to 1.69.2
- General bundle update. - Update the docs too. - Fix rubocop API deprecations. - Fix reasonable rubocop complaints. - Disable unnecessary rubocop complaints. - Explicit ostruct dependency for future compatibility. - Remove an unnecessary empty file.
1 parent 6ae8a4e commit 4db4ad8

File tree

150 files changed

+1012
-487
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+1012
-487
lines changed

Diff for: .rubocop.yml

+28-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
inherit_from: base_rubocop.yml
2-
31
require: rubocop-rspec
42

3+
inherit_from:
4+
- .rubocop_todo.yml
5+
- base_rubocop.yml
6+
57
Layout/MultilineOperationIndentation:
68
Enabled: false
79

10+
Naming/HeredocDelimiterNaming:
11+
Enabled: false
12+
813
Naming/FileName:
914
Exclude:
1015
- 'bin/codeclimate-rubocop'
@@ -20,3 +25,24 @@ Style/TrailingCommaInHashLiteral:
2025

2126
Style/TrailingCommaInArguments:
2227
Enabled: false
28+
29+
RSpec/AnyInstance:
30+
Enabled: false
31+
32+
RSpec/ContextWording:
33+
Enabled: false
34+
35+
RSpec/DescribedClass:
36+
Enabled: false
37+
38+
RSpec/ExampleLength:
39+
Enabled: false
40+
41+
RSpec/MessageChain:
42+
Enabled: false
43+
44+
RSpec/MultipleExpectations:
45+
Enabled: false
46+
47+
RSpec/NotToNot:
48+
Enabled: false

Diff for: .rubocop_todo.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This configuration was generated by
2+
# `rubocop --auto-gen-config`
3+
# on 2024-11-08 23:41:07 UTC using RuboCop version 1.68.0.
4+
# The point is for the user to remove these configuration records
5+
# one by one as the offenses are removed from the code base.
6+
# Note that changes in the inspected code, or installation of new
7+
# versions of RuboCop, may require this file to be generated again.
8+
9+
# Offense count: 1
10+
# Configuration parameters: AllowComments, AllowNil.
11+
Lint/SuppressedException:
12+
Exclude:
13+
- 'Rakefile'

Diff for: Gemfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ source 'https://rubygems.org'
55
gem "activesupport", require: false
66
gem "parser"
77
gem "pry", require: false
8-
gem "rubocop", "1.64.1", require: false
8+
gem "rubocop", "1.69.2", require: false
99
gem "rubocop-capybara", require: false
1010
gem "rubocop-factory_bot", require: false
1111
gem "rubocop-graphql", require: false
@@ -24,6 +24,7 @@ gem "rubocop-thread_safety", require: false
2424
gem "test-prof", require: false
2525

2626
group :test do
27+
gem "ostruct", require: false
2728
gem "rake"
2829
gem "rspec"
2930
end

Diff for: Gemfile.lock

+49-43
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,91 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (7.1.3.4)
4+
activesupport (8.0.1)
55
base64
6+
benchmark (>= 0.3)
67
bigdecimal
7-
concurrent-ruby (~> 1.0, >= 1.0.2)
8+
concurrent-ruby (~> 1.0, >= 1.3.1)
89
connection_pool (>= 2.2.5)
910
drb
1011
i18n (>= 1.6, < 2)
12+
logger (>= 1.4.2)
1113
minitest (>= 5.1)
12-
mutex_m
13-
tzinfo (~> 2.0)
14+
securerandom (>= 0.3)
15+
tzinfo (~> 2.0, >= 2.0.5)
16+
uri (>= 0.13.1)
1417
ast (2.4.2)
1518
base64 (0.2.0)
19+
benchmark (0.4.0)
1620
bigdecimal (3.1.8)
1721
coderay (1.1.3)
18-
concurrent-ruby (1.3.3)
22+
concurrent-ruby (1.3.4)
1923
connection_pool (2.4.1)
2024
diff-lcs (1.5.1)
2125
drb (2.2.1)
22-
i18n (1.14.5)
26+
i18n (1.14.6)
2327
concurrent-ruby (~> 1.0)
24-
json (2.7.2)
28+
json (2.9.1)
2529
language_server-protocol (3.17.0.3)
30+
logger (1.6.3)
2631
method_source (1.1.0)
27-
minitest (5.24.1)
28-
mutex_m (0.2.0)
29-
parallel (1.25.1)
30-
parser (3.3.3.0)
32+
minitest (5.25.4)
33+
ostruct (0.6.1)
34+
parallel (1.26.3)
35+
parser (3.3.6.0)
3136
ast (~> 2.4.1)
3237
racc
33-
pry (0.14.2)
38+
pry (0.15.0)
3439
coderay (~> 1.1)
3540
method_source (~> 1.0)
36-
racc (1.8.0)
37-
rack (3.1.4)
41+
racc (1.8.1)
42+
rack (3.1.8)
3843
rainbow (3.1.1)
3944
rake (13.2.1)
40-
regexp_parser (2.9.2)
41-
rexml (3.3.1)
42-
strscan
45+
regexp_parser (2.9.3)
4346
rspec (3.13.0)
4447
rspec-core (~> 3.13.0)
4548
rspec-expectations (~> 3.13.0)
4649
rspec-mocks (~> 3.13.0)
47-
rspec-core (3.13.0)
50+
rspec-core (3.13.2)
4851
rspec-support (~> 3.13.0)
49-
rspec-expectations (3.13.1)
52+
rspec-expectations (3.13.3)
5053
diff-lcs (>= 1.2.0, < 2.0)
5154
rspec-support (~> 3.13.0)
52-
rspec-mocks (3.13.1)
55+
rspec-mocks (3.13.2)
5356
diff-lcs (>= 1.2.0, < 2.0)
5457
rspec-support (~> 3.13.0)
55-
rspec-support (3.13.1)
56-
rubocop (1.64.1)
58+
rspec-support (3.13.2)
59+
rubocop (1.69.2)
5760
json (~> 2.3)
5861
language_server-protocol (>= 3.17.0)
5962
parallel (~> 1.10)
6063
parser (>= 3.3.0.2)
6164
rainbow (>= 2.2.2, < 4.0)
62-
regexp_parser (>= 1.8, < 3.0)
63-
rexml (>= 3.2.5, < 4.0)
64-
rubocop-ast (>= 1.31.1, < 2.0)
65+
regexp_parser (>= 2.9.3, < 3.0)
66+
rubocop-ast (>= 1.36.2, < 2.0)
6567
ruby-progressbar (~> 1.7)
66-
unicode-display_width (>= 2.4.0, < 3.0)
67-
rubocop-ast (1.31.3)
68+
unicode-display_width (>= 2.4.0, < 4.0)
69+
rubocop-ast (1.37.0)
6870
parser (>= 3.3.1.0)
6971
rubocop-capybara (2.21.0)
7072
rubocop (~> 1.41)
7173
rubocop-factory_bot (2.26.1)
7274
rubocop (~> 1.61)
73-
rubocop-graphql (1.5.2)
74-
rubocop (>= 0.90, < 2)
75+
rubocop-graphql (1.5.4)
76+
rubocop (>= 1.50, < 2)
7577
rubocop-i18n (3.0.0)
7678
rubocop (~> 1.0)
77-
rubocop-minitest (0.35.0)
79+
rubocop-minitest (0.36.0)
7880
rubocop (>= 1.61, < 2.0)
7981
rubocop-ast (>= 1.31.1, < 2.0)
80-
rubocop-performance (1.21.1)
82+
rubocop-performance (1.23.0)
8183
rubocop (>= 1.48.1, < 2.0)
8284
rubocop-ast (>= 1.31.1, < 2.0)
83-
rubocop-rails (2.25.1)
85+
rubocop-rails (2.27.0)
8486
activesupport (>= 4.2.0)
8587
rack (>= 1.1)
86-
rubocop (>= 1.33.0, < 2.0)
88+
rubocop (>= 1.52.0, < 2.0)
8789
rubocop-ast (>= 1.31.1, < 2.0)
8890
rubocop-rails-omakase (1.0.0)
8991
rubocop
@@ -92,36 +94,40 @@ GEM
9294
rubocop-rails
9395
rubocop-rake (0.6.0)
9496
rubocop (~> 1.0)
95-
rubocop-rspec (3.0.1)
97+
rubocop-rspec (3.3.0)
9698
rubocop (~> 1.61)
9799
rubocop-rspec_rails (2.30.0)
98100
rubocop (~> 1.61)
99101
rubocop-rspec (~> 3, >= 3.0.1)
100-
rubocop-sequel (0.3.4)
102+
rubocop-sequel (0.3.7)
101103
rubocop (~> 1.0)
102104
rubocop-shopify (2.15.1)
103105
rubocop (~> 1.51)
104-
rubocop-sorbet (0.8.3)
105-
rubocop (>= 0.90.0)
106-
rubocop-thread_safety (0.5.1)
107-
rubocop (>= 0.90.0)
106+
rubocop-sorbet (0.8.7)
107+
rubocop (>= 1)
108+
rubocop-thread_safety (0.6.0)
109+
rubocop (>= 1.48.1)
108110
ruby-progressbar (1.13.0)
109-
strscan (3.1.0)
110-
test-prof (1.3.3.1)
111+
securerandom (0.4.1)
112+
test-prof (1.4.2)
111113
tzinfo (2.0.6)
112114
concurrent-ruby (~> 1.0)
113-
unicode-display_width (2.5.0)
115+
unicode-display_width (3.1.2)
116+
unicode-emoji (~> 4.0, >= 4.0.4)
117+
unicode-emoji (4.0.4)
118+
uri (1.0.2)
114119

115120
PLATFORMS
116121
ruby
117122

118123
DEPENDENCIES
119124
activesupport
125+
ostruct
120126
parser
121127
pry
122128
rake
123129
rspec
124-
rubocop (= 1.64.1)
130+
rubocop (= 1.69.2)
125131
rubocop-capybara
126132
rubocop-factory_bot
127133
rubocop-graphql

Diff for: bin/codeclimate-rubocop

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ engine_config =
1414
{}
1515
end
1616

17-
CC::Engine::Rubocop.new(Dir.pwd, engine_config, STDOUT).run
17+
CC::Engine::Rubocop.new(Dir.pwd, engine_config, $stdout).run

Diff for: config/contents/gemspec/add_runtime_dependency.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Prefer `add_dependency` over `add_runtime_dependency` as the latter is
2+
considered soft-deprecated.
3+
4+
### Example:
5+
6+
# bad
7+
Gem::Specification.new do |spec|
8+
spec.add_runtime_dependency('rubocop')
9+
end
10+
11+
# good
12+
Gem::Specification.new do |spec|
13+
spec.add_dependency('rubocop')
14+
end

Diff for: config/contents/gemspec/duplicated_assignment.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ permitted because it is the intended use of appending values.
2626

2727
# good
2828
Gem::Specification.new do |spec|
29-
spec.add_runtime_dependency('parallel', '~> 1.10')
30-
spec.add_runtime_dependency('parser', '>= 2.3.3.1', '< 3.0')
29+
spec.add_dependency('parallel', '~> 1.10')
30+
spec.add_dependency('parser', '>= 2.3.3.1', '< 3.0')
3131
end

Diff for: config/contents/gemspec/ruby_version_globals_usage.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ to execute `rake release` and not user's ruby version.
99
# bad
1010
Gem::Specification.new do |spec|
1111
if RUBY_VERSION >= '3.0'
12-
spec.add_runtime_dependency 'gem_a'
12+
spec.add_dependency 'gem_a'
1313
else
14-
spec.add_runtime_dependency 'gem_b'
14+
spec.add_dependency 'gem_b'
1515
end
1616
end
1717

1818
# good
1919
Gem::Specification.new do |spec|
20-
spec.add_runtime_dependency 'gem_a'
20+
spec.add_dependency 'gem_a'
2121
end

Diff for: config/contents/layout/argument_alignment.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
Here we check if the arguments on a multi-line method
2-
definition are aligned.
1+
Check that the arguments on a multi-line method definition are aligned.
32

43
### Example: EnforcedStyle: with_first_argument (default)
54
# good

Diff for: config/contents/layout/array_alignment.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Here we check if the elements of a multi-line array literal are
1+
Check that the elements of a multi-line array literal are
22
aligned.
33

44
### Example: EnforcedStyle: with_first_element (default)

Diff for: config/contents/layout/assignment_indentation.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
Checks the indentation of the first line of the
22
right-hand-side of a multi-line assignment.
33

4+
The indentation of the remaining lines can be corrected with
5+
other cops such as `Layout/IndentationConsistency` and `Layout/EndAlignment`.
6+
47
### Example:
58
# bad
69
value =
@@ -13,6 +16,3 @@ right-hand-side of a multi-line assignment.
1316
if foo
1417
'bar'
1518
end
16-
17-
The indentation of the remaining lines can be corrected with
18-
other cops such as `IndentationConsistency` and `EndAlignment`.

Diff for: config/contents/layout/block_alignment.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ start of the line where the `do` appeared.
1111
start of the line where the expression started.
1212

1313
`either` (which is the default) : the `end` is allowed to be in either
14-
location. The autofixer will default to `start_of_line`.
14+
location. The autocorrect will default to `start_of_line`.
1515

1616
### Example: EnforcedStyleAlignWith: either (default)
1717
# bad

Diff for: config/contents/layout/condition_position.md

-4
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,12 @@ if/while/until.
44
### Example:
55

66
# bad
7-
87
if
98
some_condition
109
do_something
1110
end
1211

13-
### Example:
14-
1512
# good
16-
1713
if some_condition
1814
do_something
1915
end

Diff for: config/contents/layout/empty_lines_around_begin_body.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@ blocks.
33

44
### Example:
55

6-
# good
7-
6+
# bad
87
begin
8+
99
# ...
10-
end
1110

12-
# bad
11+
end
1312

13+
# good
1414
begin
15-
1615
# ...
17-
18-
end
16+
end

Diff for: config/contents/layout/first_argument_indentation.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ This cop will respect `Layout/ArgumentAlignment` and will not work when
113113

114114
### Example: EnforcedStyle: special_for_inner_method_call
115115
# The first argument should normally be indented one step more than
116-
# the preceding line, but if it's a argument for a method call that
117-
# is itself a argument in a method call, then the inner argument
116+
# the preceding line, but if it's an argument for a method call that
117+
# is itself an argument in a method call, then the inner argument
118118
# should be indented relative to the inner method.
119119

120120
# good

0 commit comments

Comments
 (0)