Skip to content

Commit 1c9754f

Browse files
authored
Update rubocop to 1.60.2 (#363)
- General bundle update. - Update the docs too. - Fix a rubocop gem ordering complaint in Gemfile.
1 parent 0c04383 commit 1c9754f

Some content is hidden

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

46 files changed

+451
-87
lines changed

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ source 'https://rubygems.org'
55
gem "activesupport", require: false
66
gem "parser"
77
gem "pry", require: false
8-
gem "rubocop", "1.56.3", require: false
9-
gem "rubocop-i18n", require: false
8+
gem "rubocop", "1.60.2", require: false
109
gem "rubocop-graphql", require: false
10+
gem "rubocop-i18n", require: false
1111
gem "rubocop-minitest", require: false
1212
gem "rubocop-performance", require: false
1313
gem "rubocop-rails", require: false

Gemfile.lock

Lines changed: 42 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,44 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (7.0.8)
4+
activesupport (7.1.3)
5+
base64
6+
bigdecimal
57
concurrent-ruby (~> 1.0, >= 1.0.2)
8+
connection_pool (>= 2.2.5)
9+
drb
610
i18n (>= 1.6, < 2)
711
minitest (>= 5.1)
12+
mutex_m
813
tzinfo (~> 2.0)
914
ast (2.4.2)
10-
base64 (0.1.1)
15+
base64 (0.2.0)
16+
bigdecimal (3.1.6)
1117
coderay (1.1.3)
12-
concurrent-ruby (1.2.2)
18+
concurrent-ruby (1.2.3)
19+
connection_pool (2.4.1)
1320
diff-lcs (1.5.0)
21+
drb (2.2.0)
22+
ruby2_keywords
1423
i18n (1.14.1)
1524
concurrent-ruby (~> 1.0)
16-
json (2.6.3)
25+
json (2.7.1)
1726
language_server-protocol (3.17.0.3)
1827
method_source (1.0.0)
19-
minitest (5.20.0)
20-
parallel (1.23.0)
21-
parser (3.2.2.3)
28+
minitest (5.21.2)
29+
mutex_m (0.2.0)
30+
parallel (1.24.0)
31+
parser (3.3.0.5)
2232
ast (~> 2.4.1)
2333
racc
2434
pry (0.14.2)
2535
coderay (~> 1.1)
2636
method_source (~> 1.0)
27-
racc (1.7.1)
37+
racc (1.7.3)
2838
rack (3.0.8)
2939
rainbow (3.1.1)
30-
rake (13.0.6)
31-
regexp_parser (2.8.1)
40+
rake (13.1.0)
41+
regexp_parser (2.9.0)
3242
rexml (3.2.6)
3343
rspec (3.12.0)
3444
rspec-core (~> 3.12.0)
@@ -43,56 +53,58 @@ GEM
4353
diff-lcs (>= 1.2.0, < 2.0)
4454
rspec-support (~> 3.12.0)
4555
rspec-support (3.12.1)
46-
rubocop (1.56.3)
47-
base64 (~> 0.1.1)
56+
rubocop (1.60.2)
4857
json (~> 2.3)
4958
language_server-protocol (>= 3.17.0)
5059
parallel (~> 1.10)
51-
parser (>= 3.2.2.3)
60+
parser (>= 3.3.0.2)
5261
rainbow (>= 2.2.2, < 4.0)
5362
regexp_parser (>= 1.8, < 3.0)
5463
rexml (>= 3.2.5, < 4.0)
55-
rubocop-ast (>= 1.28.1, < 2.0)
64+
rubocop-ast (>= 1.30.0, < 2.0)
5665
ruby-progressbar (~> 1.7)
5766
unicode-display_width (>= 2.4.0, < 3.0)
58-
rubocop-ast (1.29.0)
67+
rubocop-ast (1.30.0)
5968
parser (>= 3.2.1.0)
60-
rubocop-capybara (2.19.0)
69+
rubocop-capybara (2.20.0)
6170
rubocop (~> 1.41)
62-
rubocop-factory_bot (2.24.0)
63-
rubocop (~> 1.33)
64-
rubocop-graphql (1.4.0)
71+
rubocop-factory_bot (2.25.1)
72+
rubocop (~> 1.41)
73+
rubocop-graphql (1.5.0)
6574
rubocop (>= 0.90, < 2)
6675
rubocop-i18n (3.0.0)
6776
rubocop (~> 1.0)
68-
rubocop-minitest (0.31.1)
77+
rubocop-minitest (0.34.5)
6978
rubocop (>= 1.39, < 2.0)
70-
rubocop-performance (1.19.1)
71-
rubocop (>= 1.7.0, < 2.0)
72-
rubocop-ast (>= 0.4.0)
73-
rubocop-rails (2.21.1)
79+
rubocop-ast (>= 1.30.0, < 2.0)
80+
rubocop-performance (1.20.2)
81+
rubocop (>= 1.48.1, < 2.0)
82+
rubocop-ast (>= 1.30.0, < 2.0)
83+
rubocop-rails (2.23.1)
7484
activesupport (>= 4.2.0)
7585
rack (>= 1.1)
7686
rubocop (>= 1.33.0, < 2.0)
87+
rubocop-ast (>= 1.30.0, < 2.0)
7788
rubocop-rake (0.6.0)
7889
rubocop (~> 1.0)
79-
rubocop-rspec (2.24.0)
80-
rubocop (~> 1.33)
90+
rubocop-rspec (2.26.1)
91+
rubocop (~> 1.40)
8192
rubocop-capybara (~> 2.17)
8293
rubocop-factory_bot (~> 2.22)
8394
rubocop-sequel (0.3.4)
8495
rubocop (~> 1.0)
8596
rubocop-shopify (2.14.0)
8697
rubocop (~> 1.51)
87-
rubocop-sorbet (0.7.3)
98+
rubocop-sorbet (0.7.6)
8899
rubocop (>= 0.90.0)
89100
rubocop-thread_safety (0.5.1)
90101
rubocop (>= 0.90.0)
91102
ruby-progressbar (1.13.0)
92-
test-prof (1.2.3)
103+
ruby2_keywords (0.0.5)
104+
test-prof (1.3.1)
93105
tzinfo (2.0.6)
94106
concurrent-ruby (~> 1.0)
95-
unicode-display_width (2.4.2)
107+
unicode-display_width (2.5.0)
96108

97109
PLATFORMS
98110
ruby
@@ -103,7 +115,7 @@ DEPENDENCIES
103115
pry
104116
rake
105117
rspec
106-
rubocop (= 1.56.3)
118+
rubocop (= 1.60.2)
107119
rubocop-graphql
108120
rubocop-i18n
109121
rubocop-minitest

config/contents/layout/first_array_element_indentation.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
Checks the indentation of the first element in an array literal
22
where the opening bracket and the first element are on separate lines.
3-
The other elements' indentations are handled by the ArrayAlignment cop.
3+
The other elements' indentations are handled by `Layout/ArrayAlignment` cop.
4+
5+
This cop will respect `Layout/ArrayAlignment` and will not work when
6+
`EnforcedStyle: with_fixed_indentation` is specified for `Layout/ArrayAlignment`.
47

58
By default, array literals that are arguments in a method call with
69
parentheses, and where the opening square bracket of the array is on the
@@ -20,15 +23,15 @@ styles are 'consistent' and 'align_brackets'. Here are examples:
2023
# element are on separate lines is indented one step (two spaces) more
2124
# than the position inside the opening parenthesis.
2225

23-
#bad
26+
# bad
2427
array = [
2528
:value
2629
]
2730
and_in_a_method_call([
2831
:no_difference
2932
])
3033

31-
#good
34+
# good
3235
array = [
3336
:value
3437
]
@@ -42,7 +45,7 @@ styles are 'consistent' and 'align_brackets'. Here are examples:
4245
# separate lines is indented the same as an array literal which is not
4346
# defined inside a method call.
4447

45-
#bad
48+
# bad
4649
# consistent
4750
array = [
4851
:value
@@ -51,7 +54,7 @@ styles are 'consistent' and 'align_brackets'. Here are examples:
5154
:its_like_this
5255
])
5356

54-
#good
57+
# good
5558
array = [
5659
:value
5760
]
@@ -63,13 +66,13 @@ styles are 'consistent' and 'align_brackets'. Here are examples:
6366
# The `align_brackets` style enforces that the opening and closing
6467
# brackets are indented to the same position.
6568

66-
#bad
69+
# bad
6770
# align_brackets
6871
and_now_for_something = [
6972
:completely_different
7073
]
7174

72-
#good
75+
# good
7376
# align_brackets
7477
and_now_for_something = [
7578
:completely_different

config/contents/layout/heredoc_indentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ are indented one step.
33

44
Note: When ``Layout/LineLength``'s `AllowHeredoc` is false (not default),
55
this cop does not add any offenses for long here documents to
6-
avoid `Layout/LineLength`'s offenses.
6+
avoid ``Layout/LineLength``'s offenses.
77

88
### Example:
99
# bad

config/contents/layout/space_around_operators.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,18 @@ the previous or next line, not counting empty lines or comment lines.
4444
a**b
4545

4646
# good
47-
a ** b
47+
a ** b
48+
49+
### Example: EnforcedStyleForRationalLiterals: no_space (default)
50+
# bad
51+
1 / 48r
52+
53+
# good
54+
1/48r
55+
56+
### Example: EnforcedStyleForRationalLiterals: space
57+
# bad
58+
1/48r
59+
60+
# good
61+
1 / 48r

config/contents/lint/assignment_in_condition.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ the author meant to use an assignment result as a condition.
1313

1414
### Example:
1515
# bad
16-
if some_var = true
16+
if some_var = value
1717
do_something
1818
end
1919

2020
# good
21-
if some_var == true
21+
if some_var == value
2222
do_something
2323
end
2424

2525
### Example: AllowSafeAssignment: true (default)
2626
# good
27-
if (some_var = true)
27+
if (some_var = value)
2828
do_something
2929
end
3030

3131
### Example: AllowSafeAssignment: false
3232
# bad
33-
if (some_var = true)
33+
if (some_var = value)
3434
do_something
3535
end

config/contents/lint/binary_operator_with_identical_operands.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Checks for places where binary operator has identical operands.
22

33
It covers arithmetic operators: `-`, `/`, `%`;
4-
comparison operators: `==`, `===`, `=~`, `>`, `>=`, `<`, `<=`;
4+
comparison operators: `==`, `===`, `=~`, `>`, `>=`, `<`, ``<=``;
55
bitwise operators: `|`, `^`, `&`;
66
boolean operators: `&&`, `||`
7-
and "spaceship" operator - `<=>`.
7+
and "spaceship" operator - ``<=>``.
88

99
Simple arithmetic operations are allowed by this cop: `+`, `*`, `**`, `<<` and `>>`.
1010
Although these can be rewritten in a different way, it should not be necessary to

config/contents/lint/constant_overwritten_in_rescue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Checks for overwriting an exception with an exception result by use `rescue =>`.
1+
Checks for overwriting an exception with an exception result by use ``rescue =>``.
22

33
You intended to write as `rescue StandardError`.
44
However, you have written `rescue => StandardError`.

config/contents/lint/empty_block.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Checks for blocks without a body.
22
Such empty blocks are typically an oversight or we should provide a comment
3-
be clearer what we're aiming for.
3+
to clarify what we're aiming for.
44

55
Empty lambdas and procs are ignored by default.
66

config/contents/lint/float_comparison.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ if you perform any arithmetic operations involving precision loss.
1313
# good - using BigDecimal
1414
x.to_d == 0.1.to_d
1515

16+
# good - comparing against zero
17+
x == 0.0
18+
x != 0.0
19+
1620
# good
1721
(x - 0.1).abs < Float::EPSILON
1822

0 commit comments

Comments
 (0)