Skip to content

Commit a2aa552

Browse files
authored
Update rubocop to 1.25.0 (#310)
- General bundle update. - Update the docs too.
1 parent 4c5154e commit a2aa552

File tree

6 files changed

+31
-14
lines changed

6 files changed

+31
-14
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.24.1", require: false
9+
gem "rubocop", "1.25.0", require: false
1010
gem "rubocop-i18n", require: false
1111
gem "rubocop-graphql", require: false
1212
gem "rubocop-minitest", require: false

Gemfile.lock

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (7.0.0)
4+
activesupport (7.0.1)
55
concurrent-ruby (~> 1.0, >= 1.0.2)
66
i18n (>= 1.6, < 2)
77
minitest (>= 5.1)
@@ -23,7 +23,7 @@ GEM
2323
coderay (~> 1.1)
2424
method_source (~> 1.0)
2525
rack (2.2.3)
26-
rainbow (3.0.0)
26+
rainbow (3.1.1)
2727
rake (13.0.6)
2828
regexp_parser (2.2.0)
2929
rexml (3.2.5)
@@ -33,16 +33,16 @@ GEM
3333
rspec-mocks (~> 3.10.0)
3434
rspec-core (3.10.1)
3535
rspec-support (~> 3.10.0)
36-
rspec-expectations (3.10.1)
36+
rspec-expectations (3.10.2)
3737
diff-lcs (>= 1.2.0, < 2.0)
3838
rspec-support (~> 3.10.0)
3939
rspec-mocks (3.10.2)
4040
diff-lcs (>= 1.2.0, < 2.0)
4141
rspec-support (~> 3.10.0)
4242
rspec-support (3.10.3)
43-
rubocop (1.24.1)
43+
rubocop (1.25.0)
4444
parallel (~> 1.10)
45-
parser (>= 3.0.0.0)
45+
parser (>= 3.1.0.0)
4646
rainbow (>= 2.2.2, < 4.0)
4747
regexp_parser (>= 1.8, < 3.0)
4848
rexml
@@ -51,16 +51,16 @@ GEM
5151
unicode-display_width (>= 1.4.0, < 3.0)
5252
rubocop-ast (1.15.1)
5353
parser (>= 3.0.1.1)
54-
rubocop-graphql (0.12.0)
54+
rubocop-graphql (0.12.3)
5555
rubocop (>= 0.87, < 2)
5656
rubocop-i18n (3.0.0)
5757
rubocop (~> 1.0)
5858
rubocop-minitest (0.17.0)
5959
rubocop (>= 0.90, < 2.0)
60-
rubocop-performance (1.13.1)
60+
rubocop-performance (1.13.2)
6161
rubocop (>= 1.7.0, < 2.0)
6262
rubocop-ast (>= 0.4.0)
63-
rubocop-rails (2.13.0)
63+
rubocop-rails (2.13.2)
6464
activesupport (>= 4.2.0)
6565
rack (>= 1.1)
6666
rubocop (>= 1.7.0, < 2.0)
@@ -70,8 +70,8 @@ GEM
7070
rubocop (~> 1.19)
7171
rubocop-sequel (0.3.3)
7272
rubocop (~> 1.0)
73-
rubocop-shopify (2.3.0)
74-
rubocop (~> 1.22)
73+
rubocop-shopify (2.4.0)
74+
rubocop (~> 1.24)
7575
rubocop-sorbet (0.6.5)
7676
rubocop (>= 0.90.0)
7777
rubocop-thread_safety (0.4.4)
@@ -93,7 +93,7 @@ DEPENDENCIES
9393
pry
9494
rake
9595
rspec
96-
rubocop (= 1.24.1)
96+
rubocop (= 1.25.0)
9797
rubocop-graphql
9898
rubocop-i18n
9999
rubocop-minitest

config/contents/naming/block_forwarding.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ This cop identifies places where `do_something(&block)` can be replaced
44
by `do_something(&)`.
55

66
It also supports the opposite style by alternative `explicit` option.
7+
You can specify the block variable name for auto-correction with `BlockForwardingName`.
8+
The default variable name is `block`. If the name is already in use, it will not be
9+
auto-corrected.
710

811
### Example: EnforcedStyle: anonymous (default)
912

config/contents/style/hash_syntax.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ This cop has `EnforcedShorthandSyntax` option.
1818
It can enforce either the use of the explicit hash value syntax or
1919
the use of Ruby 3.1's hash value shorthand syntax.
2020

21+
The supported styles are:
22+
23+
* always - forces use of the 3.1 syntax (e.g. {foo:})
24+
* never - forces use of explicit hash literal value
25+
* either - accepts both shorthand and explicit use of hash literal value
26+
2127
### Example: EnforcedStyle: ruby19 (default)
2228
# bad
2329
{:a => 2}
@@ -69,3 +75,11 @@ the use of Ruby 3.1's hash value shorthand syntax.
6975

7076
# good
7177
{foo: foo, bar: bar}
78+
79+
### Example: EnforcedShorthandSyntax: either
80+
81+
# good
82+
{foo: foo, bar: bar}
83+
84+
# good
85+
{foo:, bar:}

config/contents/style/if_with_boolean_literal_branches.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ will return a boolean value. Those methods can be allowed with `AllowedMethods`
3232
# good (but potentially an unsafe correction)
3333
foo.do_something?
3434

35-
### Example: AllowedMethods: ['nonzero?']
35+
### Example: AllowedMethods: ['nonzero?'] (default)
3636
# good
3737
num.nonzero? ? true : false

config/contents/style/method_call_with_args_parentheses.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ endless method definition introduced in Ruby 3.0. Parentheses are also
4242
allowed when forwarding arguments with the triple-dot syntax introduced
4343
in Ruby 2.7 as omitting them starts an endless range.
4444
And Ruby 3.1's hash omission syntax has a case that requires parentheses
45-
because the issue https://bugs.ruby-lang.org/issues/18396.
45+
because of the following issue: https://bugs.ruby-lang.org/issues/18396.
4646

4747
### Example: EnforcedStyle: require_parentheses (default)
4848

0 commit comments

Comments
 (0)