tsumanne 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +3 -0
  3. data/.rubocop.yml +32 -0
  4. data/.ruby-version +1 -0
  5. data/LICENSE.txt +21 -0
  6. data/README.md +31 -0
  7. data/Rakefile +45 -0
  8. data/lib/tsumanne/version.rb +7 -0
  9. data/lib/tsumanne.rb +128 -0
  10. data/sorbet/config +4 -0
  11. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  12. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  13. data/sorbet/rbi/gems/base64@0.1.1.rbi +172 -0
  14. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1083 -0
  15. data/sorbet/rbi/gems/erubi@1.12.0.rbi +145 -0
  16. data/sorbet/rbi/gems/ffi-compiler@1.0.1.rbi +206 -0
  17. data/sorbet/rbi/gems/ffi@1.15.5.rbi +1994 -0
  18. data/sorbet/rbi/gems/http-parser@1.2.3.rbi +422 -0
  19. data/sorbet/rbi/gems/json@2.6.3.rbi +1533 -0
  20. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14237 -0
  21. data/sorbet/rbi/gems/mhtml@0.1.6.rbi +353 -0
  22. data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
  23. data/sorbet/rbi/gems/parallel@1.23.0.rbi +273 -0
  24. data/sorbet/rbi/gems/parser@3.2.2.3.rbi +7253 -0
  25. data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +951 -0
  26. data/sorbet/rbi/gems/racc@1.7.1.rbi +161 -0
  27. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +402 -0
  28. data/sorbet/rbi/gems/rake@13.0.6.rbi +3024 -0
  29. data/sorbet/rbi/gems/rbi@0.0.17.rbi +2967 -0
  30. data/sorbet/rbi/gems/regexp_parser@2.8.1.rbi +3749 -0
  31. data/sorbet/rbi/gems/rexml@3.2.6.rbi +4781 -0
  32. data/sorbet/rbi/gems/rspec-core@3.12.2.rbi +10805 -0
  33. data/sorbet/rbi/gems/rspec-expectations@3.12.3.rbi +8100 -0
  34. data/sorbet/rbi/gems/rspec-mocks@3.12.6.rbi +5310 -0
  35. data/sorbet/rbi/gems/rspec-support@3.12.1.rbi +1609 -0
  36. data/sorbet/rbi/gems/rspec@3.12.0.rbi +82 -0
  37. data/sorbet/rbi/gems/rubocop-ast@1.29.0.rbi +7144 -0
  38. data/sorbet/rbi/gems/rubocop-capybara@2.18.0.rbi +827 -0
  39. data/sorbet/rbi/gems/rubocop-factory_bot@2.23.1.rbi +812 -0
  40. data/sorbet/rbi/gems/rubocop-performance@1.19.0.rbi +3157 -0
  41. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +328 -0
  42. data/sorbet/rbi/gems/rubocop-rspec@2.23.2.rbi +7691 -0
  43. data/sorbet/rbi/gems/rubocop-sorbet@0.7.3.rbi +1226 -0
  44. data/sorbet/rbi/gems/rubocop@1.56.2.rbi +56541 -0
  45. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1317 -0
  46. data/sorbet/rbi/gems/spoom@1.2.3.rbi +3199 -0
  47. data/sorbet/rbi/gems/syntax_tree@6.1.1.rbi +22855 -0
  48. data/sorbet/rbi/gems/tapioca@0.11.8.rbi +3329 -0
  49. data/sorbet/rbi/gems/thor@1.2.2.rbi +3965 -0
  50. data/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi +65 -0
  51. data/sorbet/rbi/gems/unparser@0.6.8.rbi +4525 -0
  52. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +425 -0
  53. data/sorbet/rbi/gems/yard@0.9.34.rbi +18219 -0
  54. data/sorbet/tapioca/config.yml +13 -0
  55. data/sorbet/tapioca/require.rb +4 -0
  56. metadata +254 -0
@@ -0,0 +1,812 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `rubocop-factory_bot` gem.
5
+ # Please instead update this file by running `bin/tapioca gem rubocop-factory_bot`.
6
+
7
+ # source://rubocop-factory_bot//lib/rubocop/factory_bot/factory_bot.rb#3
8
+ module RuboCop; end
9
+
10
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/mixin/configurable_explicit_only.rb#4
11
+ module RuboCop::Cop; end
12
+
13
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/mixin/configurable_explicit_only.rb#5
14
+ module RuboCop::Cop::FactoryBot; end
15
+
16
+ # Use a consistent style to define associations.
17
+ #
18
+ # @example EnforcedStyle: implicit (default)
19
+ # # bad
20
+ # factory :post do
21
+ # association :user
22
+ # end
23
+ #
24
+ # # good
25
+ # factory :post do
26
+ # user
27
+ # end
28
+ # @example EnforcedStyle: explicit
29
+ # # bad
30
+ # factory :post do
31
+ # user
32
+ # end
33
+ #
34
+ # # good
35
+ # factory :post do
36
+ # association :user
37
+ # end
38
+ #
39
+ # # good (NonImplicitAssociationMethodNames: ['email'])
40
+ # sequence :email do |n|
41
+ # "person#{n}@example.com"
42
+ # end
43
+ #
44
+ # factory :user do
45
+ # email
46
+ # end
47
+ #
48
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#43
49
+ class RuboCop::Cop::FactoryBot::AssociationStyle < ::RuboCop::Cop::Base
50
+ include ::RuboCop::Cop::ConfigurableEnforcedStyle
51
+ extend ::RuboCop::Cop::AutoCorrector
52
+
53
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#71
54
+ def explicit_association?(param0 = T.unsafe(nil)); end
55
+
56
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#81
57
+ def factory_option_matcher(param0 = T.unsafe(nil)); end
58
+
59
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#76
60
+ def implicit_association?(param0 = T.unsafe(nil)); end
61
+
62
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#57
63
+ def on_send(node); end
64
+
65
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#102
66
+ def trait_names_from_explicit(param0 = T.unsafe(nil)); end
67
+
68
+ private
69
+
70
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#106
71
+ def autocorrect(corrector, node); end
72
+
73
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#114
74
+ def autocorrect_to_explicit_style(corrector, node); end
75
+
76
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#122
77
+ def autocorrect_to_implicit_style(corrector, node); end
78
+
79
+ # @return [Boolean]
80
+ #
81
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#132
82
+ def bad?(node); end
83
+
84
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#140
85
+ def bad_associations_in(node); end
86
+
87
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#146
88
+ def children_of_factory_block(node); end
89
+
90
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#158
91
+ def factory_names_from_explicit(node); end
92
+
93
+ # @return [Boolean]
94
+ #
95
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#168
96
+ def non_implicit_association_method_name?(method_name); end
97
+
98
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#172
99
+ def non_implicit_association_method_names; end
100
+
101
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#185
102
+ def options_for_autocorrect_to_implicit_style(node); end
103
+
104
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#177
105
+ def options_from_explicit(node); end
106
+ end
107
+
108
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#48
109
+ RuboCop::Cop::FactoryBot::AssociationStyle::DEFAULT_NON_IMPLICIT_ASSOCIATION_METHOD_NAMES = T.let(T.unsafe(nil), Array)
110
+
111
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#55
112
+ RuboCop::Cop::FactoryBot::AssociationStyle::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
113
+
114
+ # Always declare attribute values as blocks.
115
+ #
116
+ # @example
117
+ # # bad
118
+ # kind [:active, :rejected].sample
119
+ #
120
+ # # good
121
+ # kind { [:active, :rejected].sample }
122
+ #
123
+ # # bad
124
+ # closed_at 1.day.from_now
125
+ #
126
+ # # good
127
+ # closed_at { 1.day.from_now }
128
+ #
129
+ # # bad
130
+ # count 1
131
+ #
132
+ # # good
133
+ # count { 1 }
134
+ #
135
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#27
136
+ class RuboCop::Cop::FactoryBot::AttributeDefinedStatically < ::RuboCop::Cop::Base
137
+ extend ::RuboCop::Cop::AutoCorrector
138
+
139
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#85
140
+ def association?(param0 = T.unsafe(nil)); end
141
+
142
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#38
143
+ def factory_attributes(param0 = T.unsafe(nil)); end
144
+
145
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#42
146
+ def on_block(node); end
147
+
148
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#33
149
+ def value_matcher(param0 = T.unsafe(nil)); end
150
+
151
+ private
152
+
153
+ # @return [Boolean]
154
+ #
155
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#119
156
+ def attribute_defining_method?(method_name); end
157
+
158
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#58
159
+ def autocorrect(corrector, node); end
160
+
161
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#87
162
+ def autocorrect_replacing_parens(corrector, node); end
163
+
164
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#94
165
+ def autocorrect_without_parens(corrector, node); end
166
+
167
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#103
168
+ def braces(node); end
169
+
170
+ # @return [Boolean]
171
+ #
172
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#66
173
+ def offensive_receiver?(receiver, node); end
174
+
175
+ # @return [Boolean]
176
+ #
177
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#80
178
+ def proc?(attribute); end
179
+
180
+ # @return [Boolean]
181
+ #
182
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#72
183
+ def receiver_matches_first_block_argument?(receiver, node); end
184
+
185
+ # @return [Boolean]
186
+ #
187
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#115
188
+ def reserved_method?(method_name); end
189
+
190
+ # @return [Boolean]
191
+ #
192
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#111
193
+ def value_hash_without_braces?(node); end
194
+ end
195
+
196
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#30
197
+ RuboCop::Cop::FactoryBot::AttributeDefinedStatically::MSG = T.let(T.unsafe(nil), String)
198
+
199
+ # Handles `ExplicitOnly` configuration parameters.
200
+ #
201
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/mixin/configurable_explicit_only.rb#7
202
+ module RuboCop::Cop::FactoryBot::ConfigurableExplicitOnly
203
+ include ::RuboCop::FactoryBot::Language
204
+
205
+ # @return [Boolean]
206
+ #
207
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/mixin/configurable_explicit_only.rb#16
208
+ def explicit_only?; end
209
+
210
+ # @return [Boolean]
211
+ #
212
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/mixin/configurable_explicit_only.rb#10
213
+ def factory_call?(node); end
214
+ end
215
+
216
+ # Use a consistent style for parentheses in factory_bot calls.
217
+ #
218
+ # @example `EnforcedStyle: require_parentheses` (default)
219
+ #
220
+ # # bad
221
+ # create :user
222
+ # build :login
223
+ #
224
+ # # good
225
+ # create(:user)
226
+ # build(:login)
227
+ # @example `EnforcedStyle: omit_parentheses`
228
+ #
229
+ # # bad
230
+ # create(:user)
231
+ # build(:login)
232
+ #
233
+ # # good
234
+ # create :user
235
+ # build :login
236
+ #
237
+ # # also good
238
+ # # when method name and first argument are not on same line
239
+ # create(
240
+ # :user
241
+ # )
242
+ # build(
243
+ # :user,
244
+ # name: 'foo'
245
+ # )
246
+ # @example `ExplicitOnly: false` (default)
247
+ #
248
+ # # bad - with `EnforcedStyle: require_parentheses`
249
+ # FactoryBot.create :user
250
+ # build :user
251
+ #
252
+ # # good - with `EnforcedStyle: require_parentheses`
253
+ # FactoryBot.create(:user)
254
+ # build(:user)
255
+ # @example `ExplicitOnly: true`
256
+ #
257
+ # # bad - with `EnforcedStyle: require_parentheses`
258
+ # FactoryBot.create :user
259
+ # FactoryBot.build :user
260
+ #
261
+ # # good - with `EnforcedStyle: require_parentheses`
262
+ # FactoryBot.create(:user)
263
+ # FactoryBot.build(:user)
264
+ # create :user
265
+ # build :user
266
+ #
267
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#60
268
+ class RuboCop::Cop::FactoryBot::ConsistentParenthesesStyle < ::RuboCop::Cop::Base
269
+ include ::RuboCop::Cop::ConfigurableEnforcedStyle
270
+ include ::RuboCop::FactoryBot::Language
271
+ include ::RuboCop::Cop::FactoryBot::ConfigurableExplicitOnly
272
+ extend ::RuboCop::Cop::AutoCorrector
273
+
274
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#71
275
+ def factory_call(param0 = T.unsafe(nil)); end
276
+
277
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#82
278
+ def on_send(node); end
279
+
280
+ private
281
+
282
+ # @return [Boolean]
283
+ #
284
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#118
285
+ def ambiguous_without_parentheses?(node); end
286
+
287
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#90
288
+ def register_offense(node); end
289
+
290
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#97
291
+ def register_offense_with_parentheses(node); end
292
+
293
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#107
294
+ def register_offense_without_parentheses(node); end
295
+
296
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#122
297
+ def remove_parentheses(corrector, node); end
298
+
299
+ class << self
300
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#78
301
+ def autocorrect_incompatible_with; end
302
+ end
303
+ end
304
+
305
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#116
306
+ RuboCop::Cop::FactoryBot::ConsistentParenthesesStyle::AMBIGUOUS_TYPES = T.let(T.unsafe(nil), Array)
307
+
308
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#67
309
+ RuboCop::Cop::FactoryBot::ConsistentParenthesesStyle::FACTORY_CALLS = T.let(T.unsafe(nil), Set)
310
+
311
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#66
312
+ RuboCop::Cop::FactoryBot::ConsistentParenthesesStyle::MSG_OMIT_PARENS = T.let(T.unsafe(nil), String)
313
+
314
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#65
315
+ RuboCop::Cop::FactoryBot::ConsistentParenthesesStyle::MSG_REQUIRE_PARENS = T.let(T.unsafe(nil), String)
316
+
317
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#68
318
+ RuboCop::Cop::FactoryBot::ConsistentParenthesesStyle::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set)
319
+
320
+ # Checks for create_list usage.
321
+ #
322
+ # This cop can be configured using the `EnforcedStyle` option
323
+ #
324
+ # @example `EnforcedStyle: create_list` (default)
325
+ # # bad
326
+ # 3.times { create :user }
327
+ # 3.times.map { create :user }
328
+ # [create(:user), create(:user), create(:user)]
329
+ # Array.new(3) { create :user }
330
+ #
331
+ # # good
332
+ # create_list :user, 3
333
+ #
334
+ # # bad
335
+ # 3.times { create :user, age: 18 }
336
+ #
337
+ # # good - index is used to alter the created models attributes
338
+ # 3.times { |n| create :user, age: n }
339
+ #
340
+ # # good - contains a method call, may return different values
341
+ # 3.times { create :user, age: rand }
342
+ # @example `EnforcedStyle: n_times`
343
+ # # bad
344
+ # create_list :user, 3
345
+ # [create(:user), create(:user), create(:user)]
346
+ #
347
+ # # good
348
+ # 3.times.map { create :user }
349
+ # @example `ExplicitOnly: false` (default)
350
+ #
351
+ # # bad - with `EnforcedStyle: create_list`
352
+ # 3.times { FactoryBot.create :user }
353
+ # 3.times { create :user }
354
+ #
355
+ # # good - with `EnforcedStyle: create_list`
356
+ # FactoryBot.create_list :user, 3
357
+ # create_list :user, 3
358
+ # @example `ExplicitOnly: true`
359
+ #
360
+ # # bad - with `EnforcedStyle: create_list`
361
+ # 3.times { FactoryBot.create :user }
362
+ #
363
+ # # good - with `EnforcedStyle: create_list`
364
+ # FactoryBot.create_list :user, 3
365
+ # create_list :user, 3
366
+ # 3.times { create :user }
367
+ #
368
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#61
369
+ class RuboCop::Cop::FactoryBot::CreateList < ::RuboCop::Cop::Base
370
+ include ::RuboCop::Cop::ConfigurableEnforcedStyle
371
+ include ::RuboCop::FactoryBot::Language
372
+ include ::RuboCop::Cop::FactoryBot::ConfigurableExplicitOnly
373
+ extend ::RuboCop::Cop::AutoCorrector
374
+
375
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#101
376
+ def arguments_include_method_call?(param0 = T.unsafe(nil)); end
377
+
378
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#77
379
+ def array_new?(param0 = T.unsafe(nil)); end
380
+
381
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#92
382
+ def block_with_arg_and_used?(param0 = T.unsafe(nil)); end
383
+
384
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#106
385
+ def factory_call(param0 = T.unsafe(nil)); end
386
+
387
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#116
388
+ def factory_calls_in_array?(param0); end
389
+
390
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#111
391
+ def factory_list_call(param0 = T.unsafe(nil)); end
392
+
393
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#82
394
+ def n_times?(param0 = T.unsafe(nil)); end
395
+
396
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#87
397
+ def n_times_map?(param0 = T.unsafe(nil)); end
398
+
399
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#120
400
+ def on_array(node); end
401
+
402
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#131
403
+ def on_block(node); end
404
+
405
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#145
406
+ def on_send(node); end
407
+
408
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#72
409
+ def repetition_block?(param0 = T.unsafe(nil)); end
410
+
411
+ private
412
+
413
+ # For ease of modification, it is replaced with the `n_times` style,
414
+ # but if it is not appropriate for the configured style,
415
+ # it will be replaced in the subsequent autocorrection.
416
+ #
417
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#161
418
+ def autocorrect_same_factory_calls_in_array(corrector, node); end
419
+
420
+ # @return [Boolean]
421
+ #
422
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#172
423
+ def contains_only_factory?(node); end
424
+
425
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#180
426
+ def preferred_message_for_array(node); end
427
+
428
+ # @return [Boolean]
429
+ #
430
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#189
431
+ def same_factory_calls_in_array?(node); end
432
+ end
433
+
434
+ # :nodoc
435
+ #
436
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#195
437
+ module RuboCop::Cop::FactoryBot::CreateList::Corrector
438
+ private
439
+
440
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#198
441
+ def build_options_string(options); end
442
+
443
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#202
444
+ def format_method_call(node, method, arguments); end
445
+
446
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#210
447
+ def format_receiver(receiver); end
448
+ end
449
+
450
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#255
451
+ class RuboCop::Cop::FactoryBot::CreateList::CreateListCorrector
452
+ include ::RuboCop::Cop::FactoryBot::CreateList::Corrector
453
+
454
+ # @return [CreateListCorrector] a new instance of CreateListCorrector
455
+ #
456
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#258
457
+ def initialize(node); end
458
+
459
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#262
460
+ def call(corrector); end
461
+
462
+ private
463
+
464
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#285
465
+ def build_arguments(node, count); end
466
+
467
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#294
468
+ def call_replacement(node); end
469
+
470
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#276
471
+ def call_with_block_replacement(node); end
472
+
473
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#307
474
+ def count_from(node); end
475
+
476
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#320
477
+ def format_block(node); end
478
+
479
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#328
480
+ def format_multiline_block(node); end
481
+
482
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#336
483
+ def format_singleline_block(node); end
484
+
485
+ # Returns the value of attribute node.
486
+ #
487
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#274
488
+ def node; end
489
+ end
490
+
491
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#67
492
+ RuboCop::Cop::FactoryBot::CreateList::MSG_CREATE_LIST = T.let(T.unsafe(nil), String)
493
+
494
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#68
495
+ RuboCop::Cop::FactoryBot::CreateList::MSG_N_TIMES = T.let(T.unsafe(nil), String)
496
+
497
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#69
498
+ RuboCop::Cop::FactoryBot::CreateList::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
499
+
500
+ # :nodoc
501
+ #
502
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#218
503
+ class RuboCop::Cop::FactoryBot::CreateList::TimesCorrector
504
+ include ::RuboCop::Cop::FactoryBot::CreateList::Corrector
505
+
506
+ # @return [TimesCorrector] a new instance of TimesCorrector
507
+ #
508
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#221
509
+ def initialize(node); end
510
+
511
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#225
512
+ def call(corrector); end
513
+
514
+ private
515
+
516
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#247
517
+ def factory_call_block_source; end
518
+
519
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#234
520
+ def generate_n_times_block(node); end
521
+
522
+ # Returns the value of attribute node.
523
+ #
524
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#232
525
+ def node; end
526
+ end
527
+
528
+ # Use definition in factory association instead of hard coding a strategy.
529
+ #
530
+ # @example
531
+ # # bad - only works for one strategy
532
+ # factory :foo do
533
+ # profile { create(:profile) }
534
+ # end
535
+ #
536
+ # # good - implicit
537
+ # factory :foo do
538
+ # profile
539
+ # end
540
+ #
541
+ # # good - explicit
542
+ # factory :foo do
543
+ # association :profile
544
+ # end
545
+ #
546
+ # # good - inline
547
+ # factory :foo do
548
+ # profile { association :profile }
549
+ # end
550
+ #
551
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_association_with_strategy.rb#29
552
+ class RuboCop::Cop::FactoryBot::FactoryAssociationWithStrategy < ::RuboCop::Cop::Base
553
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_association_with_strategy.rb#36
554
+ def factory_declaration(param0 = T.unsafe(nil)); end
555
+
556
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_association_with_strategy.rb#43
557
+ def factory_strategy_association(param0 = T.unsafe(nil)); end
558
+
559
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_association_with_strategy.rb#51
560
+ def on_block(node); end
561
+ end
562
+
563
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_association_with_strategy.rb#33
564
+ RuboCop::Cop::FactoryBot::FactoryAssociationWithStrategy::HARDCODED = T.let(T.unsafe(nil), Set)
565
+
566
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_association_with_strategy.rb#30
567
+ RuboCop::Cop::FactoryBot::FactoryAssociationWithStrategy::MSG = T.let(T.unsafe(nil), String)
568
+
569
+ # Use string value when setting the class attribute explicitly.
570
+ #
571
+ # This cop would promote faster tests by lazy-loading of
572
+ # application files. Also, this could help you suppress potential bugs
573
+ # in combination with external libraries by avoiding a preload of
574
+ # application files from the factory files.
575
+ #
576
+ # @example
577
+ # # bad
578
+ # factory :foo, class: Foo do
579
+ # end
580
+ #
581
+ # # good
582
+ # factory :foo, class: 'Foo' do
583
+ # end
584
+ #
585
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_class_name.rb#22
586
+ class RuboCop::Cop::FactoryBot::FactoryClassName < ::RuboCop::Cop::Base
587
+ extend ::RuboCop::Cop::AutoCorrector
588
+
589
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_class_name.rb#31
590
+ def class_name(param0 = T.unsafe(nil)); end
591
+
592
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_class_name.rb#35
593
+ def on_send(node); end
594
+
595
+ private
596
+
597
+ # @return [Boolean]
598
+ #
599
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_class_name.rb#48
600
+ def allowed?(const_name); end
601
+ end
602
+
603
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_class_name.rb#27
604
+ RuboCop::Cop::FactoryBot::FactoryClassName::ALLOWED_CONSTANTS = T.let(T.unsafe(nil), Array)
605
+
606
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_class_name.rb#25
607
+ RuboCop::Cop::FactoryBot::FactoryClassName::MSG = T.let(T.unsafe(nil), String)
608
+
609
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_class_name.rb#28
610
+ RuboCop::Cop::FactoryBot::FactoryClassName::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
611
+
612
+ # Checks for name style for argument of FactoryBot::Syntax::Methods.
613
+ #
614
+ # @example EnforcedStyle: symbol (default)
615
+ # # bad
616
+ # create('user')
617
+ # build "user", username: "NAME"
618
+ #
619
+ # # good
620
+ # create(:user)
621
+ # build :user, username: "NAME"
622
+ # @example EnforcedStyle: string
623
+ # # bad
624
+ # create(:user)
625
+ # build :user, username: "NAME"
626
+ #
627
+ # # good
628
+ # create('user')
629
+ # build "user", username: "NAME"
630
+ # @example `ExplicitOnly: false` (default)
631
+ #
632
+ # # bad - with `EnforcedStyle: symbol`
633
+ # FactoryBot.create('user')
634
+ # create('user')
635
+ #
636
+ # # good - with `EnforcedStyle: symbol`
637
+ # FactoryBot.create(:user)
638
+ # create(:user)
639
+ # @example `ExplicitOnly: true`
640
+ #
641
+ # # bad - with `EnforcedStyle: symbol`
642
+ # FactoryBot.create(:user)
643
+ # FactoryBot.build "user", username: "NAME"
644
+ #
645
+ # # good - with `EnforcedStyle: symbol`
646
+ # FactoryBot.create('user')
647
+ # FactoryBot.build "user", username: "NAME"
648
+ # FactoryBot.create(:user)
649
+ # create(:user)
650
+ #
651
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#48
652
+ class RuboCop::Cop::FactoryBot::FactoryNameStyle < ::RuboCop::Cop::Base
653
+ include ::RuboCop::Cop::ConfigurableEnforcedStyle
654
+ include ::RuboCop::FactoryBot::Language
655
+ include ::RuboCop::Cop::FactoryBot::ConfigurableExplicitOnly
656
+ extend ::RuboCop::Cop::AutoCorrector
657
+
658
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#59
659
+ def factory_call(param0 = T.unsafe(nil)); end
660
+
661
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#66
662
+ def on_send(node); end
663
+
664
+ private
665
+
666
+ # @return [Boolean]
667
+ #
668
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#82
669
+ def offense_for_string_style?(name); end
670
+
671
+ # @return [Boolean]
672
+ #
673
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#78
674
+ def offense_for_symbol_style?(name); end
675
+
676
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#86
677
+ def register_offense(name, prefer); end
678
+ end
679
+
680
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#55
681
+ RuboCop::Cop::FactoryBot::FactoryNameStyle::FACTORY_CALLS = T.let(T.unsafe(nil), Set)
682
+
683
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#54
684
+ RuboCop::Cop::FactoryBot::FactoryNameStyle::MSG = T.let(T.unsafe(nil), String)
685
+
686
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#56
687
+ RuboCop::Cop::FactoryBot::FactoryNameStyle::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set)
688
+
689
+ # Checks for redundant `factory` option.
690
+ #
691
+ # @example
692
+ # # bad
693
+ # association :user, factory: :user
694
+ #
695
+ # # good
696
+ # association :user
697
+ #
698
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/redundant_factory_option.rb#14
699
+ class RuboCop::Cop::FactoryBot::RedundantFactoryOption < ::RuboCop::Cop::Base
700
+ include ::RuboCop::Cop::RangeHelp
701
+ extend ::RuboCop::Cop::AutoCorrector
702
+
703
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/redundant_factory_option.rb#24
704
+ def association_with_a_factory_option(param0 = T.unsafe(nil)); end
705
+
706
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/redundant_factory_option.rb#42
707
+ def on_send(node); end
708
+
709
+ private
710
+
711
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/redundant_factory_option.rb#55
712
+ def autocorrect(corrector, node); end
713
+ end
714
+
715
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/redundant_factory_option.rb#19
716
+ RuboCop::Cop::FactoryBot::RedundantFactoryOption::MSG = T.let(T.unsafe(nil), String)
717
+
718
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/redundant_factory_option.rb#21
719
+ RuboCop::Cop::FactoryBot::RedundantFactoryOption::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
720
+
721
+ # Use shorthands from `FactoryBot::Syntax::Methods` in your specs.
722
+ #
723
+ # @example
724
+ # # bad
725
+ # FactoryBot.create(:bar)
726
+ # FactoryBot.build(:bar)
727
+ # FactoryBot.attributes_for(:bar)
728
+ #
729
+ # # good
730
+ # create(:bar)
731
+ # build(:bar)
732
+ # attributes_for(:bar)
733
+ #
734
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/syntax_methods.rb#48
735
+ class RuboCop::Cop::FactoryBot::SyntaxMethods < ::RuboCop::Cop::Base
736
+ include ::RuboCop::Cop::RangeHelp
737
+ include ::RuboCop::FactoryBot::Language
738
+ extend ::RuboCop::Cop::AutoCorrector
739
+
740
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/syntax_methods.rb#73
741
+ def on_send(node); end
742
+
743
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/syntax_methods.rb#58
744
+ def spec_group?(param0 = T.unsafe(nil)); end
745
+
746
+ private
747
+
748
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/syntax_methods.rb#87
749
+ def crime_scene(node); end
750
+
751
+ # @return [Boolean]
752
+ #
753
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/syntax_methods.rb#109
754
+ def example_group_root?(node); end
755
+
756
+ # @return [Boolean]
757
+ #
758
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/syntax_methods.rb#113
759
+ def example_group_root_with_siblings?(node); end
760
+
761
+ # @return [Boolean]
762
+ #
763
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/syntax_methods.rb#101
764
+ def inside_example_group?(node); end
765
+
766
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/syntax_methods.rb#94
767
+ def offense(node); end
768
+ end
769
+
770
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/syntax_methods.rb#53
771
+ RuboCop::Cop::FactoryBot::SyntaxMethods::MSG = T.let(T.unsafe(nil), String)
772
+
773
+ # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/syntax_methods.rb#55
774
+ RuboCop::Cop::FactoryBot::SyntaxMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set)
775
+
776
+ # RuboCop factory_bot project namespace
777
+ #
778
+ # source://rubocop-factory_bot//lib/rubocop/factory_bot/factory_bot.rb#5
779
+ module RuboCop::FactoryBot
780
+ class << self
781
+ # source://rubocop-factory_bot//lib/rubocop/factory_bot/factory_bot.rb#54
782
+ def attribute_defining_methods; end
783
+
784
+ # source://rubocop-factory_bot//lib/rubocop/factory_bot/factory_bot.rb#58
785
+ def reserved_methods; end
786
+ end
787
+ end
788
+
789
+ # source://rubocop-factory_bot//lib/rubocop/factory_bot/factory_bot.rb#6
790
+ RuboCop::FactoryBot::ATTRIBUTE_DEFINING_METHODS = T.let(T.unsafe(nil), Array)
791
+
792
+ # source://rubocop-factory_bot//lib/rubocop/factory_bot/factory_bot.rb#29
793
+ RuboCop::FactoryBot::DEFINITION_PROXY_METHODS = T.let(T.unsafe(nil), Array)
794
+
795
+ # Contains node matchers for common factory_bot DSL.
796
+ #
797
+ # source://rubocop-factory_bot//lib/rubocop/factory_bot/language.rb#6
798
+ module RuboCop::FactoryBot::Language
799
+ extend ::RuboCop::AST::NodePattern::Macros
800
+
801
+ # source://rubocop-factory_bot//lib/rubocop/factory_bot/language.rb#30
802
+ def factory_bot?(param0 = T.unsafe(nil)); end
803
+ end
804
+
805
+ # source://rubocop-factory_bot//lib/rubocop/factory_bot/language.rb#9
806
+ RuboCop::FactoryBot::Language::METHODS = T.let(T.unsafe(nil), Set)
807
+
808
+ # source://rubocop-factory_bot//lib/rubocop/factory_bot/factory_bot.rb#42
809
+ RuboCop::FactoryBot::RESERVED_METHODS = T.let(T.unsafe(nil), Array)
810
+
811
+ # source://rubocop-factory_bot//lib/rubocop/factory_bot/factory_bot.rb#14
812
+ RuboCop::FactoryBot::UNPROXIED_METHODS = T.let(T.unsafe(nil), Array)