Skip to content

Commit 3c3466a

Browse files
authored
Merge pull request #736 from Shopify/dependabot/bundler/rubocop-a598e0f185
2 parents d615af5 + ccbb378 commit 3c3466a

File tree

4 files changed

+76
-7
lines changed

4 files changed

+76
-7
lines changed

Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@ GEM
2424
rainbow (3.1.1)
2525
rake (13.3.0)
2626
regexp_parser (2.10.0)
27-
rubocop (1.75.8)
27+
rubocop (1.76.0)
2828
json (~> 2.3)
2929
language_server-protocol (~> 3.17.0.2)
3030
lint_roller (~> 1.1.0)
3131
parallel (~> 1.10)
3232
parser (>= 3.3.0.2)
3333
rainbow (>= 2.2.2, < 4.0)
3434
regexp_parser (>= 2.9.3, < 3.0)
35-
rubocop-ast (>= 1.44.0, < 2.0)
35+
rubocop-ast (>= 1.45.0, < 2.0)
3636
ruby-progressbar (~> 1.7)
3737
unicode-display_width (>= 2.4.0, < 4.0)
38-
rubocop-ast (1.44.1)
38+
rubocop-ast (1.45.0)
3939
parser (>= 3.3.7.2)
4040
prism (~> 1.4)
4141
rubocop-minitest (0.38.1)

dev.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
up:
22
- ruby
33
- bundler
4+
5+
test: bundle exec rake

rubocop.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,10 @@ Lint/ShadowedArgument:
378378
Lint/ShadowedException:
379379
Enabled: false
380380

381+
<% if rubocop_version < "1.76" %>
381382
Lint/ShadowingOuterLocalVariable:
382383
Enabled: false
384+
<% end %>
383385

384386
Lint/SharedMutableDefault:
385387
Enabled: false
@@ -450,6 +452,11 @@ Lint/UselessAssignment:
450452
Lint/UselessConstantScoping:
451453
Enabled: false
452454

455+
<% if rubocop_version >= "1.76" %>
456+
Lint/UselessDefaultValueArgument:
457+
Enabled: true
458+
<% end %>
459+
453460
Lint/UselessDefined:
454461
Enabled: false
455462

@@ -462,6 +469,11 @@ Lint/UselessMethodDefinition:
462469
Lint/UselessNumericOperation:
463470
Enabled: false
464471

472+
<% if rubocop_version >= "1.76" %>
473+
Lint/UselessOr:
474+
Enabled: true
475+
<% end %>
476+
465477
Lint/UselessRescue:
466478
Enabled: false
467479

@@ -558,7 +570,16 @@ Naming/MethodName:
558570
Naming/MethodParameterName:
559571
Enabled: false
560572

573+
<% if rubocop_version >= "1.76" %>
574+
Naming/PredicateMethod:
575+
Enabled: false
576+
<% end %>
577+
578+
<% if rubocop_version >= "1.76" %>
579+
Naming/PredicatePrefix:
580+
<% else %>
561581
Naming/PredicateName:
582+
<% end %>
562583
Enabled: false
563584
NamePrefix:
564585
- is_
@@ -768,6 +789,11 @@ Style/EmptyLiteral:
768789
Style/EmptyMethod:
769790
Enabled: false
770791

792+
<% if rubocop_version >= "1.76" %>
793+
Style/EmptyStringInsideInterpolation:
794+
Enabled: false
795+
<% end %>
796+
771797
Style/Encoding:
772798
Enabled: false
773799

@@ -1112,6 +1138,11 @@ Style/RedundantArgument:
11121138
Style/RedundantArrayConstructor:
11131139
Enabled: false
11141140

1141+
<% if rubocop_version >= "1.76" %>
1142+
Style/RedundantArrayFlatten:
1143+
Enabled: true
1144+
<% end %>
1145+
11151146
Style/RedundantAssignment:
11161147
Enabled: false
11171148

test/fixtures/full_config.yml

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,7 +1387,7 @@ Lint/EmptyInterpolation:
13871387
Enabled: true
13881388
AutoCorrect: contextual
13891389
VersionAdded: '0.20'
1390-
VersionChanged: '1.61'
1390+
VersionChanged: '1.76'
13911391
Lint/EmptyWhen:
13921392
Description: Checks for `when` branches with empty bodies.
13931393
Enabled: false
@@ -1794,6 +1794,7 @@ Lint/ShadowingOuterLocalVariable:
17941794
or block local variables.
17951795
Enabled: false
17961796
VersionAdded: '0.9'
1797+
VersionChanged: '1.76'
17971798
Lint/SharedMutableDefault:
17981799
Description: Checks for mutable literals used as default arguments during Hash initialization.
17991800
StyleGuide: "#no-mutable-defaults"
@@ -1954,6 +1955,13 @@ Lint/UselessConstantScoping:
19541955
Description: Checks for useless constant scoping.
19551956
Enabled: false
19561957
VersionAdded: '1.72'
1958+
Lint/UselessDefaultValueArgument:
1959+
Description: Checks for usage of `fetch` or `Array.new` with default value argument
1960+
and block.
1961+
Enabled: true
1962+
VersionAdded: '1.76'
1963+
Safe: false
1964+
AllowedReceivers: []
19571965
Lint/UselessDefined:
19581966
Description: Checks for calls to `defined?` with strings and symbols. The result
19591967
of such a call will always be truthy.
@@ -1975,6 +1983,10 @@ Lint/UselessNumericOperation:
19751983
Description: Checks for useless numeric operations.
19761984
Enabled: false
19771985
VersionAdded: '1.66'
1986+
Lint/UselessOr:
1987+
Description: Checks for useless OR expressions.
1988+
Enabled: true
1989+
VersionAdded: '1.76'
19781990
Lint/UselessRescue:
19791991
Description: Checks for useless `rescue`s.
19801992
Enabled: false
@@ -2309,8 +2321,16 @@ Naming/MethodParameterName:
23092321
- pp
23102322
- to
23112323
ForbiddenNames: []
2312-
Naming/PredicateName:
2313-
Description: Check the names of predicate methods.
2324+
Naming/PredicateMethod:
2325+
Description: Checks that predicate methods end with `?` and non-predicate methods
2326+
do not.
2327+
Enabled: false
2328+
VersionAdded: '1.76'
2329+
Mode: conservative
2330+
AllowedMethods:
2331+
- call
2332+
Naming/PredicatePrefix:
2333+
Description: Predicate method names should not be prefixed and end with a `?`.
23142334
StyleGuide: "#bool-methods-qmark"
23152335
Enabled: false
23162336
VersionAdded: '0.50'
@@ -2943,6 +2963,15 @@ Style/EmptyMethod:
29432963
SupportedStyles:
29442964
- compact
29452965
- expanded
2966+
Style/EmptyStringInsideInterpolation:
2967+
Description: Checks for empty strings being assigned inside string interpolation.
2968+
StyleGuide: "#empty-strings-in-interpolation"
2969+
Enabled: false
2970+
EnforcedStyle: trailing_conditional
2971+
SupportedStyles:
2972+
- trailing_conditional
2973+
- ternary
2974+
VersionAdded: '1.76'
29462975
Style/Encoding:
29472976
Description: Use UTF-8 as the source file encoding.
29482977
StyleGuide: "#utf-8"
@@ -3331,12 +3360,14 @@ Style/ItBlockParameter:
33313360
Description: Checks for blocks with one argument where `it` block parameter can
33323361
be used.
33333362
Enabled: false
3334-
EnforcedStyle: only_numbered_parameters
3363+
EnforcedStyle: allow_single_line
33353364
SupportedStyles:
3365+
- allow_single_line
33363366
- only_numbered_parameters
33373367
- always
33383368
- disallow
33393369
VersionAdded: '1.75'
3370+
VersionChanged: '1.76'
33403371
Style/KeywordArgumentsMerging:
33413372
Description: When passing an existing hash as keyword arguments, provide additional
33423373
arguments directly rather than using `merge`.
@@ -3908,6 +3939,11 @@ Style/RedundantArrayConstructor:
39083939
Description: Checks for the instantiation of array using redundant `Array` constructor.
39093940
Enabled: false
39103941
VersionAdded: '1.52'
3942+
Style/RedundantArrayFlatten:
3943+
Description: Checks for redundant calls of `Array#flatten`.
3944+
Enabled: true
3945+
Safe: false
3946+
VersionAdded: '1.76'
39113947
Style/RedundantAssignment:
39123948
Description: Checks for redundant assignment before returning.
39133949
Enabled: false

0 commit comments

Comments
 (0)