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