docquet 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +20 -0
  3. data/LICENSE +21 -0
  4. data/README.md +205 -0
  5. data/config/cops/bundler.yml +19 -0
  6. data/config/cops/capybara.yml +1 -0
  7. data/config/cops/capybara_rspec.yml +1 -0
  8. data/config/cops/gemspec.yml +4 -0
  9. data/config/cops/i18n_gettext.yml +2 -0
  10. data/config/cops/i18n_railsi18n.yml +1 -0
  11. data/config/cops/layout.yml +79 -0
  12. data/config/cops/lint.yml +7 -0
  13. data/config/cops/metrics.yml +14 -0
  14. data/config/cops/migration.yml +2 -0
  15. data/config/cops/naming.yml +4 -0
  16. data/config/cops/performance.yml +7 -0
  17. data/config/cops/rake.yml +5 -0
  18. data/config/cops/rspec.yml +41 -0
  19. data/config/cops/security.yml +1 -0
  20. data/config/cops/sequel.yml +2 -0
  21. data/config/cops/style.yml +153 -0
  22. data/config/cops/thread_safety.yml +5 -0
  23. data/config/defaults/bundler.yml +97 -0
  24. data/config/defaults/capybara.yml +103 -0
  25. data/config/defaults/capybara_rspec.yml +24 -0
  26. data/config/defaults/gemspec.yml +121 -0
  27. data/config/defaults/i18n_gettext.yml +20 -0
  28. data/config/defaults/i18n_railsi18n.yml +9 -0
  29. data/config/defaults/layout.yml +1121 -0
  30. data/config/defaults/lint.yml +1315 -0
  31. data/config/defaults/metrics.yml +119 -0
  32. data/config/defaults/migration.yml +9 -0
  33. data/config/defaults/naming.yml +332 -0
  34. data/config/defaults/performance.yml +445 -0
  35. data/config/defaults/rake.yml +34 -0
  36. data/config/defaults/rspec.yml +1081 -0
  37. data/config/defaults/security.yml +67 -0
  38. data/config/defaults/sequel.yml +59 -0
  39. data/config/defaults/style.yml +2985 -0
  40. data/config/defaults/thread_safety.yml +45 -0
  41. data/exe/docquet +7 -0
  42. data/lib/docquet/cli/base.rb +21 -0
  43. data/lib/docquet/cli/install_config.rb +75 -0
  44. data/lib/docquet/cli/regenerate_todo.rb +46 -0
  45. data/lib/docquet/cli.rb +6 -0
  46. data/lib/docquet/commands.rb +12 -0
  47. data/lib/docquet/config_processor.rb +52 -0
  48. data/lib/docquet/generators/rubocop_yml_generator.rb +78 -0
  49. data/lib/docquet/inflector.rb +22 -0
  50. data/lib/docquet/plugin_detector.rb +29 -0
  51. data/lib/docquet/rake_task.rb +126 -0
  52. data/lib/docquet/version.rb +6 -0
  53. data/lib/docquet.rb +17 -0
  54. data/templates/rubocop.yml.erb +35 -0
  55. metadata +172 -0
@@ -0,0 +1,1081 @@
1
+ # Department 'RSpec' (111):
2
+ # Supports --autocorrect
3
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecalignleftletbrace
4
+ RSpec/AlignLeftLetBrace:
5
+ Description: Checks that left braces for adjacent single line lets are aligned.
6
+ Enabled: true # was false
7
+ VersionAdded: '1.16'
8
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AlignLeftLetBrace
9
+
10
+ # Supports --autocorrect
11
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecalignrightletbrace
12
+ RSpec/AlignRightLetBrace:
13
+ Description: Checks that right braces for adjacent single line lets are aligned.
14
+ Enabled: true # was false
15
+ VersionAdded: '1.16'
16
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AlignRightLetBrace
17
+
18
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecanyinstance
19
+ RSpec/AnyInstance:
20
+ Description: Check that instances are not being stubbed globally.
21
+ Enabled: true
22
+ VersionAdded: '1.4'
23
+ StyleGuide: https://rspec.rubystyle.guide/#any_instance_of
24
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AnyInstance
25
+
26
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecaroundblock
27
+ RSpec/AroundBlock:
28
+ Description: Checks that around blocks actually run the test.
29
+ Enabled: true
30
+ VersionAdded: '1.11'
31
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/AroundBlock
32
+
33
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecbe
34
+ RSpec/Be:
35
+ Description: Check for expectations where `be` is used without argument.
36
+ Enabled: true
37
+ VersionAdded: '1.25'
38
+ StyleGuide: https://rspec.rubystyle.guide/#be-matcher
39
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Be
40
+
41
+ # Supports --autocorrect
42
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecbeempty
43
+ RSpec/BeEmpty:
44
+ Description: Prefer using `be_empty` when checking for an empty array.
45
+ Enabled: true
46
+ AutoCorrect: contextual
47
+ VersionAdded: '2.20'
48
+ VersionChanged: '2.31'
49
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeEmpty
50
+
51
+ # Supports --autocorrect
52
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecbeeq
53
+ RSpec/BeEq:
54
+ Description: Check for expectations where `be(...)` can replace `eq(...)`.
55
+ Enabled: true
56
+ Safe: false
57
+ VersionAdded: 2.9.0
58
+ VersionChanged: '2.16'
59
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeEq
60
+
61
+ # Supports --autocorrect
62
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecbeeql
63
+ RSpec/BeEql:
64
+ Description: Check for expectations where `be(...)` can replace `eql(...)`.
65
+ Enabled: true
66
+ Safe: false
67
+ VersionAdded: '1.7'
68
+ VersionChanged: '2.16'
69
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeEql
70
+
71
+ # Supports --autocorrect
72
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecbenil
73
+ RSpec/BeNil:
74
+ Description: Ensures a consistent style is used when matching `nil`.
75
+ Enabled: true
76
+ EnforcedStyle: be_nil
77
+ SupportedStyles:
78
+ - be
79
+ - be_nil
80
+ VersionAdded: 2.9.0
81
+ VersionChanged: 2.10.0
82
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeNil
83
+
84
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecbeforeafterall
85
+ RSpec/BeforeAfterAll:
86
+ Description: Check that before/after(:all/:context) isn't being used.
87
+ Enabled: true
88
+ Exclude:
89
+ - "**/spec/spec_helper.rb"
90
+ - "**/spec/rails_helper.rb"
91
+ - "**/spec/support/**/*.rb"
92
+ VersionAdded: '1.12'
93
+ VersionChanged: '2.23'
94
+ StyleGuide: https://rspec.rubystyle.guide/#avoid-hooks-with-context-scope
95
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeforeAfterAll
96
+
97
+ # Supports --autocorrect
98
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecchangebyzero
99
+ RSpec/ChangeByZero:
100
+ Description: Prefer negated matchers over `to change.by(0)`.
101
+ Enabled: true
102
+ VersionAdded: '2.11'
103
+ VersionChanged: '2.14'
104
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ChangeByZero
105
+ NegatedMatcher:
106
+
107
+ # Supports --autocorrect
108
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecclasscheck
109
+ RSpec/ClassCheck:
110
+ Description: Enforces consistent use of `be_a` or `be_kind_of`.
111
+ StyleGuide: "#is-a-vs-kind-of"
112
+ Enabled: true
113
+ VersionAdded: '2.13'
114
+ EnforcedStyle: be_a
115
+ SupportedStyles:
116
+ - be_a
117
+ - be_kind_of
118
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ClassCheck
119
+
120
+ # Supports --autocorrect
121
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspeccontainexactly
122
+ RSpec/ContainExactly:
123
+ Description: Checks where `contain_exactly` is used.
124
+ Enabled: true
125
+ VersionAdded: '2.19'
126
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContainExactly
127
+
128
+ # Supports --autocorrect
129
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspeccontextmethod
130
+ RSpec/ContextMethod:
131
+ Description: "`context` should not be used for specifying methods."
132
+ Enabled: true
133
+ VersionAdded: '1.36'
134
+ StyleGuide: https://rspec.rubystyle.guide/#example-group-naming
135
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextMethod
136
+
137
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspeccontextwording
138
+ RSpec/ContextWording:
139
+ Description: Checks that `context` docstring starts with an allowed prefix.
140
+ Enabled: true
141
+ Prefixes:
142
+ - when
143
+ - with
144
+ - without
145
+ AllowedPatterns: []
146
+ VersionAdded: '1.20'
147
+ VersionChanged: '2.13'
148
+ StyleGuide: https://rspec.rubystyle.guide/#context-descriptions
149
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextWording
150
+
151
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecdescribeclass
152
+ RSpec/DescribeClass:
153
+ Description: Check that the first argument to the top-level describe is a constant.
154
+ Enabled: true
155
+ Exclude:
156
+ - "**/spec/features/**/*"
157
+ - "**/spec/requests/**/*"
158
+ - "**/spec/routing/**/*"
159
+ - "**/spec/system/**/*"
160
+ - "**/spec/views/**/*"
161
+ IgnoredMetadata:
162
+ type:
163
+ - channel
164
+ - controller
165
+ - helper
166
+ - job
167
+ - mailer
168
+ - model
169
+ - request
170
+ - routing
171
+ - view
172
+ - feature
173
+ - system
174
+ - mailbox
175
+ - aruba
176
+ - task
177
+ VersionAdded: '1.0'
178
+ VersionChanged: '2.7'
179
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeClass
180
+
181
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecdescribemethod
182
+ RSpec/DescribeMethod:
183
+ Description: Checks that the second argument to `describe` specifies a method.
184
+ Enabled: true
185
+ VersionAdded: '1.0'
186
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeMethod
187
+
188
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecdescribesymbol
189
+ RSpec/DescribeSymbol:
190
+ Description: Avoid describing symbols.
191
+ Enabled: true
192
+ VersionAdded: '1.15'
193
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeSymbol
194
+
195
+ # Supports --autocorrect
196
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecdescribedclass
197
+ RSpec/DescribedClass:
198
+ Description: Checks that tests use `described_class`.
199
+ Enabled: true
200
+ SkipBlocks: false
201
+ EnforcedStyle: described_class
202
+ SupportedStyles:
203
+ - described_class
204
+ - explicit
205
+ OnlyStaticConstants: true
206
+ SafeAutoCorrect: false
207
+ VersionAdded: '1.0'
208
+ VersionChanged: '2.27'
209
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribedClass
210
+
211
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecdescribedclassmodulewrapping
212
+ RSpec/DescribedClassModuleWrapping:
213
+ Description: Avoid opening modules and defining specs within them.
214
+ Enabled: true # was false
215
+ VersionAdded: '1.37'
216
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribedClassModuleWrapping
217
+
218
+ # Supports --autocorrect
219
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecdialect
220
+ RSpec/Dialect:
221
+ Description: Enforces custom RSpec dialects.
222
+ Enabled: true # was false
223
+ PreferredMethods: {}
224
+ VersionAdded: '1.33'
225
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Dialect
226
+
227
+ # Supports --autocorrect
228
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecduplicatedmetadata
229
+ RSpec/DuplicatedMetadata:
230
+ Description: Avoid duplicated metadata.
231
+ Enabled: true
232
+ VersionAdded: '2.16'
233
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DuplicatedMetadata
234
+
235
+ # Supports --autocorrect
236
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecemptyexamplegroup
237
+ RSpec/EmptyExampleGroup:
238
+ Description: Checks if an example group does not include any tests.
239
+ Enabled: true
240
+ AutoCorrect: contextual
241
+ SafeAutoCorrect: false
242
+ VersionAdded: '1.7'
243
+ VersionChanged: '2.31'
244
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyExampleGroup
245
+
246
+ # Supports --autocorrect
247
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecemptyhook
248
+ RSpec/EmptyHook:
249
+ Description: Checks for empty before and after hooks.
250
+ Enabled: true
251
+ AutoCorrect: contextual
252
+ VersionAdded: '1.39'
253
+ VersionChanged: '2.31'
254
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyHook
255
+
256
+ # Supports --autocorrect
257
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecemptylineafterexample
258
+ RSpec/EmptyLineAfterExample:
259
+ Description: Checks if there is an empty line after example blocks.
260
+ Enabled: true
261
+ AllowConsecutiveOneLiners: true
262
+ VersionAdded: '1.36'
263
+ StyleGuide: https://rspec.rubystyle.guide/#empty-lines-around-examples
264
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterExample
265
+
266
+ # Supports --autocorrect
267
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecemptylineafterexamplegroup
268
+ RSpec/EmptyLineAfterExampleGroup:
269
+ Description: Checks if there is an empty line after example group blocks.
270
+ Enabled: true
271
+ VersionAdded: '1.27'
272
+ StyleGuide: https://rspec.rubystyle.guide/#empty-lines-between-describes
273
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterExampleGroup
274
+
275
+ # Supports --autocorrect
276
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecemptylineafterfinallet
277
+ RSpec/EmptyLineAfterFinalLet:
278
+ Description: Checks if there is an empty line after the last let block.
279
+ Enabled: true
280
+ VersionAdded: '1.14'
281
+ StyleGuide: https://rspec.rubystyle.guide/#empty-line-after-let
282
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterFinalLet
283
+
284
+ # Supports --autocorrect
285
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecemptylineafterhook
286
+ RSpec/EmptyLineAfterHook:
287
+ Description: Checks if there is an empty line after hook blocks.
288
+ Enabled: true
289
+ VersionAdded: '1.27'
290
+ VersionChanged: '2.13'
291
+ StyleGuide: https://rspec.rubystyle.guide/#empty-line-after-let
292
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterHook
293
+ AllowConsecutiveOneLiners: true
294
+
295
+ # Supports --autocorrect
296
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecemptylineaftersubject
297
+ RSpec/EmptyLineAfterSubject:
298
+ Description: Checks if there is an empty line after subject block.
299
+ Enabled: true
300
+ VersionAdded: '1.14'
301
+ StyleGuide: https://rspec.rubystyle.guide/#empty-line-after-let
302
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyLineAfterSubject
303
+
304
+ # Supports --autocorrect
305
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecemptymetadata
306
+ RSpec/EmptyMetadata:
307
+ Description: Avoid empty metadata hash.
308
+ Enabled: true
309
+ AutoCorrect: contextual
310
+ VersionAdded: '2.24'
311
+ VersionChanged: '2.31'
312
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyMetadata
313
+
314
+ # Supports --autocorrect
315
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecemptyoutput
316
+ RSpec/EmptyOutput:
317
+ Description: Check that the `output` matcher is not called with an empty string.
318
+ Enabled: true
319
+ VersionAdded: '2.29'
320
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyOutput
321
+
322
+ # Supports --autocorrect
323
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspeceq
324
+ RSpec/Eq:
325
+ Description: Use `eq` instead of `be ==` to compare objects.
326
+ Enabled: true
327
+ VersionAdded: '2.24'
328
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Eq
329
+
330
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecexamplelength
331
+ RSpec/ExampleLength:
332
+ Description: Checks for long examples.
333
+ Enabled: true
334
+ Max: 5
335
+ CountAsOne: []
336
+ VersionAdded: '1.5'
337
+ VersionChanged: '2.3'
338
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleLength
339
+
340
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecexamplewithoutdescription
341
+ RSpec/ExampleWithoutDescription:
342
+ Description: Checks for examples without a description.
343
+ Enabled: true
344
+ EnforcedStyle: always_allow
345
+ SupportedStyles:
346
+ - always_allow
347
+ - single_line_only
348
+ - disallow
349
+ VersionAdded: '1.22'
350
+ StyleGuide: https://rspec.rubystyle.guide/#it-and-specify
351
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWithoutDescription
352
+
353
+ # Supports --autocorrect
354
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecexamplewording
355
+ RSpec/ExampleWording:
356
+ Description: Checks for common mistakes in example descriptions.
357
+ Enabled: true
358
+ CustomTransform:
359
+ be: is
360
+ BE: IS
361
+ have: has
362
+ HAVE: HAS
363
+ IgnoredWords: []
364
+ DisallowedExamples:
365
+ - works
366
+ VersionAdded: '1.0'
367
+ VersionChanged: '2.13'
368
+ StyleGuide: https://rspec.rubystyle.guide/#should-in-example-docstrings
369
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWording
370
+
371
+ # Supports --autocorrect
372
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecexcessivedocstringspacing
373
+ RSpec/ExcessiveDocstringSpacing:
374
+ Description: Checks for excessive whitespace in example descriptions.
375
+ Enabled: true
376
+ VersionAdded: '2.5'
377
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExcessiveDocstringSpacing
378
+
379
+ # Supports --autocorrect
380
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecexpectactual
381
+ RSpec/ExpectActual:
382
+ Description: Checks for `expect(...)` calls containing literal values.
383
+ Enabled: true
384
+ Exclude:
385
+ - "**/spec/routing/**/*"
386
+ VersionAdded: '1.7'
387
+ VersionChanged: '2.23'
388
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectActual
389
+
390
+ # Supports --autocorrect
391
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecexpectchange
392
+ RSpec/ExpectChange:
393
+ Description: Checks for consistent style of change matcher.
394
+ Enabled: true
395
+ EnforcedStyle: method_call
396
+ SupportedStyles:
397
+ - method_call
398
+ - block
399
+ SafeAutoCorrect: false
400
+ VersionAdded: '1.22'
401
+ VersionChanged: '2.5'
402
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectChange
403
+
404
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecexpectinhook
405
+ RSpec/ExpectInHook:
406
+ Description: Do not use `expect` in hooks such as `before`.
407
+ Enabled: true
408
+ VersionAdded: '1.16'
409
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectInHook
410
+
411
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecexpectinlet
412
+ RSpec/ExpectInLet:
413
+ Description: Do not use `expect` in let.
414
+ Enabled: true
415
+ VersionAdded: '2.30'
416
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectInLet
417
+
418
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecexpectoutput
419
+ RSpec/ExpectOutput:
420
+ Description: Checks for opportunities to use `expect { ... }.to output`.
421
+ Enabled: true
422
+ VersionAdded: '1.10'
423
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectOutput
424
+
425
+ # Supports --autocorrect
426
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecfocus
427
+ RSpec/Focus:
428
+ Description: Checks if examples are focused.
429
+ Enabled: true
430
+ AutoCorrect: contextual
431
+ VersionAdded: '1.5'
432
+ VersionChanged: '2.31'
433
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Focus
434
+
435
+ # Supports --autocorrect
436
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspechookargument
437
+ RSpec/HookArgument:
438
+ Description: Checks the arguments passed to `before`, `around`, and `after`.
439
+ Enabled: true
440
+ EnforcedStyle: implicit
441
+ SupportedStyles:
442
+ - implicit
443
+ - each
444
+ - example
445
+ VersionAdded: '1.7'
446
+ StyleGuide: https://rspec.rubystyle.guide/#redundant-beforeeach
447
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HookArgument
448
+
449
+ # Supports --autocorrect
450
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspechooksbeforeexamples
451
+ RSpec/HooksBeforeExamples:
452
+ Description: Checks for before/around/after hooks that come after an example.
453
+ Enabled: true
454
+ AutoCorrect: contextual
455
+ VersionAdded: '1.29'
456
+ VersionChanged: '2.31'
457
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HooksBeforeExamples
458
+
459
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecidenticalequalityassertion
460
+ RSpec/IdenticalEqualityAssertion:
461
+ Description: Checks for equality assertions with identical expressions on both sides.
462
+ Enabled: true
463
+ VersionAdded: '2.4'
464
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IdenticalEqualityAssertion
465
+
466
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecimplicitblockexpectation
467
+ RSpec/ImplicitBlockExpectation:
468
+ Description: Check that implicit block expectation syntax is not used.
469
+ Enabled: true
470
+ VersionAdded: '1.35'
471
+ StyleGuide: https://rspec.rubystyle.guide/#implicit-block-expectations
472
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitBlockExpectation
473
+
474
+ # Supports --autocorrect
475
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecimplicitexpect
476
+ RSpec/ImplicitExpect:
477
+ Description: Check that a consistent implicit expectation style is used.
478
+ Enabled: true
479
+ EnforcedStyle: is_expected
480
+ SupportedStyles:
481
+ - is_expected
482
+ - should
483
+ VersionAdded: '1.8'
484
+ StyleGuide: https://rspec.rubystyle.guide/#use-expect
485
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitExpect
486
+
487
+ # Supports --autocorrect
488
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecimplicitsubject
489
+ RSpec/ImplicitSubject:
490
+ Description: Checks for usage of implicit subject (`is_expected` / `should`).
491
+ Enabled: true
492
+ EnforcedStyle: single_line_only
493
+ SupportedStyles:
494
+ - single_line_only
495
+ - single_statement_only
496
+ - disallow
497
+ - require_implicit
498
+ VersionAdded: '1.29'
499
+ VersionChanged: '2.13'
500
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitSubject
501
+
502
+ # Supports --autocorrect
503
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecincludeexamples
504
+ RSpec/IncludeExamples:
505
+ Description: Checks for usage of `include_examples`.
506
+ Enabled: true # was pending
507
+ SafeAutoCorrect: false
508
+ VersionAdded: '3.6'
509
+ VersionChanged: '3.7'
510
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IncludeExamples
511
+
512
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecindexedlet
513
+ RSpec/IndexedLet:
514
+ Description: Do not set up test data using indexes (e.g., `item_1`, `item_2`).
515
+ Enabled: true
516
+ VersionAdded: '2.20'
517
+ VersionChanged: '2.23'
518
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IndexedLet
519
+ Max: 1
520
+ AllowedIdentifiers: []
521
+ AllowedPatterns: []
522
+
523
+ # Supports --autocorrect
524
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecinstancespy
525
+ RSpec/InstanceSpy:
526
+ Description: Checks for `instance_double` used with `have_received`.
527
+ Enabled: true
528
+ VersionAdded: '1.12'
529
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceSpy
530
+
531
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecinstancevariable
532
+ RSpec/InstanceVariable:
533
+ Description: Checks for instance variable usage in specs.
534
+ Enabled: true
535
+ AssignmentOnly: false
536
+ VersionAdded: '1.0'
537
+ VersionChanged: '1.7'
538
+ StyleGuide: https://rspec.rubystyle.guide/#instance-variables
539
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable
540
+
541
+ # Supports --autocorrect
542
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecisexpectedspecify
543
+ RSpec/IsExpectedSpecify:
544
+ Description: Check for `specify` with `is_expected` and one-liner expectations.
545
+ Enabled: true
546
+ VersionAdded: '2.27'
547
+ StyleGuide: https://rspec.rubystyle.guide/#it-and-specify
548
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IsExpectedSpecify
549
+
550
+ # Supports --autocorrect
551
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecitbehaveslike
552
+ RSpec/ItBehavesLike:
553
+ Description: Checks that only one `it_behaves_like` style is used.
554
+ Enabled: true
555
+ EnforcedStyle: it_behaves_like
556
+ SupportedStyles:
557
+ - it_behaves_like
558
+ - it_should_behave_like
559
+ VersionAdded: '1.13'
560
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ItBehavesLike
561
+
562
+ # Supports --autocorrect
563
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspeciteratedexpectation
564
+ RSpec/IteratedExpectation:
565
+ Description: Check that `all` matcher is used instead of iterating over an array.
566
+ Enabled: true
567
+ VersionAdded: '1.14'
568
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IteratedExpectation
569
+
570
+ # Supports --autocorrect
571
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecleadingsubject
572
+ RSpec/LeadingSubject:
573
+ Description: Enforce that subject is the first definition in the test.
574
+ Enabled: true
575
+ VersionAdded: '1.7'
576
+ VersionChanged: '1.14'
577
+ StyleGuide: https://rspec.rubystyle.guide/#leading-subject
578
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LeadingSubject
579
+
580
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecleakyconstantdeclaration
581
+ RSpec/LeakyConstantDeclaration:
582
+ Description: Checks that no class, module, or constant is declared.
583
+ Enabled: true
584
+ VersionAdded: '1.35'
585
+ StyleGuide: https://rspec.rubystyle.guide/#declare-constants
586
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LeakyConstantDeclaration
587
+
588
+ # Supports --autocorrect
589
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecletbeforeexamples
590
+ RSpec/LetBeforeExamples:
591
+ Description: Checks for `let` definitions that come after an example.
592
+ Enabled: true
593
+ AutoCorrect: contextual
594
+ VersionAdded: '1.16'
595
+ VersionChanged: '2.31'
596
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LetBeforeExamples
597
+
598
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecletsetup
599
+ RSpec/LetSetup:
600
+ Description: Checks unreferenced `let!` calls being used for test setup.
601
+ Enabled: true
602
+ VersionAdded: '1.7'
603
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LetSetup
604
+
605
+ # Supports --autocorrect
606
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecmatcharray
607
+ RSpec/MatchArray:
608
+ Description: Checks where `match_array` is used.
609
+ Enabled: true
610
+ VersionAdded: '2.19'
611
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MatchArray
612
+
613
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecmessagechain
614
+ RSpec/MessageChain:
615
+ Description: Check that chains of messages are not being stubbed.
616
+ Enabled: true
617
+ VersionAdded: '1.7'
618
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageChain
619
+
620
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecmessageexpectation
621
+ RSpec/MessageExpectation:
622
+ Description: Checks for consistent message expectation style.
623
+ Enabled: true # was false
624
+ EnforcedStyle: allow
625
+ SupportedStyles:
626
+ - allow
627
+ - expect
628
+ VersionAdded: '1.7'
629
+ VersionChanged: '1.8'
630
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageExpectation
631
+
632
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecmessagespies
633
+ RSpec/MessageSpies:
634
+ Description: Checks that message expectations are set using spies.
635
+ Enabled: true
636
+ EnforcedStyle: have_received
637
+ SupportedStyles:
638
+ - have_received
639
+ - receive
640
+ VersionAdded: '1.9'
641
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageSpies
642
+
643
+ # Supports --autocorrect
644
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecmetadatastyle
645
+ RSpec/MetadataStyle:
646
+ Description: Use consistent metadata style.
647
+ Enabled: true
648
+ EnforcedStyle: symbol
649
+ SupportedStyles:
650
+ - hash
651
+ - symbol
652
+ VersionAdded: '2.24'
653
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MetadataStyle
654
+
655
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecmissingexamplegroupargument
656
+ RSpec/MissingExampleGroupArgument:
657
+ Description: Checks that the first argument to an example group is not empty.
658
+ Enabled: true
659
+ VersionAdded: '1.28'
660
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MissingExampleGroupArgument
661
+
662
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecmissingexpectationtargetmethod
663
+ RSpec/MissingExpectationTargetMethod:
664
+ Description: Checks if `.to`, `not_to` or `to_not` are used.
665
+ Enabled: true
666
+ VersionAdded: '3.0'
667
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MissingExpectationTargetMethod
668
+
669
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecmultipledescribes
670
+ RSpec/MultipleDescribes:
671
+ Description: Checks for multiple top-level example groups.
672
+ Enabled: true
673
+ VersionAdded: '1.0'
674
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleDescribes
675
+
676
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecmultipleexpectations
677
+ RSpec/MultipleExpectations:
678
+ Description: Checks if examples contain too many `expect` calls.
679
+ Enabled: true
680
+ Max: 1
681
+ VersionAdded: '1.7'
682
+ VersionChanged: '1.21'
683
+ StyleGuide: https://rspec.rubystyle.guide/#expectation-per-example
684
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleExpectations
685
+
686
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecmultiplememoizedhelpers
687
+ RSpec/MultipleMemoizedHelpers:
688
+ Description: Checks if example groups contain too many `let` and `subject` calls.
689
+ Enabled: true
690
+ AllowSubject: true
691
+ Max: 5
692
+ VersionAdded: '1.43'
693
+ StyleGuide: https://rspec.rubystyle.guide/#let-blocks
694
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleMemoizedHelpers
695
+
696
+ # Supports --autocorrect
697
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecmultiplesubjects
698
+ RSpec/MultipleSubjects:
699
+ Description: Checks if an example group defines `subject` multiple times.
700
+ Enabled: true
701
+ VersionAdded: '1.16'
702
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MultipleSubjects
703
+
704
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecnamedsubject
705
+ RSpec/NamedSubject:
706
+ Description: Checks for explicitly referenced test subjects.
707
+ Enabled: true
708
+ EnforcedStyle: always
709
+ SupportedStyles:
710
+ - always
711
+ - named_only
712
+ IgnoreSharedExamples: true
713
+ VersionAdded: 1.5.3
714
+ VersionChanged: '2.15'
715
+ StyleGuide: https://rspec.rubystyle.guide/#use-subject
716
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NamedSubject
717
+
718
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecnestedgroups
719
+ RSpec/NestedGroups:
720
+ Description: Checks for nested example groups.
721
+ Enabled: true
722
+ Max: 3
723
+ AllowedGroups: []
724
+ VersionAdded: '1.7'
725
+ VersionChanged: '2.13'
726
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NestedGroups
727
+
728
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecnoexpectationexample
729
+ RSpec/NoExpectationExample:
730
+ Description: Checks if an example contains any expectation.
731
+ Enabled: true
732
+ Safe: false
733
+ VersionAdded: '2.13'
734
+ VersionChanged: '2.14'
735
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NoExpectationExample
736
+ AllowedPatterns:
737
+ - "^expect_"
738
+ - "^assert_"
739
+
740
+ # Supports --autocorrect
741
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecnottonot
742
+ RSpec/NotToNot:
743
+ Description: Checks for consistent method usage for negating expectations.
744
+ Enabled: true
745
+ EnforcedStyle: not_to
746
+ SupportedStyles:
747
+ - not_to
748
+ - to_not
749
+ VersionAdded: '1.4'
750
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NotToNot
751
+
752
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecoverwritingsetup
753
+ RSpec/OverwritingSetup:
754
+ Description: Checks if there is a let/subject that overwrites an existing one.
755
+ Enabled: true
756
+ VersionAdded: '1.14'
757
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/OverwritingSetup
758
+
759
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecpending
760
+ RSpec/Pending:
761
+ Description: Checks for any pending or skipped examples.
762
+ Enabled: true # was false
763
+ VersionAdded: '1.25'
764
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Pending
765
+
766
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecpendingwithoutreason
767
+ RSpec/PendingWithoutReason:
768
+ Description: Checks for pending or skipped examples without reason.
769
+ Enabled: true
770
+ VersionAdded: '2.16'
771
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/PendingWithoutReason
772
+
773
+ # Supports --autocorrect
774
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecpredicatematcher
775
+ RSpec/PredicateMatcher:
776
+ Description: Prefer using predicate matcher over using predicate method directly.
777
+ Enabled: true
778
+ Strict: true
779
+ EnforcedStyle: inflected
780
+ AllowedExplicitMatchers: []
781
+ SupportedStyles:
782
+ - inflected
783
+ - explicit
784
+ SafeAutoCorrect: false
785
+ VersionAdded: '1.16'
786
+ StyleGuide: https://rspec.rubystyle.guide/#predicate-matchers
787
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/PredicateMatcher
788
+
789
+ # Supports --autocorrect
790
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecreceivecounts
791
+ RSpec/ReceiveCounts:
792
+ Description: Check for `once` and `twice` receive counts matchers usage.
793
+ Enabled: true
794
+ VersionAdded: '1.26'
795
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveCounts
796
+
797
+ # Supports --autocorrect
798
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecreceivemessages
799
+ RSpec/ReceiveMessages:
800
+ Description: Prefer `receive_messages` over multiple `receive`s on the same object.
801
+ Enabled: true
802
+ SafeAutoCorrect: false
803
+ VersionAdded: '2.23'
804
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveMessages
805
+
806
+ # Supports --autocorrect
807
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecreceivenever
808
+ RSpec/ReceiveNever:
809
+ Description: Prefer `not_to receive(...)` over `receive(...).never`.
810
+ Enabled: true
811
+ VersionAdded: '1.28'
812
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveNever
813
+
814
+ # Supports --autocorrect
815
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecredundantaround
816
+ RSpec/RedundantAround:
817
+ Description: Remove redundant `around` hook.
818
+ Enabled: true
819
+ VersionAdded: '2.19'
820
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RedundantAround
821
+
822
+ # Supports --autocorrect
823
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecredundantpredicatematcher
824
+ RSpec/RedundantPredicateMatcher:
825
+ Description: Checks for redundant predicate matcher.
826
+ Enabled: true
827
+ VersionAdded: '2.26'
828
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RedundantPredicateMatcher
829
+
830
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecremoveconst
831
+ RSpec/RemoveConst:
832
+ Description: Checks that `remove_const` is not used in specs.
833
+ Enabled: true
834
+ VersionAdded: '2.26'
835
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RemoveConst
836
+
837
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecrepeateddescription
838
+ RSpec/RepeatedDescription:
839
+ Description: Check for repeated description strings in example groups.
840
+ Enabled: true
841
+ VersionAdded: '1.9'
842
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedDescription
843
+
844
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecrepeatedexample
845
+ RSpec/RepeatedExample:
846
+ Description: Check for repeated examples within example groups.
847
+ Enabled: true
848
+ VersionAdded: '1.10'
849
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedExample
850
+
851
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecrepeatedexamplegroupbody
852
+ RSpec/RepeatedExampleGroupBody:
853
+ Description: Check for repeated describe and context block body.
854
+ Enabled: true
855
+ VersionAdded: '1.38'
856
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedExampleGroupBody
857
+
858
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecrepeatedexamplegroupdescription
859
+ RSpec/RepeatedExampleGroupDescription:
860
+ Description: Check for repeated example group descriptions.
861
+ Enabled: true
862
+ VersionAdded: '1.38'
863
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedExampleGroupDescription
864
+
865
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecrepeatedincludeexample
866
+ RSpec/RepeatedIncludeExample:
867
+ Description: Check for repeated include of shared examples.
868
+ Enabled: true
869
+ VersionAdded: '1.44'
870
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedIncludeExample
871
+
872
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecrepeatedsubjectcall
873
+ RSpec/RepeatedSubjectCall:
874
+ Description: Checks for repeated calls to subject missing that it is memoized.
875
+ Enabled: true
876
+ VersionAdded: '2.27'
877
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedSubjectCall
878
+
879
+ # Supports --autocorrect
880
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecreturnfromstub
881
+ RSpec/ReturnFromStub:
882
+ Description: Checks for consistent style of stub's return setting.
883
+ Enabled: true
884
+ EnforcedStyle: and_return
885
+ SupportedStyles:
886
+ - and_return
887
+ - block
888
+ VersionAdded: '1.16'
889
+ VersionChanged: '1.22'
890
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReturnFromStub
891
+
892
+ # Supports --autocorrect
893
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecscatteredlet
894
+ RSpec/ScatteredLet:
895
+ Description: Checks for let scattered across the example group.
896
+ Enabled: true
897
+ AutoCorrect: contextual
898
+ VersionAdded: '1.14'
899
+ VersionChanged: '2.31'
900
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredLet
901
+
902
+ # Supports --autocorrect
903
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecscatteredsetup
904
+ RSpec/ScatteredSetup:
905
+ Description: Checks for setup scattered across multiple hooks in an example group.
906
+ Enabled: true
907
+ AutoCorrect: contextual
908
+ VersionAdded: '1.10'
909
+ VersionChanged: '2.31'
910
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredSetup
911
+
912
+ # Supports --autocorrect
913
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecsharedcontext
914
+ RSpec/SharedContext:
915
+ Description: Checks for proper shared_context and shared_examples usage.
916
+ Enabled: true
917
+ VersionAdded: '1.13'
918
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SharedContext
919
+
920
+ # Supports --autocorrect
921
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecsharedexamples
922
+ RSpec/SharedExamples:
923
+ Description: Checks for consistent style for shared example names.
924
+ Enabled: true
925
+ EnforcedStyle: string
926
+ SupportedStyles:
927
+ - string
928
+ - symbol
929
+ VersionAdded: '1.25'
930
+ VersionChanged: '2.26'
931
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SharedExamples
932
+
933
+ # Supports --autocorrect
934
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecsingleargumentmessagechain
935
+ RSpec/SingleArgumentMessageChain:
936
+ Description: Checks that chains of messages contain more than one element.
937
+ Enabled: true
938
+ VersionAdded: '1.9'
939
+ VersionChanged: '1.10'
940
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SingleArgumentMessageChain
941
+
942
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecskipblockinsideexample
943
+ RSpec/SkipBlockInsideExample:
944
+ Description: Checks for passing a block to `skip` within examples.
945
+ Enabled: true
946
+ VersionAdded: '2.19'
947
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SkipBlockInsideExample
948
+
949
+ # Supports --autocorrect
950
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecsortmetadata
951
+ RSpec/SortMetadata:
952
+ Description: Sort RSpec metadata alphabetically.
953
+ Enabled: true
954
+ VersionAdded: '2.14'
955
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SortMetadata
956
+
957
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecspecfilepathformat
958
+ RSpec/SpecFilePathFormat:
959
+ Description: Checks that spec file paths are consistent and well-formed.
960
+ Enabled: true
961
+ Include:
962
+ - "**/*_spec.rb"
963
+ Exclude:
964
+ - "**/spec/routing/**/*"
965
+ CustomTransform:
966
+ RuboCop: rubocop
967
+ RSpec: rspec
968
+ IgnoreMethods: false
969
+ IgnoreMetadata:
970
+ type: routing
971
+ VersionAdded: '2.24'
972
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SpecFilePathFormat
973
+
974
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecspecfilepathsuffix
975
+ RSpec/SpecFilePathSuffix:
976
+ Description: Checks that spec file paths suffix are consistent and well-formed.
977
+ Enabled: true
978
+ VersionAdded: '2.24'
979
+ Include:
980
+ - "**/*_spec*rb*"
981
+ - "**/spec/**/*"
982
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SpecFilePathSuffix
983
+
984
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecstubbedmock
985
+ RSpec/StubbedMock:
986
+ Description: Checks that message expectations do not have a configured response.
987
+ Enabled: true
988
+ VersionAdded: '1.44'
989
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/StubbedMock
990
+
991
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecsubjectdeclaration
992
+ RSpec/SubjectDeclaration:
993
+ Description: Ensure that subject is defined using subject helper.
994
+ Enabled: true
995
+ VersionAdded: '2.5'
996
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SubjectDeclaration
997
+
998
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecsubjectstub
999
+ RSpec/SubjectStub:
1000
+ Description: Checks for stubbed test subjects.
1001
+ Enabled: true
1002
+ VersionAdded: '1.7'
1003
+ VersionChanged: '2.8'
1004
+ StyleGuide: https://rspec.rubystyle.guide/#dont-stub-subject
1005
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/SubjectStub
1006
+
1007
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecundescriptiveliteralsdescription
1008
+ RSpec/UndescriptiveLiteralsDescription:
1009
+ Description: Description should be descriptive.
1010
+ Enabled: true
1011
+ VersionAdded: '2.29'
1012
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/UndescriptiveLiteralsDescription
1013
+
1014
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecunspecifiedexception
1015
+ RSpec/UnspecifiedException:
1016
+ Description: Checks for a specified error in checking raised errors.
1017
+ Enabled: true
1018
+ VersionAdded: '1.30'
1019
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/UnspecifiedException
1020
+
1021
+ # Supports --autocorrect
1022
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecvariabledefinition
1023
+ RSpec/VariableDefinition:
1024
+ Description: Checks that memoized helpers names are symbols or strings.
1025
+ Enabled: true
1026
+ EnforcedStyle: symbols
1027
+ SupportedStyles:
1028
+ - symbols
1029
+ - strings
1030
+ VersionAdded: '1.40'
1031
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VariableDefinition
1032
+
1033
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecvariablename
1034
+ RSpec/VariableName:
1035
+ Description: Checks that memoized helper names use the configured style.
1036
+ Enabled: true
1037
+ EnforcedStyle: snake_case
1038
+ SupportedStyles:
1039
+ - snake_case
1040
+ - camelCase
1041
+ AllowedPatterns: []
1042
+ VersionAdded: '1.40'
1043
+ VersionChanged: '2.13'
1044
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VariableName
1045
+
1046
+ # Supports --autocorrect
1047
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecverifieddoublereference
1048
+ RSpec/VerifiedDoubleReference:
1049
+ Description: Checks for consistent verified double reference style.
1050
+ Enabled: true
1051
+ SafeAutoCorrect: false
1052
+ VersionAdded: 2.10.0
1053
+ VersionChanged: '3.4'
1054
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VerifiedDoubleReference
1055
+
1056
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecverifieddoubles
1057
+ RSpec/VerifiedDoubles:
1058
+ Description: Prefer using verifying doubles over normal doubles.
1059
+ Enabled: true
1060
+ IgnoreNameless: true
1061
+ IgnoreSymbolicNames: false
1062
+ VersionAdded: 1.2.1
1063
+ VersionChanged: '1.5'
1064
+ StyleGuide: https://rspec.rubystyle.guide/#doubles
1065
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VerifiedDoubles
1066
+
1067
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecvoidexpect
1068
+ RSpec/VoidExpect:
1069
+ Description: Checks void `expect()`.
1070
+ Enabled: true
1071
+ VersionAdded: '1.16'
1072
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VoidExpect
1073
+
1074
+ # Supports --autocorrect
1075
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecyield
1076
+ RSpec/Yield:
1077
+ Description: Checks for calling a block within a stub.
1078
+ Enabled: true
1079
+ VersionAdded: '1.32'
1080
+ Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Yield
1081
+