makandra-rubocop 12.1.0 → 14.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0255ba88ffcf79e1a7383278a6b7eddd7611f89b6cde0de5097162bf3a28b487
4
- data.tar.gz: 462fe3bfbcb8167c93bd455069d964b11e7fe33e9886d2ff40b78dccd823b1c1
3
+ metadata.gz: 6c1e4e5b2593c40eea8209583193b92bbe7778e37ad91d23e70af1f6a93d6386
4
+ data.tar.gz: 9039e8208be0982c449920119137765ad27034024af0da4620d332cffcec2092
5
5
  SHA512:
6
- metadata.gz: c6f0ea4c886d783d30a04fad764ebb55528b1a1e44c1499b2df4a312b50ef1430dbea241dc087c9ef037087748bac10906e3a7cdbe089b3c2c590765f4b8d9d5
7
- data.tar.gz: 27b9a1a5ccc212a645714f1631d8f62f957de7d955aa6a8c9e46fd2599335488fbfb16e7ae9c955f4714ff3ab4051bc5e03293bd696a3f15b14b4b5402dd3b02
6
+ metadata.gz: 4b82c14adc78cf783fd05f7caf1215867a964f4287f693c4d7da6cd378f5e9f2a0961b1661ee21b1831d55effe7a9ffaf9feae1f3eed9b2915298e6dc86ac837
7
+ data.tar.gz: bca28cf23c01e624792735b15c89ac076930fa5dd2cbcc2a47be7ea6e9fbc084f66883a6a47bff4d54ffe67f81e43d94904a8a12ed0ee12fe2482b9ce069f064
data/CHANGELOG.md CHANGED
@@ -9,6 +9,29 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
9
9
  ### Compatible changes
10
10
 
11
11
 
12
+ ## 14.0.0 - 2024-08-07
13
+
14
+ ## Compatible changes
15
+
16
+ - Disable `Capybara/ClickLinkOrButtonStyle` (#49)
17
+
18
+ ## Breaking changes
19
+
20
+ - Upgrade to `rubocop-rspec` 3.0.3 (was 2.25.0)
21
+ - Upgrade to `rubocop` 1.61 (was 1.60)
22
+
23
+
24
+ ## 13.0.0 - 2024-05-27
25
+
26
+ ### Compatible changes
27
+
28
+ ### Breaking changes
29
+
30
+ - Upgrade to `rubocop-rspec` 2.25.0 (was 2.13.2)
31
+ - Disable nested cops introduced by dependencies (e.g. Rspec/Capybara).
32
+ Since the config for the respective gem should be considered the single source of truth
33
+
34
+
12
35
  ## 12.1.0 - 2024-01-07
13
36
 
14
37
  ### Compatible changes
data/Gemfile.lock CHANGED
@@ -1,12 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- makandra-rubocop (12.1.0)
5
- rubocop (~> 1.60.0)
4
+ makandra-rubocop (14.0.0)
5
+ rubocop (~> 1.61)
6
6
  rubocop-capybara (~> 2.20.0)
7
7
  rubocop-factory_bot (~> 2.25.1)
8
8
  rubocop-rails (~> 2.23.1)
9
- rubocop-rspec (~> 2.13.2)
9
+ rubocop-rspec (~> 3.0.3)
10
10
 
11
11
  GEM
12
12
  remote: https://rubygems.org/
@@ -30,33 +30,34 @@ GEM
30
30
  ruby2_keywords
31
31
  i18n (1.14.1)
32
32
  concurrent-ruby (~> 1.0)
33
- json (2.7.1)
33
+ json (2.7.2)
34
34
  language_server-protocol (3.17.0.3)
35
35
  minitest (5.21.2)
36
36
  mutex_m (0.2.0)
37
- parallel (1.24.0)
38
- parser (3.3.0.5)
37
+ parallel (1.25.1)
38
+ parser (3.3.4.0)
39
39
  ast (~> 2.4.1)
40
40
  racc
41
- racc (1.7.3)
41
+ racc (1.8.0)
42
42
  rack (3.0.9)
43
43
  rainbow (3.1.1)
44
44
  rake (12.3.2)
45
- regexp_parser (2.9.0)
46
- rexml (3.2.6)
47
- rubocop (1.60.2)
45
+ regexp_parser (2.9.2)
46
+ rexml (3.3.2)
47
+ strscan
48
+ rubocop (1.65.0)
48
49
  json (~> 2.3)
49
50
  language_server-protocol (>= 3.17.0)
50
51
  parallel (~> 1.10)
51
52
  parser (>= 3.3.0.2)
52
53
  rainbow (>= 2.2.2, < 4.0)
53
- regexp_parser (>= 1.8, < 3.0)
54
+ regexp_parser (>= 2.4, < 3.0)
54
55
  rexml (>= 3.2.5, < 4.0)
55
- rubocop-ast (>= 1.30.0, < 2.0)
56
+ rubocop-ast (>= 1.31.1, < 2.0)
56
57
  ruby-progressbar (~> 1.7)
57
58
  unicode-display_width (>= 2.4.0, < 3.0)
58
- rubocop-ast (1.30.0)
59
- parser (>= 3.2.1.0)
59
+ rubocop-ast (1.31.3)
60
+ parser (>= 3.3.1.0)
60
61
  rubocop-capybara (2.20.0)
61
62
  rubocop (~> 1.41)
62
63
  rubocop-factory_bot (2.25.1)
@@ -66,10 +67,11 @@ GEM
66
67
  rack (>= 1.1)
67
68
  rubocop (>= 1.33.0, < 2.0)
68
69
  rubocop-ast (>= 1.30.0, < 2.0)
69
- rubocop-rspec (2.13.2)
70
- rubocop (~> 1.33)
70
+ rubocop-rspec (3.0.3)
71
+ rubocop (~> 1.61)
71
72
  ruby-progressbar (1.13.0)
72
73
  ruby2_keywords (0.0.5)
74
+ strscan (3.1.0)
73
75
  tzinfo (2.0.6)
74
76
  concurrent-ruby (~> 1.0)
75
77
  unicode-display_width (2.5.0)
data/config/default.yml CHANGED
@@ -3710,7 +3710,6 @@ Style/EmptyElse:
3710
3710
  Description: 'Avoid empty else-clauses.'
3711
3711
  Enabled: true
3712
3712
  VersionAdded: '0.28'
3713
- VersionChanged: '0.32'
3714
3713
  EnforcedStyle: empty
3715
3714
  # empty - warn only on empty `else`
3716
3715
  # nil - warn on `else` with nil in it
@@ -17,7 +17,7 @@ Capybara:
17
17
 
18
18
  Capybara/ClickLinkOrButtonStyle:
19
19
  Description: Checks for methods of button or link clicks.
20
- Enabled: pending
20
+ Enabled: false # https://github.com/makandra/makandra-rubocop/issues/49
21
21
  VersionAdded: '2.19'
22
22
  VersionChanged: '2.20'
23
23
  EnforcedStyle: link_or_button
@@ -82,7 +82,7 @@ Capybara/VisibilityMatcher:
82
82
  Reference: https://www.rubydoc.info/gems/rubocop-capybara/RuboCop/Cop/Capybara/VisibilityMatcher
83
83
 
84
84
  Capybara/RSpec:
85
- Enabled: true
85
+ Enabled: false # disable nested cops, as we load rubocop-rspec separately
86
86
  Include: *1
87
87
 
88
88
  Capybara/RSpec/HaveSelector:
data/config/ext/rspec.yml CHANGED
@@ -18,8 +18,6 @@ RSpec:
18
18
  - Expectations
19
19
  - Helpers
20
20
  - Hooks
21
- - HookScopes
22
- - Runners
23
21
  - Subjects
24
22
  ExampleGroups:
25
23
  inherit_mode:
@@ -82,12 +80,6 @@ RSpec:
82
80
  - prepend_after
83
81
  - after
84
82
  - append_after
85
- HookScopes:
86
- - each
87
- - example
88
- - context
89
- - all
90
- - suite
91
83
  Includes:
92
84
  inherit_mode:
93
85
  merge:
@@ -99,10 +91,6 @@ RSpec:
99
91
  - include_examples
100
92
  Context:
101
93
  - include_context
102
- Runners:
103
- - to
104
- - to_not
105
- - not_to
106
94
  SharedGroups:
107
95
  inherit_mode:
108
96
  merge:
@@ -157,16 +145,27 @@ RSpec/Be:
157
145
  StyleGuide: https://rspec.rubystyle.guide/#be-matcher
158
146
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Be
159
147
 
148
+ RSpec/BeEmpty:
149
+ Description: Prefer using `be_empty` when checking for an empty array.
150
+ Enabled: true
151
+ VersionAdded: '2.20'
152
+ VersionChanged: '2.31'
153
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeEmpty
154
+
160
155
  RSpec/BeEq:
161
156
  Description: Check for expectations where `be(...)` can replace `eq(...)`.
162
157
  Enabled: false # Leads to a large diff and the benefit is not that large
158
+ Safe: false
163
159
  VersionAdded: 2.9.0
160
+ VersionChanged: '2.16'
164
161
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeEq
165
162
 
166
163
  RSpec/BeEql:
167
164
  Description: Check for expectations where `be(...)` can replace `eql(...)`.
168
165
  Enabled: true
166
+ Safe: false
169
167
  VersionAdded: '1.7'
168
+ VersionChanged: '2.16'
170
169
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeEql
171
170
 
172
171
  RSpec/BeNil:
@@ -181,13 +180,14 @@ RSpec/BeNil:
181
180
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeNil
182
181
 
183
182
  RSpec/BeforeAfterAll:
184
- Description: Check that before/after(:all) isn't being used.
183
+ Description: Check that before/after(:all/:context) isn't being used.
185
184
  Enabled: true
186
185
  Exclude:
187
- - spec/spec_helper.rb
188
- - spec/rails_helper.rb
189
- - spec/support/**/*.rb
186
+ - "**/spec/spec_helper.rb"
187
+ - "**/spec/rails_helper.rb"
188
+ - "**/spec/support/**/*.rb"
190
189
  VersionAdded: '1.12'
190
+ VersionChanged: '2.23'
191
191
  StyleGuide: https://rspec.rubystyle.guide/#avoid-hooks-with-context-scope
192
192
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeforeAfterAll
193
193
 
@@ -195,7 +195,7 @@ RSpec/ChangeByZero:
195
195
  Description: Prefer negated matchers over `to change.by(0)`.
196
196
  Enabled: true
197
197
  VersionAdded: '2.11'
198
- VersionChanged: '2.13'
198
+ VersionChanged: '2.14'
199
199
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ChangeByZero
200
200
  NegatedMatcher: ~
201
201
 
@@ -210,6 +210,12 @@ RSpec/ClassCheck:
210
210
  - be_kind_of
211
211
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ClassCheck
212
212
 
213
+ RSpec/ContainExactly:
214
+ Description: Checks where `contain_exactly` is used.
215
+ Enabled: true
216
+ VersionAdded: '2.19'
217
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContainExactly
218
+
213
219
  RSpec/ContextMethod:
214
220
  Description: "`context` should not be used for specifying methods."
215
221
  Enabled: true
@@ -273,9 +279,10 @@ RSpec/DescribedClass:
273
279
  SupportedStyles:
274
280
  - described_class
275
281
  - explicit
282
+ OnlyStaticConstants: false
276
283
  SafeAutoCorrect: false
277
284
  VersionAdded: '1.0'
278
- VersionChanged: '1.11'
285
+ VersionChanged: '2.27'
279
286
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribedClass
280
287
 
281
288
  RSpec/DescribedClassModuleWrapping:
@@ -291,18 +298,25 @@ RSpec/Dialect:
291
298
  VersionAdded: '1.33'
292
299
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Dialect
293
300
 
301
+ RSpec/DuplicatedMetadata:
302
+ Description: Avoid duplicated metadata.
303
+ Enabled: true
304
+ VersionAdded: '2.16'
305
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DuplicatedMetadata
306
+
294
307
  RSpec/EmptyExampleGroup:
295
308
  Description: Checks if an example group does not include any tests.
296
309
  Enabled: true
297
310
  SafeAutoCorrect: false
298
311
  VersionAdded: '1.7'
299
- VersionChanged: '2.13'
312
+ VersionChanged: '2.31'
300
313
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyExampleGroup
301
314
 
302
315
  RSpec/EmptyHook:
303
316
  Description: Checks for empty before and after hooks.
304
317
  Enabled: true
305
318
  VersionAdded: '1.39'
319
+ VersionChanged: '2.31'
306
320
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyHook
307
321
 
308
322
  RSpec/EmptyLineAfterExample:
@@ -343,6 +357,25 @@ RSpec/EmptyLineAfterSubject:
343
357
  StyleGuide: https://rspec.rubystyle.guide/#empty-line-after-let
344
358
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterSubject
345
359
 
360
+ RSpec/EmptyMetadata:
361
+ Description: Avoid empty metadata hash.
362
+ Enabled: true
363
+ VersionAdded: '2.24'
364
+ VersionChanged: '2.31'
365
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyMetadata
366
+
367
+ RSpec/EmptyOutput:
368
+ Description: Check that the `output` matcher is not called with an empty string.
369
+ Enabled: true
370
+ VersionAdded: '2.29'
371
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyOutput
372
+
373
+ RSpec/Eq:
374
+ Description: Use `eq` instead of `be ==` to compare objects.
375
+ Enabled: true
376
+ VersionAdded: '2.24'
377
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Eq
378
+
346
379
  RSpec/ExampleLength:
347
380
  Description: Checks for long examples.
348
381
  Enabled: false # We do not want to have such limitation
@@ -363,12 +396,6 @@ RSpec/ExampleWithoutDescription:
363
396
  VersionAdded: '1.22'
364
397
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWithoutDescription
365
398
 
366
- RSpec/ExcessiveDocstringSpacing:
367
- Description: Checks for excessive whitespace in example descriptions.
368
- Enabled: true
369
- VersionAdded: '2.5'
370
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExcessiveDocstringSpacing
371
-
372
399
  RSpec/ExampleWording:
373
400
  Description: Checks for common mistakes in example descriptions.
374
401
  Enabled: true
@@ -378,17 +405,26 @@ RSpec/ExampleWording:
378
405
  have: has
379
406
  HAVE: HAS
380
407
  IgnoredWords: []
408
+ DisallowedExamples:
409
+ - works
381
410
  VersionAdded: '1.0'
382
- VersionChanged: '1.2'
411
+ VersionChanged: '2.13'
383
412
  StyleGuide: https://rspec.rubystyle.guide/#should-in-example-docstrings
384
413
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWording
385
414
 
415
+ RSpec/ExcessiveDocstringSpacing:
416
+ Description: Checks for excessive whitespace in example descriptions.
417
+ Enabled: true
418
+ VersionAdded: '2.5'
419
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExcessiveDocstringSpacing
420
+
386
421
  RSpec/ExpectActual:
387
422
  Description: Checks for `expect(...)` calls containing literal values.
388
423
  Enabled: true
389
424
  Exclude:
390
- - spec/routing/**/*
425
+ - "**/spec/routing/**/*"
391
426
  VersionAdded: '1.7'
427
+ VersionChanged: '2.23'
392
428
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectActual
393
429
 
394
430
  RSpec/ExpectChange:
@@ -409,32 +445,23 @@ RSpec/ExpectInHook:
409
445
  VersionAdded: '1.16'
410
446
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectInHook
411
447
 
448
+ RSpec/ExpectInLet:
449
+ Description: Do not use `expect` in let.
450
+ Enabled: true
451
+ VersionAdded: '2.30'
452
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectInLet
453
+
412
454
  RSpec/ExpectOutput:
413
455
  Description: Checks for opportunities to use `expect { ... }.to output`.
414
456
  Enabled: true
415
457
  VersionAdded: '1.10'
416
458
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectOutput
417
459
 
418
- RSpec/FilePath:
419
- Description: Checks that spec file paths are consistent and well-formed.
420
- Enabled: true
421
- Include:
422
- - "**/*_spec*rb*"
423
- - "**/spec/**/*"
424
- CustomTransform:
425
- RuboCop: rubocop
426
- RSpec: rspec
427
- IgnoreMethods: false
428
- SpecSuffixOnly: false
429
- VersionAdded: '1.2'
430
- VersionChanged: '1.40'
431
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FilePath
432
-
433
460
  RSpec/Focus:
434
461
  Description: Checks if examples are focused.
435
462
  Enabled: true
436
463
  VersionAdded: '1.5'
437
- VersionChanged: '2.1'
464
+ VersionChanged: '2.31'
438
465
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Focus
439
466
 
440
467
  RSpec/HookArgument:
@@ -453,6 +480,7 @@ RSpec/HooksBeforeExamples:
453
480
  Description: Checks for before/around/after hooks that come after an example.
454
481
  Enabled: true
455
482
  VersionAdded: '1.29'
483
+ VersionChanged: '2.31'
456
484
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HooksBeforeExamples
457
485
 
458
486
  RSpec/IdenticalEqualityAssertion:
@@ -487,10 +515,21 @@ RSpec/ImplicitSubject:
487
515
  - single_line_only
488
516
  - single_statement_only
489
517
  - disallow
518
+ - require_implicit
490
519
  VersionAdded: '1.29'
491
- VersionChanged: '1.30'
520
+ VersionChanged: '2.13'
492
521
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitSubject
493
522
 
523
+ RSpec/IndexedLet:
524
+ Description: Do not set up test data using indexes (e.g., `item_1`, `item_2`).
525
+ Enabled: true
526
+ VersionAdded: '2.20'
527
+ VersionChanged: '2.23'
528
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IndexedLet
529
+ Max: 1
530
+ AllowedIdentifiers: []
531
+ AllowedPatterns: []
532
+
494
533
  RSpec/InstanceSpy:
495
534
  Description: Checks for `instance_double` used with `have_received`.
496
535
  Enabled: true
@@ -506,6 +545,13 @@ RSpec/InstanceVariable:
506
545
  StyleGuide: https://rspec.rubystyle.guide/#instance-variables
507
546
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable
508
547
 
548
+ RSpec/IsExpectedSpecify:
549
+ Description: Check for `specify` with `is_expected` and one-liner expectations.
550
+ Enabled: true
551
+ VersionAdded: '2.27'
552
+ StyleGuide: https://rspec.rubystyle.guide/#it-and-specify
553
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IsExpectedSpecify
554
+
509
555
  RSpec/ItBehavesLike:
510
556
  Description: Checks that only one `it_behaves_like` style is used.
511
557
  Enabled: true
@@ -541,7 +587,7 @@ RSpec/LetBeforeExamples:
541
587
  Description: Checks for `let` definitions that come after an example.
542
588
  Enabled: true
543
589
  VersionAdded: '1.16'
544
- VersionChanged: '1.22'
590
+ VersionChanged: '2.31'
545
591
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LetBeforeExamples
546
592
 
547
593
  RSpec/LetSetup:
@@ -550,6 +596,12 @@ RSpec/LetSetup:
550
596
  VersionAdded: '1.7'
551
597
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LetSetup
552
598
 
599
+ RSpec/MatchArray:
600
+ Description: Checks where `match_array` is used.
601
+ Enabled: true
602
+ VersionAdded: '2.19'
603
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MatchArray
604
+
553
605
  RSpec/MessageChain:
554
606
  Description: Check that chains of messages are not being stubbed.
555
607
  Enabled: true
@@ -577,12 +629,28 @@ RSpec/MessageSpies:
577
629
  VersionAdded: '1.9'
578
630
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageSpies
579
631
 
632
+ RSpec/MetadataStyle:
633
+ Description: Use consistent metadata style.
634
+ Enabled: true
635
+ EnforcedStyle: symbol
636
+ SupportedStyles:
637
+ - hash
638
+ - symbol
639
+ VersionAdded: '2.24'
640
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MetadataStyle
641
+
580
642
  RSpec/MissingExampleGroupArgument:
581
643
  Description: Checks that the first argument to an example group is not empty.
582
644
  Enabled: true
583
645
  VersionAdded: '1.28'
584
646
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MissingExampleGroupArgument
585
647
 
648
+ RSpec/MissingExpectationTargetMethod:
649
+ Description: Checks if `.to`, `not_to` or `to_not` are used.
650
+ Enabled: true
651
+ VersionAdded: '3.0'
652
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MissingExpectationTargetMethod
653
+
586
654
  RSpec/MultipleDescribes:
587
655
  Description: Checks for multiple top-level example groups.
588
656
  Enabled: true
@@ -616,8 +684,13 @@ RSpec/MultipleSubjects:
616
684
  RSpec/NamedSubject:
617
685
  Description: Checks for explicitly referenced test subjects.
618
686
  Enabled: false # https://github.com/makandra/makandra-rubocop/issues/23 - good default but not enforced
687
+ EnforcedStyle: always
688
+ SupportedStyles:
689
+ - always
690
+ - named_only
619
691
  IgnoreSharedExamples: true
620
692
  VersionAdded: 1.5.3
693
+ VersionChanged: '2.15'
621
694
  StyleGuide: https://rspec.rubystyle.guide/#use-subject
622
695
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NamedSubject
623
696
 
@@ -635,7 +708,11 @@ RSpec/NoExpectationExample:
635
708
  Enabled: false # requires some config for custom expectations
636
709
  Safe: false
637
710
  VersionAdded: '2.13'
711
+ VersionChanged: '2.14'
638
712
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NoExpectationExample
713
+ AllowedPatterns:
714
+ - "^expect_"
715
+ - "^assert_"
639
716
 
640
717
  RSpec/NotToNot:
641
718
  Description: Checks for consistent method usage for negating expectations.
@@ -659,6 +736,12 @@ RSpec/Pending:
659
736
  VersionAdded: '1.25'
660
737
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Pending
661
738
 
739
+ RSpec/PendingWithoutReason:
740
+ Description: Checks for pending or skipped examples without reason.
741
+ Enabled: true
742
+ VersionAdded: '2.16'
743
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/PendingWithoutReason
744
+
662
745
  RSpec/PredicateMatcher:
663
746
  Description: Prefer using predicate matcher over using predicate method directly.
664
747
  Enabled: true # Maybe we need to remove this in the future
@@ -679,12 +762,37 @@ RSpec/ReceiveCounts:
679
762
  VersionAdded: '1.26'
680
763
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveCounts
681
764
 
765
+ RSpec/ReceiveMessages:
766
+ Description: Checks for multiple messages stubbed on the same object.
767
+ Enabled: false
768
+ SafeAutoCorrect: false
769
+ VersionAdded: '2.23'
770
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveMessages
771
+
682
772
  RSpec/ReceiveNever:
683
773
  Description: Prefer `not_to receive(...)` over `receive(...).never`.
684
774
  Enabled: true
685
775
  VersionAdded: '1.28'
686
776
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveNever
687
777
 
778
+ RSpec/RedundantAround:
779
+ Description: Remove redundant `around` hook.
780
+ Enabled: true
781
+ VersionAdded: '2.19'
782
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RedundantAround
783
+
784
+ RSpec/RedundantPredicateMatcher:
785
+ Description: Checks for redundant predicate matcher.
786
+ Enabled: true
787
+ VersionAdded: '2.26'
788
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RedundantPredicateMatcher
789
+
790
+ RSpec/RemoveConst:
791
+ Description: Checks that `remove_const` is not used in specs.
792
+ Enabled: true
793
+ VersionAdded: '2.26'
794
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RemoveConst
795
+
688
796
  RSpec/RepeatedDescription:
689
797
  Description: Check for repeated description strings in example groups.
690
798
  Enabled: true
@@ -715,6 +823,12 @@ RSpec/RepeatedIncludeExample:
715
823
  VersionAdded: '1.44'
716
824
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedIncludeExample
717
825
 
826
+ RSpec/RepeatedSubjectCall:
827
+ Description: Checks for repeated calls to subject missing that it is memoized.
828
+ Enabled: true
829
+ VersionAdded: '2.27'
830
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedSubjectCall
831
+
718
832
  RSpec/ReturnFromStub:
719
833
  Description: Checks for consistent style of stub's return setting.
720
834
  Enabled: true
@@ -730,13 +844,14 @@ RSpec/ScatteredLet:
730
844
  Description: Checks for let scattered across the example group.
731
845
  Enabled: true
732
846
  VersionAdded: '1.14'
733
- VersionChanged: '1.39'
847
+ VersionChanged: '2.31'
734
848
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredLet
735
849
 
736
850
  RSpec/ScatteredSetup:
737
851
  Description: Checks for setup scattered across multiple hooks in an example group.
738
852
  Enabled: true
739
853
  VersionAdded: '1.10'
854
+ VersionChanged: '2.31'
740
855
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredSetup
741
856
 
742
857
  RSpec/SharedContext:
@@ -746,9 +861,14 @@ RSpec/SharedContext:
746
861
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SharedContext
747
862
 
748
863
  RSpec/SharedExamples:
749
- Description: Enforces use of string to titleize shared examples.
864
+ Description: Checks for consistent style for shared example names.
750
865
  Enabled: true
866
+ EnforcedStyle: string
867
+ SupportedStyles:
868
+ - string
869
+ - symbol
751
870
  VersionAdded: '1.25'
871
+ VersionChanged: '2.26'
752
872
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SharedExamples
753
873
 
754
874
  RSpec/SingleArgumentMessageChain:
@@ -758,6 +878,43 @@ RSpec/SingleArgumentMessageChain:
758
878
  VersionChanged: '1.10'
759
879
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SingleArgumentMessageChain
760
880
 
881
+ RSpec/SkipBlockInsideExample:
882
+ Description: Checks for passing a block to `skip` within examples.
883
+ Enabled: true
884
+ VersionAdded: '2.19'
885
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SkipBlockInsideExample
886
+
887
+ RSpec/SortMetadata:
888
+ Description: Sort RSpec metadata alphabetically.
889
+ Enabled: false
890
+ VersionAdded: '2.14'
891
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SortMetadata
892
+
893
+ RSpec/SpecFilePathFormat:
894
+ Description: Checks that spec file paths are consistent and well-formed.
895
+ Enabled: true
896
+ Include:
897
+ - "**/*_spec.rb"
898
+ Exclude:
899
+ - "**/spec/routing/**/*"
900
+ CustomTransform:
901
+ RuboCop: rubocop
902
+ RSpec: rspec
903
+ IgnoreMethods: false
904
+ IgnoreMetadata:
905
+ type: routing
906
+ VersionAdded: '2.24'
907
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SpecFilePathFormat
908
+
909
+ RSpec/SpecFilePathSuffix:
910
+ Description: Checks that spec file paths suffix are consistent and well-formed.
911
+ Enabled: true
912
+ VersionAdded: '2.24'
913
+ Include:
914
+ - "**/*_spec*rb*"
915
+ - "**/spec/**/*"
916
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SpecFilePathSuffix
917
+
761
918
  RSpec/StubbedMock:
762
919
  Description: Checks that message expectations do not have a configured response.
763
920
  Enabled: false # Maybe add later, currently there are too many conflicts
@@ -778,6 +935,12 @@ RSpec/SubjectStub:
778
935
  StyleGuide: https://rspec.rubystyle.guide/#dont-stub-subject
779
936
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SubjectStub
780
937
 
938
+ RSpec/UndescriptiveLiteralsDescription:
939
+ Description: Description should be descriptive.
940
+ Enabled: false
941
+ VersionAdded: '2.29'
942
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/UndescriptiveLiteralsDescription
943
+
781
944
  RSpec/UnspecifiedException:
782
945
  Description: Checks for a specified error in checking raised errors.
783
946
  Enabled: true
@@ -839,122 +1002,3 @@ RSpec/Yield:
839
1002
  Enabled: true
840
1003
  VersionAdded: '1.32'
841
1004
  Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Yield
842
-
843
- RSpec/Capybara:
844
- Enabled: true
845
- Include: *1
846
- Language: *2
847
-
848
- RSpec/Capybara/CurrentPathExpectation:
849
- Description: Checks that no expectations are set on Capybara's `current_path`.
850
- Enabled: true
851
- VersionAdded: '1.18'
852
- VersionChanged: '2.0'
853
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/CurrentPathExpectation
854
-
855
- RSpec/Capybara/FeatureMethods:
856
- Description: Checks for consistent method usage in feature specs.
857
- Enabled: true
858
- EnabledMethods: []
859
- VersionAdded: '1.17'
860
- VersionChanged: '2.0'
861
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/FeatureMethods
862
-
863
- RSpec/Capybara/SpecificFinders:
864
- Description: Checks if there is a more specific finder offered by Capybara.
865
- Enabled: false # Voted in https://github.com/makandra/makandra-rubocop/pull/41
866
- VersionAdded: '2.13'
867
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/SpecificFinders
868
-
869
- RSpec/Capybara/SpecificMatcher:
870
- Description: Checks for there is a more specific matcher offered by Capybara.
871
- Enabled: true
872
- VersionAdded: '2.12'
873
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/SpecificMatcher
874
-
875
- RSpec/Capybara/VisibilityMatcher:
876
- Description: Checks for boolean visibility in Capybara finders.
877
- Enabled: true
878
- VersionAdded: '1.39'
879
- VersionChanged: '2.0'
880
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Capybara/VisibilityMatcher
881
-
882
- RSpec/FactoryBot:
883
- Enabled: true
884
- Include: *1
885
- Language: *2
886
-
887
- RSpec/FactoryBot/AttributeDefinedStatically:
888
- Description: Always declare attribute values as blocks.
889
- Enabled: true
890
- Include:
891
- - spec/factories.rb
892
- - spec/factories/**/*.rb
893
- - features/support/factories/**/*.rb
894
- VersionAdded: '1.28'
895
- VersionChanged: '2.0'
896
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/AttributeDefinedStatically
897
-
898
- RSpec/FactoryBot/CreateList:
899
- Description: Checks for create_list usage.
900
- Enabled: true
901
- Include:
902
- - "**/*_spec.rb"
903
- - "**/spec/**/*"
904
- - spec/factories.rb
905
- - spec/factories/**/*.rb
906
- - features/support/factories/**/*.rb
907
- EnforcedStyle: create_list
908
- SupportedStyles:
909
- - create_list
910
- - n_times
911
- VersionAdded: '1.25'
912
- VersionChanged: '2.0'
913
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/CreateList
914
-
915
- RSpec/FactoryBot/FactoryClassName:
916
- Description: Use string value when setting the class attribute explicitly.
917
- Enabled: true
918
- Include:
919
- - spec/factories.rb
920
- - spec/factories/**/*.rb
921
- - features/support/factories/**/*.rb
922
- VersionAdded: '1.37'
923
- VersionChanged: '2.0'
924
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/FactoryClassName
925
-
926
- RSpec/FactoryBot/SyntaxMethods:
927
- Description: Use shorthands from `FactoryBot::Syntax::Methods` in your specs.
928
- Enabled: false # requires the usage of `FactoryBot::Syntax::Methods`
929
- SafeAutoCorrect: false
930
- VersionAdded: '2.7'
931
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/SyntaxMethods
932
-
933
- RSpec/Rails:
934
- Enabled: true
935
- Include: *1
936
- Language: *2
937
-
938
- RSpec/Rails/AvoidSetupHook:
939
- Description: Checks that tests use RSpec `before` hook over Rails `setup` method.
940
- Enabled: true
941
- VersionAdded: '2.4'
942
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/AvoidSetupHook
943
-
944
- RSpec/Rails/HaveHttpStatus:
945
- Description: Checks that tests use `have_http_status` instead of equality matchers.
946
- Enabled: true
947
- SafeAutoCorrect: false
948
- VersionAdded: '2.12'
949
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/HaveHttpStatus
950
-
951
- RSpec/Rails/HttpStatus:
952
- Description: Enforces use of symbolic or numeric value to describe HTTP status.
953
- Enabled: false # This should not be enforced
954
- EnforcedStyle: symbolic
955
- SupportedStyles:
956
- - numeric
957
- - symbolic
958
- VersionAdded: '1.23'
959
- VersionChanged: '2.0'
960
- Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/HttpStatus
@@ -1,3 +1,3 @@
1
1
  module MakandraRubocop
2
- VERSION = '12.1.0'.freeze
2
+ VERSION = '14.0.0'.freeze
3
3
  end
@@ -24,9 +24,9 @@ Gem::Specification.new do |spec|
24
24
  spec.executables = spec.files.grep(%r(^exe/)) { |f| File.basename(f) }
25
25
  spec.require_paths = ['lib']
26
26
 
27
- spec.add_dependency 'rubocop', '~> 1.60.0'
27
+ spec.add_dependency 'rubocop', '~> 1.61'
28
28
  spec.add_dependency 'rubocop-rails', '~> 2.23.1'
29
- spec.add_dependency 'rubocop-rspec', '~> 2.13.2'
29
+ spec.add_dependency 'rubocop-rspec', '~> 3.0.3'
30
30
  spec.add_dependency 'rubocop-capybara', '~> 2.20.0'
31
31
  spec.add_dependency 'rubocop-factory_bot', '~> 2.25.1'
32
32
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: makandra-rubocop
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.1.0
4
+ version: 14.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arne Hartherz
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2024-02-07 00:00:00.000000000 Z
12
+ date: 2024-08-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rubocop
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: 1.60.0
20
+ version: '1.61'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: 1.60.0
27
+ version: '1.61'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rubocop-rails
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -45,14 +45,14 @@ dependencies:
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: 2.13.2
48
+ version: 3.0.3
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: 2.13.2
55
+ version: 3.0.3
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rubocop-capybara
58
58
  requirement: !ruby/object:Gem::Requirement