Skip to content

Commit d361294

Browse files
committed
Update rubocop to 1.73.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 d361294

File tree

205 files changed

+1917
-620
lines changed

Some content is hidden

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

205 files changed

+1917
-620
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.73.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

+84-68
Original file line numberDiff line numberDiff line change
@@ -1,127 +1,143 @@
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)
16-
bigdecimal (3.1.8)
19+
benchmark (0.4.0)
20+
bigdecimal (3.1.9)
1721
coderay (1.1.3)
18-
concurrent-ruby (1.3.3)
19-
connection_pool (2.4.1)
20-
diff-lcs (1.5.1)
22+
concurrent-ruby (1.3.5)
23+
connection_pool (2.5.0)
24+
diff-lcs (1.6.0)
2125
drb (2.2.1)
22-
i18n (1.14.5)
26+
i18n (1.14.7)
2327
concurrent-ruby (~> 1.0)
24-
json (2.7.2)
25-
language_server-protocol (3.17.0.3)
28+
json (2.10.1)
29+
language_server-protocol (3.17.0.4)
30+
lint_roller (1.1.0)
31+
logger (1.6.6)
2632
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)
33+
minitest (5.25.4)
34+
ostruct (0.6.1)
35+
parallel (1.26.3)
36+
parser (3.3.7.1)
3137
ast (~> 2.4.1)
3238
racc
33-
pry (0.14.2)
39+
pry (0.15.2)
3440
coderay (~> 1.1)
3541
method_source (~> 1.0)
36-
racc (1.8.0)
37-
rack (3.1.4)
42+
racc (1.8.1)
43+
rack (3.1.11)
3844
rainbow (3.1.1)
3945
rake (13.2.1)
40-
regexp_parser (2.9.2)
41-
rexml (3.3.1)
42-
strscan
46+
regexp_parser (2.10.0)
4347
rspec (3.13.0)
4448
rspec-core (~> 3.13.0)
4549
rspec-expectations (~> 3.13.0)
4650
rspec-mocks (~> 3.13.0)
47-
rspec-core (3.13.0)
51+
rspec-core (3.13.3)
4852
rspec-support (~> 3.13.0)
49-
rspec-expectations (3.13.1)
53+
rspec-expectations (3.13.3)
5054
diff-lcs (>= 1.2.0, < 2.0)
5155
rspec-support (~> 3.13.0)
52-
rspec-mocks (3.13.1)
56+
rspec-mocks (3.13.2)
5357
diff-lcs (>= 1.2.0, < 2.0)
5458
rspec-support (~> 3.13.0)
55-
rspec-support (3.13.1)
56-
rubocop (1.64.1)
59+
rspec-support (3.13.2)
60+
rubocop (1.73.2)
5761
json (~> 2.3)
58-
language_server-protocol (>= 3.17.0)
62+
language_server-protocol (~> 3.17.0.2)
63+
lint_roller (~> 1.1.0)
5964
parallel (~> 1.10)
6065
parser (>= 3.3.0.2)
6166
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)
67+
regexp_parser (>= 2.9.3, < 3.0)
68+
rubocop-ast (>= 1.38.0, < 2.0)
6569
ruby-progressbar (~> 1.7)
66-
unicode-display_width (>= 2.4.0, < 3.0)
67-
rubocop-ast (1.31.3)
70+
unicode-display_width (>= 2.4.0, < 4.0)
71+
rubocop-ast (1.38.1)
6872
parser (>= 3.3.1.0)
6973
rubocop-capybara (2.21.0)
7074
rubocop (~> 1.41)
71-
rubocop-factory_bot (2.26.1)
72-
rubocop (~> 1.61)
73-
rubocop-graphql (1.5.2)
74-
rubocop (>= 0.90, < 2)
75-
rubocop-i18n (3.0.0)
76-
rubocop (~> 1.0)
77-
rubocop-minitest (0.35.0)
78-
rubocop (>= 1.61, < 2.0)
79-
rubocop-ast (>= 1.31.1, < 2.0)
80-
rubocop-performance (1.21.1)
81-
rubocop (>= 1.48.1, < 2.0)
82-
rubocop-ast (>= 1.31.1, < 2.0)
83-
rubocop-rails (2.25.1)
75+
rubocop-factory_bot (2.27.0)
76+
lint_roller (~> 1.1)
77+
rubocop (~> 1.72, >= 1.72.1)
78+
rubocop-graphql (1.5.4)
79+
rubocop (>= 1.50, < 2)
80+
rubocop-i18n (3.2.3)
81+
lint_roller (~> 1.1)
82+
rubocop (>= 1.72.1)
83+
rubocop-minitest (0.37.1)
84+
lint_roller (~> 1.1)
85+
rubocop (>= 1.72.1, < 2.0)
86+
rubocop-ast (>= 1.38.0, < 2.0)
87+
rubocop-performance (1.24.0)
88+
lint_roller (~> 1.1)
89+
rubocop (>= 1.72.1, < 2.0)
90+
rubocop-ast (>= 1.38.0, < 2.0)
91+
rubocop-rails (2.30.3)
8492
activesupport (>= 4.2.0)
93+
lint_roller (~> 1.1)
8594
rack (>= 1.1)
86-
rubocop (>= 1.33.0, < 2.0)
87-
rubocop-ast (>= 1.31.1, < 2.0)
88-
rubocop-rails-omakase (1.0.0)
89-
rubocop
90-
rubocop-minitest
91-
rubocop-performance
92-
rubocop-rails
93-
rubocop-rake (0.6.0)
94-
rubocop (~> 1.0)
95-
rubocop-rspec (3.0.1)
96-
rubocop (~> 1.61)
95+
rubocop (>= 1.72.1, < 2.0)
96+
rubocop-ast (>= 1.38.0, < 2.0)
97+
rubocop-rails-omakase (1.1.0)
98+
rubocop (>= 1.72)
99+
rubocop-performance (>= 1.24)
100+
rubocop-rails (>= 2.30)
101+
rubocop-rake (0.7.1)
102+
lint_roller (~> 1.1)
103+
rubocop (>= 1.72.1)
104+
rubocop-rspec (3.5.0)
105+
lint_roller (~> 1.1)
106+
rubocop (~> 1.72, >= 1.72.1)
97107
rubocop-rspec_rails (2.30.0)
98108
rubocop (~> 1.61)
99109
rubocop-rspec (~> 3, >= 3.0.1)
100-
rubocop-sequel (0.3.4)
101-
rubocop (~> 1.0)
102-
rubocop-shopify (2.15.1)
103-
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)
110+
rubocop-sequel (0.4.0)
111+
lint_roller (~> 1.1)
112+
rubocop (>= 1.72.1, < 1.74.0)
113+
rubocop-shopify (2.16.0)
114+
rubocop (~> 1.62)
115+
rubocop-sorbet (0.8.9)
116+
rubocop (>= 1)
117+
rubocop-thread_safety (0.7.0)
118+
lint_roller (~> 1.1)
119+
rubocop (~> 1.72, >= 1.72.1)
108120
ruby-progressbar (1.13.0)
109-
strscan (3.1.0)
110-
test-prof (1.3.3.1)
121+
securerandom (0.4.1)
122+
test-prof (1.4.4)
111123
tzinfo (2.0.6)
112124
concurrent-ruby (~> 1.0)
113-
unicode-display_width (2.5.0)
125+
unicode-display_width (3.1.4)
126+
unicode-emoji (~> 4.0, >= 4.0.4)
127+
unicode-emoji (4.0.4)
128+
uri (1.0.3)
114129

115130
PLATFORMS
116131
ruby
117132

118133
DEPENDENCIES
119134
activesupport
135+
ostruct
120136
parser
121137
pry
122138
rake
123139
rspec
124-
rubocop (= 1.64.1)
140+
rubocop (= 1.73.2)
125141
rubocop-capybara
126142
rubocop-factory_bot
127143
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/access_modifier_indentation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Bare access modifiers (those not applying to specific methods) should be
2-
indented as deep as method definitions, or as deep as the class/module
2+
indented as deep as method definitions, or as deep as the `class`/`module`
33
keyword, depending on configuration.
44

55
### Example: EnforcedStyle: indent (default)

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 call 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

0 commit comments

Comments
 (0)