Skip to content

Commit 1cb5ba4

Browse files
committed
Upgrade to rubocop 1.91.0
Fixes #810.
1 parent 41e8f5e commit 1cb5ba4

3 files changed

Lines changed: 47 additions & 17 deletions

File tree

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ GEM
8080
minitest (6.0.6)
8181
drb (~> 2.0)
8282
prism (~> 1.5)
83-
parallel (2.1.0)
83+
parallel (2.2.0)
8484
parser (3.3.12.0)
8585
ast (~> 2.4.1)
8686
racc
@@ -97,7 +97,7 @@ GEM
9797
regexp_parser (2.12.0)
9898
rexml (3.4.4)
9999
rouge (4.7.0)
100-
rubocop (1.90.0)
100+
rubocop (1.91.0)
101101
json (>= 2.3)
102102
language_server-protocol (~> 3.17.0.2)
103103
lint_roller (~> 1.1.0)

rubocop.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,11 @@ Lint/AmbiguousRange:
185185
Lint/AmbiguousRegexpLiteral:
186186
Enabled: false
187187

188+
<% if rubocop_version >= "1.91.0" %>
189+
Lint/ArgumentMismatch:
190+
Enabled: false
191+
<% end %>
192+
188193
Lint/ArrayLiteralInRegexp:
189194
Enabled: false
190195

@@ -203,9 +208,6 @@ Lint/ConstantOverwrittenInRescue:
203208
Lint/ConstantReassignment:
204209
Enabled: true
205210

206-
Lint/CopDirectiveSyntax:
207-
Enabled: true
208-
209211
Lint/DataDefineOverride:
210212
Enabled: true
211213

@@ -290,6 +292,11 @@ Lint/LiteralAssignmentInCondition:
290292
Lint/Loop:
291293
Enabled: false
292294

295+
<% if rubocop_version >= "1.91.0" %>
296+
Lint/MisplacedMagicComment:
297+
Enabled: false
298+
<% end %>
299+
293300
Lint/MissingSuper:
294301
Enabled: false
295302

@@ -398,6 +405,11 @@ Lint/SharedMutableDefault:
398405
Lint/StructNewOverride:
399406
Enabled: false
400407

408+
<% if rubocop_version >= "1.91.0" %>
409+
Lint/SuperArgumentMismatch:
410+
Enabled: false
411+
<% end %>
412+
401413
Lint/SuppressedException:
402414
Enabled: false
403415

@@ -703,14 +715,21 @@ Style/Dir:
703715
Style/DirEmpty:
704716
Enabled: false
705717

718+
<% if rubocop_version >= "1.91.0" %>
719+
Style/DirectiveScope:
720+
Enabled: false
721+
<% end %>
722+
706723
Style/DocumentDynamicEvalDefinition:
707724
Enabled: false
708725

709726
Style/Documentation:
710727
Enabled: false
711728

729+
<% if rubocop_version < "1.91.0" %>
712730
Style/DoubleCopDisableDirective:
713731
Enabled: false
732+
<% end %>
714733

715734
Style/DoubleNegation:
716735
Enabled: false
@@ -1305,6 +1324,11 @@ Style/TallyMethod:
13051324
Style/TernaryParentheses:
13061325
Enabled: false
13071326

1327+
<% if rubocop_version >= "1.91.0" %>
1328+
Style/TimeNow:
1329+
Enabled: false
1330+
<% end %>
1331+
13081332
Style/TrailingCommaInArguments:
13091333
Enabled: false
13101334
EnforcedStyleForMultiline: comma

test/fixtures/full_config.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ AllCops:
5757
- "/vendor/**/*"
5858
- "/.git/**/*"
5959
DefaultFormatter: progress
60+
FailLevel: refactor
6061
DisplayCopNames: true
6162
DisplayStyleGuide: false
6263
StyleGuideBaseURL: https://shopify.github.io/ruby-style-guide/
@@ -435,7 +436,7 @@ Layout/EmptyLineAfterMagicComment:
435436
StyleGuide: "#separate-magic-comments-from-code"
436437
Enabled: true
437438
VersionAdded: '0.49'
438-
VersionChanged: '1.90'
439+
VersionChanged: '1.91'
439440
NumberOfEmptyLines: 1
440441
Layout/EmptyLineAfterMultilineCondition:
441442
Description: Enforces empty line after multiline condition.
@@ -1156,7 +1157,7 @@ Lint/AmbiguousRegexpLiteral:
11561157
Lint/ArgumentMismatch:
11571158
Description: Checks for calls that pass the wrong number of positional arguments
11581159
to a method, using the project index.
1159-
Enabled: pending
1160+
Enabled: false
11601161
VersionAdded: '1.90'
11611162
Lint/ArrayLiteralInRegexp:
11621163
Description: Checks for an array literal interpolated inside a regexp.
@@ -1221,7 +1222,7 @@ Lint/CopDirectiveSyntax:
12211222
Description: Checks that `# rubocop:` directives are strictly formatted.
12221223
Enabled: true
12231224
VersionAdded: '1.72'
1224-
VersionChanged: '1.90'
1225+
VersionChanged: '1.91'
12251226
Lint/DataDefineOverride:
12261227
Description: Disallow overriding the `Data` built-in methods via `Data.define`.
12271228
Enabled: true
@@ -1554,6 +1555,12 @@ Lint/Loop:
15541555
VersionAdded: '0.9'
15551556
VersionChanged: '1.3'
15561557
Safe: false
1558+
Lint/MisplacedMagicComment:
1559+
Description: Checks for magic comments placed where Ruby silently ignores them.
1560+
StyleGuide: "#magic-comments-first"
1561+
Enabled: false
1562+
SafeAutoCorrect: false
1563+
VersionAdded: '1.91'
15571564
Lint/MissingCopEnableDirective:
15581565
Description: Checks for a `# rubocop:enable` after `# rubocop:disable`.
15591566
Enabled: true
@@ -1658,7 +1665,7 @@ Lint/OrderedMagicComments:
16581665
Enabled: false
16591666
SafeAutoCorrect: false
16601667
VersionAdded: '0.53'
1661-
VersionChanged: '1.37'
1668+
VersionChanged: '1.91'
16621669
Lint/OutOfRangeRegexpRef:
16631670
Description: Checks for out of range reference for Regexp because it always returns
16641671
nil.
@@ -1879,7 +1886,7 @@ Lint/StructNewOverride:
18791886
Lint/SuperArgumentMismatch:
18801887
Description: Checks for `super` calls that pass the wrong number of positional arguments
18811888
to the overridden implementation, using the project index.
1882-
Enabled: pending
1889+
Enabled: false
18831890
VersionAdded: '1.90'
18841891
Lint/SuppressedException:
18851892
Description: Don't suppress exceptions.
@@ -2984,17 +2991,19 @@ Style/DirEmpty:
29842991
Style/DirectiveScope:
29852992
Description: Checks for directive scopes that can be expressed with the tighter
29862993
`disable-next` form.
2987-
Enabled: pending
2994+
Enabled: false
29882995
SafeAutoCorrect: false
29892996
VersionAdded: '1.90'
2997+
VersionChanged: '1.91'
29902998
Style/DisableCopsWithinSourceCodeDirective:
29912999
Description: Forbids disabling/enabling cops within source code.
29923000
Enabled: false
29933001
VersionAdded: '0.82'
29943002
VersionChanged: '1.90'
29953003
AllowedCops: []
29963004
DisallowedCops: []
2997-
AllowTrailingComment: false
3005+
AllowWithReason: false
3006+
AllowedDirectives: []
29983007
Style/DocumentDynamicEvalDefinition:
29993008
Description: When using `class_eval` (or other `eval`) with string interpolation,
30003009
add a comment block showing its appearance if interpolated.
@@ -3020,10 +3029,6 @@ Style/DocumentationMethod:
30203029
- "/spec/**/*"
30213030
- "/test/**/*"
30223031
RequireForNonPublicMethods: false
3023-
Style/DoubleCopDisableDirective:
3024-
Description: Checks for double rubocop:disable comments on a single line.
3025-
Enabled: false
3026-
VersionAdded: '0.73'
30273032
Style/DoubleNegation:
30283033
Description: Checks for uses of double negation (!!).
30293034
StyleGuide: "#no-bang-bang"
@@ -3577,6 +3582,7 @@ Style/MagicCommentFormat:
35773582
Description: Use a consistent style for magic comments.
35783583
Enabled: true
35793584
VersionAdded: '1.35'
3585+
VersionChanged: '1.91'
35803586
EnforcedStyle: snake_case
35813587
SupportedStyles:
35823588
- snake_case
@@ -4682,7 +4688,7 @@ Style/TimeNow:
46824688
Description: Prefer `Time.now` over `Time.new` when retrieving the current system
46834689
time.
46844690
StyleGuide: "#time-now"
4685-
Enabled: pending
4691+
Enabled: false
46864692
VersionAdded: '1.90'
46874693
Style/TopLevelMethodDefinition:
46884694
Description: Looks for top-level method definitions.

0 commit comments

Comments
 (0)