Skip to content

Commit d26ca0f

Browse files
authored
Update rubocop to 1.62.1 (#365)
- General bundle update. - Update the docs too.
1 parent 1c9754f commit d26ca0f

File tree

7 files changed

+56
-40
lines changed

7 files changed

+56
-40
lines changed

Diff for: Gemfile

+1-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.60.2", require: false
8+
gem "rubocop", "1.62.1", require: false
99
gem "rubocop-graphql", require: false
1010
gem "rubocop-i18n", require: false
1111
gem "rubocop-minitest", require: false

Diff for: Gemfile.lock

+32-34
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (7.1.3)
4+
activesupport (7.1.3.2)
55
base64
66
bigdecimal
77
concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -13,19 +13,18 @@ GEM
1313
tzinfo (~> 2.0)
1414
ast (2.4.2)
1515
base64 (0.2.0)
16-
bigdecimal (3.1.6)
16+
bigdecimal (3.1.7)
1717
coderay (1.1.3)
1818
concurrent-ruby (1.2.3)
1919
connection_pool (2.4.1)
20-
diff-lcs (1.5.0)
21-
drb (2.2.0)
22-
ruby2_keywords
23-
i18n (1.14.1)
20+
diff-lcs (1.5.1)
21+
drb (2.2.1)
22+
i18n (1.14.4)
2423
concurrent-ruby (~> 1.0)
2524
json (2.7.1)
2625
language_server-protocol (3.17.0.3)
2726
method_source (1.0.0)
28-
minitest (5.21.2)
27+
minitest (5.22.3)
2928
mutex_m (0.2.0)
3029
parallel (1.24.0)
3130
parser (3.3.0.5)
@@ -35,37 +34,37 @@ GEM
3534
coderay (~> 1.1)
3635
method_source (~> 1.0)
3736
racc (1.7.3)
38-
rack (3.0.8)
37+
rack (3.0.9.1)
3938
rainbow (3.1.1)
4039
rake (13.1.0)
4140
regexp_parser (2.9.0)
4241
rexml (3.2.6)
43-
rspec (3.12.0)
44-
rspec-core (~> 3.12.0)
45-
rspec-expectations (~> 3.12.0)
46-
rspec-mocks (~> 3.12.0)
47-
rspec-core (3.12.2)
48-
rspec-support (~> 3.12.0)
49-
rspec-expectations (3.12.3)
42+
rspec (3.13.0)
43+
rspec-core (~> 3.13.0)
44+
rspec-expectations (~> 3.13.0)
45+
rspec-mocks (~> 3.13.0)
46+
rspec-core (3.13.0)
47+
rspec-support (~> 3.13.0)
48+
rspec-expectations (3.13.0)
5049
diff-lcs (>= 1.2.0, < 2.0)
51-
rspec-support (~> 3.12.0)
52-
rspec-mocks (3.12.6)
50+
rspec-support (~> 3.13.0)
51+
rspec-mocks (3.13.0)
5352
diff-lcs (>= 1.2.0, < 2.0)
54-
rspec-support (~> 3.12.0)
55-
rspec-support (3.12.1)
56-
rubocop (1.60.2)
53+
rspec-support (~> 3.13.0)
54+
rspec-support (3.13.1)
55+
rubocop (1.62.1)
5756
json (~> 2.3)
5857
language_server-protocol (>= 3.17.0)
5958
parallel (~> 1.10)
6059
parser (>= 3.3.0.2)
6160
rainbow (>= 2.2.2, < 4.0)
6261
regexp_parser (>= 1.8, < 3.0)
6362
rexml (>= 3.2.5, < 4.0)
64-
rubocop-ast (>= 1.30.0, < 2.0)
63+
rubocop-ast (>= 1.31.1, < 2.0)
6564
ruby-progressbar (~> 1.7)
6665
unicode-display_width (>= 2.4.0, < 3.0)
67-
rubocop-ast (1.30.0)
68-
parser (>= 3.2.1.0)
66+
rubocop-ast (1.31.2)
67+
parser (>= 3.3.0.4)
6968
rubocop-capybara (2.20.0)
7069
rubocop (~> 1.41)
7170
rubocop-factory_bot (2.25.1)
@@ -74,34 +73,33 @@ GEM
7473
rubocop (>= 0.90, < 2)
7574
rubocop-i18n (3.0.0)
7675
rubocop (~> 1.0)
77-
rubocop-minitest (0.34.5)
78-
rubocop (>= 1.39, < 2.0)
79-
rubocop-ast (>= 1.30.0, < 2.0)
76+
rubocop-minitest (0.35.0)
77+
rubocop (>= 1.61, < 2.0)
78+
rubocop-ast (>= 1.31.1, < 2.0)
8079
rubocop-performance (1.20.2)
8180
rubocop (>= 1.48.1, < 2.0)
8281
rubocop-ast (>= 1.30.0, < 2.0)
83-
rubocop-rails (2.23.1)
82+
rubocop-rails (2.24.0)
8483
activesupport (>= 4.2.0)
8584
rack (>= 1.1)
8685
rubocop (>= 1.33.0, < 2.0)
87-
rubocop-ast (>= 1.30.0, < 2.0)
86+
rubocop-ast (>= 1.31.1, < 2.0)
8887
rubocop-rake (0.6.0)
8988
rubocop (~> 1.0)
90-
rubocop-rspec (2.26.1)
89+
rubocop-rspec (2.27.1)
9190
rubocop (~> 1.40)
9291
rubocop-capybara (~> 2.17)
9392
rubocop-factory_bot (~> 2.22)
9493
rubocop-sequel (0.3.4)
9594
rubocop (~> 1.0)
96-
rubocop-shopify (2.14.0)
95+
rubocop-shopify (2.15.1)
9796
rubocop (~> 1.51)
98-
rubocop-sorbet (0.7.6)
97+
rubocop-sorbet (0.7.8)
9998
rubocop (>= 0.90.0)
10099
rubocop-thread_safety (0.5.1)
101100
rubocop (>= 0.90.0)
102101
ruby-progressbar (1.13.0)
103-
ruby2_keywords (0.0.5)
104-
test-prof (1.3.1)
102+
test-prof (1.3.2)
105103
tzinfo (2.0.6)
106104
concurrent-ruby (~> 1.0)
107105
unicode-display_width (2.5.0)
@@ -115,7 +113,7 @@ DEPENDENCIES
115113
pry
116114
rake
117115
rspec
118-
rubocop (= 1.60.2)
116+
rubocop (= 1.62.1)
119117
rubocop-graphql
120118
rubocop-i18n
121119
rubocop-minitest

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ start of the line where the matching keyword appears.
1515
This `Layout/EndAlignment` cop aligns with keywords (e.g. `if`, `while`, `case`)
1616
by default. On the other hand, `Layout/BeginEndAlignment` cop aligns with
1717
`EnforcedStyleAlignWith: start_of_line` by default due to `||= begin` tends
18-
to align with the start of the line. These style can be configured by each cop.
18+
to align with the start of the line. `Layout/DefEndAlignment` cop also aligns with
19+
`EnforcedStyleAlignWith: start_of_line` by default.
20+
These style can be configured by each cop.
1921

2022
### Example: EnforcedStyleAlignWith: keyword (default)
2123
# bad

Diff for: config/contents/lint/redundant_safe_navigation.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Checks for redundant safe navigation calls.
22
Use cases where a constant, named in camel case for classes and modules is `nil` are rare,
3-
and an offense is not detected when the receiver is a snake case constant.
3+
and an offense is not detected when the receiver is a constant. The detection also applies
4+
to literal receivers, except for `nil`.
45

56
For all receivers, the `instance_of?`, `kind_of?`, `is_a?`, `eql?`, `respond_to?`,
67
and `equal?` methods are checked by default.

Diff for: config/contents/style/arguments_forwarding.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ In Ruby 2.7, arguments forwarding has been added.
33
This cop identifies places where `do_something(*args, &block)`
44
can be replaced by `do_something(...)`.
55

6+
In Ruby 3.1, anonymous block forwarding has been added.
7+
8+
This cop identifies places where `do_something(&block)` can be replaced
9+
by `do_something(&)`; if desired, this functionality can be disabled
10+
by setting `UseAnonymousForwarding: false`.
11+
612
In Ruby 3.2, anonymous args/kwargs forwarding has been added.
713

814
This cop also identifies places where `use_args(*args)`/`use_kwargs(**kwargs)` can be
@@ -36,22 +42,25 @@ Names not on this list are likely to be meaningful and are allowed by default.
3642

3743
### Example: UseAnonymousForwarding: true (default, only relevant for Ruby >= 3.2)
3844
# bad
39-
def foo(*args, **kwargs)
45+
def foo(*args, **kwargs, &block)
4046
args_only(*args)
4147
kwargs_only(**kwargs)
48+
block_only(&block)
4249
end
4350

4451
# good
45-
def foo(*, **)
52+
def foo(*, **, &)
4653
args_only(*)
4754
kwargs_only(**)
55+
block_only(&)
4856
end
4957

5058
### Example: UseAnonymousForwarding: false (only relevant for Ruby >= 3.2)
5159
# good
52-
def foo(*args, **kwargs)
60+
def foo(*args, **kwargs, &block)
5361
args_only(*args)
5462
kwargs_only(**kwargs)
63+
block_only(&block)
5564
end
5665

5766
### Example: AllowOnlyRestArgument: true (default, only relevant for Ruby < 3.2)

Diff for: config/contents/style/invertible_unless_condition.md

+2
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,14 @@ actually inverse of each other.
2727
foo unless x != y
2828
foo unless x >= 10
2929
foo unless x.even?
30+
foo unless odd?
3031

3132
# good
3233
foo if bar
3334
foo if x == y
3435
foo if x < 10
3536
foo if x.odd?
37+
foo if even?
3638

3739
# bad (complex condition)
3840
foo unless x != y || x.even?

Diff for: config/contents/style/raise_args.md

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ passed multiple arguments.
1111
The exploded style has an `AllowedCompactTypes` configuration
1212
option that takes an Array of exception name Strings.
1313

14+
### Safety:
15+
16+
This cop is unsafe because `raise Foo` calls `Foo.exception`, not `Foo.new`.
17+
1418
### Example: EnforcedStyle: exploded (default)
1519
# bad
1620
raise StandardError.new('message')

0 commit comments

Comments
 (0)