Skip to content

Commit e89041b

Browse files
authored
Update rubocop to 1.28.1 (#313)
- General bundle update. - Update the docs too.
1 parent cf66bad commit e89041b

33 files changed

+441
-86
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ gem "activesupport", require: false
66
gem "mry", require: false
77
gem "parser"
88
gem "pry", require: false
9-
gem "rubocop", "1.25.1", require: false
9+
gem "rubocop", "1.28.1", require: false
1010
gem "rubocop-i18n", require: false
1111
gem "rubocop-graphql", require: false
1212
gem "rubocop-minitest", require: false

Gemfile.lock

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,84 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (7.0.1)
4+
activesupport (7.0.2.3)
55
concurrent-ruby (~> 1.0, >= 1.0.2)
66
i18n (>= 1.6, < 2)
77
minitest (>= 5.1)
88
tzinfo (~> 2.0)
99
ast (2.4.2)
1010
coderay (1.1.3)
11-
concurrent-ruby (1.1.9)
11+
concurrent-ruby (1.1.10)
1212
diff-lcs (1.5.0)
13-
i18n (1.9.1)
13+
i18n (1.10.0)
1414
concurrent-ruby (~> 1.0)
1515
method_source (1.0.0)
1616
minitest (5.15.0)
1717
mry (0.78.0.0)
1818
rubocop (>= 0.41.0)
19-
parallel (1.21.0)
20-
parser (3.1.0.0)
19+
parallel (1.22.1)
20+
parser (3.1.2.0)
2121
ast (~> 2.4.1)
2222
pry (0.14.1)
2323
coderay (~> 1.1)
2424
method_source (~> 1.0)
2525
rack (2.2.3)
2626
rainbow (3.1.1)
2727
rake (13.0.6)
28-
regexp_parser (2.2.0)
28+
regexp_parser (2.3.0)
2929
rexml (3.2.5)
30-
rspec (3.10.0)
31-
rspec-core (~> 3.10.0)
32-
rspec-expectations (~> 3.10.0)
33-
rspec-mocks (~> 3.10.0)
34-
rspec-core (3.10.2)
35-
rspec-support (~> 3.10.0)
36-
rspec-expectations (3.10.2)
30+
rspec (3.11.0)
31+
rspec-core (~> 3.11.0)
32+
rspec-expectations (~> 3.11.0)
33+
rspec-mocks (~> 3.11.0)
34+
rspec-core (3.11.0)
35+
rspec-support (~> 3.11.0)
36+
rspec-expectations (3.11.0)
3737
diff-lcs (>= 1.2.0, < 2.0)
38-
rspec-support (~> 3.10.0)
39-
rspec-mocks (3.10.3)
38+
rspec-support (~> 3.11.0)
39+
rspec-mocks (3.11.1)
4040
diff-lcs (>= 1.2.0, < 2.0)
41-
rspec-support (~> 3.10.0)
42-
rspec-support (3.10.3)
43-
rubocop (1.25.1)
41+
rspec-support (~> 3.11.0)
42+
rspec-support (3.11.0)
43+
rubocop (1.28.1)
4444
parallel (~> 1.10)
4545
parser (>= 3.1.0.0)
4646
rainbow (>= 2.2.2, < 4.0)
4747
regexp_parser (>= 1.8, < 3.0)
4848
rexml
49-
rubocop-ast (>= 1.15.1, < 2.0)
49+
rubocop-ast (>= 1.17.0, < 2.0)
5050
ruby-progressbar (~> 1.7)
5151
unicode-display_width (>= 1.4.0, < 3.0)
52-
rubocop-ast (1.15.1)
53-
parser (>= 3.0.1.1)
54-
rubocop-graphql (0.12.3)
52+
rubocop-ast (1.17.0)
53+
parser (>= 3.1.1.0)
54+
rubocop-graphql (0.14.2)
5555
rubocop (>= 0.87, < 2)
5656
rubocop-i18n (3.0.0)
5757
rubocop (~> 1.0)
58-
rubocop-minitest (0.17.1)
58+
rubocop-minitest (0.19.1)
5959
rubocop (>= 0.90, < 2.0)
60-
rubocop-performance (1.13.2)
60+
rubocop-performance (1.13.3)
6161
rubocop (>= 1.7.0, < 2.0)
6262
rubocop-ast (>= 0.4.0)
63-
rubocop-rails (2.13.2)
63+
rubocop-rails (2.14.2)
6464
activesupport (>= 4.2.0)
6565
rack (>= 1.1)
6666
rubocop (>= 1.7.0, < 2.0)
6767
rubocop-rake (0.6.0)
6868
rubocop (~> 1.0)
69-
rubocop-rspec (2.8.0)
69+
rubocop-rspec (2.10.0)
7070
rubocop (~> 1.19)
7171
rubocop-sequel (0.3.3)
7272
rubocop (~> 1.0)
73-
rubocop-shopify (2.4.0)
74-
rubocop (~> 1.24)
75-
rubocop-sorbet (0.6.5)
73+
rubocop-shopify (2.5.0)
74+
rubocop (~> 1.25)
75+
rubocop-sorbet (0.6.7)
7676
rubocop (>= 0.90.0)
7777
rubocop-thread_safety (0.4.4)
7878
rubocop (>= 0.53.0)
7979
ruby-progressbar (1.11.0)
8080
safe_yaml (1.0.5)
81-
test-prof (1.0.7)
81+
test-prof (1.0.8)
8282
tzinfo (2.0.4)
8383
concurrent-ruby (~> 1.0)
8484
unicode-display_width (2.1.0)
@@ -93,7 +93,7 @@ DEPENDENCIES
9393
pry
9494
rake
9595
rspec
96-
rubocop (= 1.25.1)
96+
rubocop (= 1.28.1)
9797
rubocop-graphql
9898
rubocop-i18n
9999
rubocop-minitest

config/contents/gemspec/date_assignment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ It is set automatically when the gem is packaged.
55

66
# bad
77
Gem::Specification.new do |spec|
8-
s.name = 'your_cool_gem_name'
8+
spec.name = 'your_cool_gem_name'
99
spec.date = Time.now.strftime('%Y-%m-%d')
1010
end
1111

1212
# good
1313
Gem::Specification.new do |spec|
14-
s.name = 'your_cool_gem_name'
14+
spec.name = 'your_cool_gem_name'
1515
end

config/contents/gemspec/require_mfa.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
Requires a gemspec to have `rubygems_mfa_required` metadata set.
22

3-
This setting tells RubyGems that MFA is required for accounts to
4-
be able perform privileged operations, such as (see
5-
RubyGems' documentation for the full list of privileged operations):
3+
This setting tells RubyGems that MFA (Multi-Factor Authentication) is
4+
required for accounts to be able perform privileged operations, such as
5+
(see RubyGems' documentation for the full list of privileged
6+
operations):
67

78
* `gem push`
89
* `gem yank`

config/contents/layout/case_indentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This cop checks how the `when` and `in`s of a `case` expression
1+
This cop checks how the `when` and ``in``s of a `case` expression
22
are indented in relation to its `case` or `end` keyword.
33

44
It will register a separate offense for each misaligned `when` and `in`.

config/contents/layout/indentation_width.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ one.
1919
end
2020
end
2121

22-
### Example: IgnoredPatterns: ['^\s*module']
22+
### Example: AllowedPatterns: ['^\s*module']
2323
# bad
2424
module A
2525
class B

config/contents/layout/multiline_operation_indentation.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
1-
This cop checks the indentation of the right hand side operand in
2-
binary operations that span more than one line.
1+
This cop checks the indentation of the right hand side operand in binary operations that
2+
span more than one line.
33

4-
The `aligned` style checks that operators are aligned if they are part
5-
of an `if` or `while` condition, a `return` statement, etc. In other
6-
contexts, the second operand should be indented regardless of enforced
7-
style.
4+
The `aligned` style checks that operators are aligned if they are part of an `if` or `while`
5+
condition, an explicit `return` statement, etc. In other contexts, the second operand should
6+
be indented regardless of enforced style.
87

98
### Example: EnforcedStyle: aligned (default)
109
# bad
1110
if a +
1211
b
1312
something &&
14-
something_else
13+
something_else
1514
end
1615

1716
# good
1817
if a +
1918
b
2019
something &&
21-
something_else
20+
something_else
2221
end
2322

2423
### Example: EnforcedStyle: indented

config/contents/lint/duplicate_require.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
This cop checks for duplicate `require`s and `require_relative`s.
22

3+
### Safety:
4+
5+
This cop's autocorrection is unsafe because it may break the dependency order
6+
of `require`.
7+
38
### Example:
49
# bad
510
require 'foo'

config/contents/lint/incompatible_io_select_with_fiber_scheduler.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11

22
This cop checks for `IO.select` that is incompatible with Fiber Scheduler since Ruby 3.0.
33

4+
NOTE: When the method is successful the return value of `IO.select` is `[[IO]]`,
5+
and the return value of `io.wait_readable` and `io.wait_writable` are `self`.
6+
They are not auto-corrected when assigning a return value because these types are different.
7+
It's up to user how to handle the return value.
8+
9+
### Safety:
10+
11+
This cop's autocorrection is unsafe because `NoMethodError` occurs
12+
if `require 'io/wait'` is not called.
13+
414
### Example:
515

616
# bad
@@ -14,8 +24,3 @@ This cop checks for `IO.select` that is incompatible with Fiber Scheduler since
1424

1525
# good
1626
io.wait_writable(timeout)
17-
18-
### Safety:
19-
20-
This cop's autocorrection is unsafe because `NoMethodError` occurs
21-
if `require 'io/wait'` is not called.
Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
This cop looks for error classes inheriting from `Exception`
2-
and its standard library subclasses, excluding subclasses of
3-
`StandardError`. It is configurable to suggest using either
4-
`RuntimeError` (default) or `StandardError` instead.
1+
This cop looks for error classes inheriting from `Exception`.
2+
It is configurable to suggest using either `StandardError` (default) or
3+
`RuntimeError` instead.
54

6-
### Example: EnforcedStyle: runtime_error (default)
5+
### Safety:
6+
7+
This cop's autocorrection is unsafe because `rescue` that omit
8+
exception class handle `StandardError` and its subclasses,
9+
but not `Exception` and its subclasses.
10+
11+
### Example: EnforcedStyle: standard_error (default)
712
# bad
813

914
class C < Exception; end
@@ -12,11 +17,11 @@ and its standard library subclasses, excluding subclasses of
1217

1318
# good
1419

15-
class C < RuntimeError; end
20+
class C < StandardError; end
1621

17-
C = Class.new(RuntimeError)
22+
C = Class.new(StandardError)
1823

19-
### Example: EnforcedStyle: standard_error
24+
### Example: EnforcedStyle: runtime_error
2025
# bad
2126

2227
class C < Exception; end
@@ -25,6 +30,6 @@ and its standard library subclasses, excluding subclasses of
2530

2631
# good
2732

28-
class C < StandardError; end
33+
class C < RuntimeError; end
2934

30-
C = Class.new(StandardError)
35+
C = Class.new(RuntimeError)

0 commit comments

Comments
 (0)