danger-packwerk 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +121 -0
- data/lib/danger-packwerk/basic_reference_offense.rb +106 -0
- data/lib/danger-packwerk/danger_deprecated_references_yml_changes.rb +140 -0
- data/lib/danger-packwerk/danger_packwerk.rb +104 -0
- data/lib/danger-packwerk/packwerk_wrapper.rb +65 -0
- data/lib/danger-packwerk/private/default_offenses_formatter.rb +38 -0
- data/lib/danger-packwerk/private/deprecated_references.rb +65 -0
- data/lib/danger-packwerk/private.rb +14 -0
- data/lib/danger-packwerk/version.rb +6 -0
- data/lib/danger-packwerk/violation_diff.rb +13 -0
- data/lib/danger-packwerk.rb +12 -0
- data/lib/danger_plugin.rb +4 -0
- data/sorbet/config +3 -0
- data/sorbet/rbi/gems/danger@8.5.0.rbi +122 -0
- data/sorbet/rbi/gems/packwerk@1.3.2.rbi +714 -0
- data/sorbet/rbi/todo.rbi +1 -0
- data/sorbet/tapioca/require.rb +2 -0
- metadata +218 -0
@@ -0,0 +1,714 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `packwerk` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem packwerk`.
|
6
|
+
|
7
|
+
module Packwerk
|
8
|
+
end
|
9
|
+
|
10
|
+
module Packwerk::ApplicationLoadPaths
|
11
|
+
class << self
|
12
|
+
sig { returns(T::Array[::String]) }
|
13
|
+
def extract_application_autoload_paths; end
|
14
|
+
|
15
|
+
sig { params(root: ::String, environment: ::String).returns(T::Array[::String]) }
|
16
|
+
def extract_relevant_paths(root, environment); end
|
17
|
+
|
18
|
+
sig do
|
19
|
+
params(
|
20
|
+
all_paths: T::Array[::String],
|
21
|
+
bundle_path: ::Pathname,
|
22
|
+
rails_root: ::Pathname
|
23
|
+
).returns(T::Array[::Pathname])
|
24
|
+
end
|
25
|
+
def filter_relevant_paths(all_paths, bundle_path: T.unsafe(nil), rails_root: T.unsafe(nil)); end
|
26
|
+
|
27
|
+
sig { params(paths: T::Array[::Pathname], rails_root: ::Pathname).returns(T::Array[::String]) }
|
28
|
+
def relative_path_strings(paths, rails_root: T.unsafe(nil)); end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
sig { params(paths: T::Array[T.untyped]).void }
|
33
|
+
def assert_load_paths_present(paths); end
|
34
|
+
|
35
|
+
sig { params(root: ::String, environment: ::String).void }
|
36
|
+
def require_application(root, environment); end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
class Packwerk::ApplicationValidator
|
41
|
+
def initialize(config_file_path:, configuration:, environment:); end
|
42
|
+
|
43
|
+
def check_acyclic_graph; end
|
44
|
+
def check_all; end
|
45
|
+
def check_application_structure; end
|
46
|
+
def check_autoload_path_cache; end
|
47
|
+
def check_inflection_file; end
|
48
|
+
def check_package_manifest_paths; end
|
49
|
+
def check_package_manifest_syntax; end
|
50
|
+
def check_package_manifests_for_privacy; end
|
51
|
+
def check_root_package_exists; end
|
52
|
+
def check_valid_package_dependencies; end
|
53
|
+
|
54
|
+
private
|
55
|
+
|
56
|
+
def assert_constants_can_be_loaded(constants); end
|
57
|
+
def build_cycle_strings(cycles); end
|
58
|
+
def check_private_constant_location(name, location, config_file_path); end
|
59
|
+
def format_yaml_strings(list); end
|
60
|
+
def invalid_package_path?(path); end
|
61
|
+
def merge_results(results, separator: T.unsafe(nil), errors_headline: T.unsafe(nil)); end
|
62
|
+
def package_glob; end
|
63
|
+
def package_manifests(glob_pattern = T.unsafe(nil)); end
|
64
|
+
def package_manifests_settings_for(setting); end
|
65
|
+
def package_set; end
|
66
|
+
def private_constant_unresolvable(name, config_file_path); end
|
67
|
+
def relative_path(path); end
|
68
|
+
def relative_paths(paths); end
|
69
|
+
end
|
70
|
+
|
71
|
+
class Packwerk::ApplicationValidator::Result < ::Struct
|
72
|
+
def error_value; end
|
73
|
+
def error_value=(_); end
|
74
|
+
def ok?; end
|
75
|
+
|
76
|
+
class << self
|
77
|
+
def [](*_arg0); end
|
78
|
+
def inspect; end
|
79
|
+
def members; end
|
80
|
+
def new(*_arg0); end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
Packwerk::AssociationInspector::CustomAssociations = T.type_alias { T.any(T::Array[::Symbol], T::Set[::Symbol]) }
|
85
|
+
Packwerk::AssociationInspector::RAILS_ASSOCIATIONS = T.let(T.unsafe(nil), Set)
|
86
|
+
|
87
|
+
module Packwerk::Checker
|
88
|
+
interface!
|
89
|
+
|
90
|
+
sig { abstract.params(reference: ::Packwerk::Reference).returns(T::Boolean) }
|
91
|
+
def invalid_reference?(reference); end
|
92
|
+
|
93
|
+
sig { abstract.returns(::Packwerk::ViolationType) }
|
94
|
+
def violation_type; end
|
95
|
+
end
|
96
|
+
|
97
|
+
class Packwerk::Cli
|
98
|
+
sig do
|
99
|
+
params(
|
100
|
+
configuration: T.nilable(::Packwerk::Configuration),
|
101
|
+
out: T.any(::IO, ::StringIO),
|
102
|
+
err_out: T.any(::IO, ::StringIO),
|
103
|
+
environment: ::String,
|
104
|
+
style: ::Packwerk::OutputStyle,
|
105
|
+
offenses_formatter: T.nilable(::Packwerk::OffensesFormatter)
|
106
|
+
).void
|
107
|
+
end
|
108
|
+
def initialize(configuration: T.unsafe(nil), out: T.unsafe(nil), err_out: T.unsafe(nil), environment: T.unsafe(nil), style: T.unsafe(nil), offenses_formatter: T.unsafe(nil)); end
|
109
|
+
|
110
|
+
sig { params(args: T::Array[::String]).returns(T::Boolean) }
|
111
|
+
def execute_command(args); end
|
112
|
+
|
113
|
+
sig { params(args: T::Array[::String]).returns(T.noreturn) }
|
114
|
+
def run(args); end
|
115
|
+
|
116
|
+
private
|
117
|
+
|
118
|
+
def fetch_files_to_process(paths); end
|
119
|
+
def generate_configs; end
|
120
|
+
def init; end
|
121
|
+
def list_validation_errors(result); end
|
122
|
+
def output_result(result); end
|
123
|
+
def parse_run(paths); end
|
124
|
+
def update(paths); end
|
125
|
+
def validate(_paths); end
|
126
|
+
end
|
127
|
+
|
128
|
+
class Packwerk::Configuration
|
129
|
+
def initialize(configs = T.unsafe(nil), config_path: T.unsafe(nil)); end
|
130
|
+
|
131
|
+
def config_path; end
|
132
|
+
def custom_associations; end
|
133
|
+
def exclude; end
|
134
|
+
def include; end
|
135
|
+
def inflections_file; end
|
136
|
+
def load_paths; end
|
137
|
+
def package_paths; end
|
138
|
+
def parallel?; end
|
139
|
+
def root_path; end
|
140
|
+
|
141
|
+
class << self
|
142
|
+
def from_path(path = T.unsafe(nil)); end
|
143
|
+
|
144
|
+
private
|
145
|
+
|
146
|
+
def from_packwerk_config(path); end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
Packwerk::Configuration::DEFAULT_CONFIG_PATH = T.let(T.unsafe(nil), String)
|
151
|
+
Packwerk::Configuration::DEFAULT_EXCLUDE_GLOBS = T.let(T.unsafe(nil), Array)
|
152
|
+
Packwerk::Configuration::DEFAULT_INCLUDE_GLOBS = T.let(T.unsafe(nil), Array)
|
153
|
+
|
154
|
+
class Packwerk::ConstantDiscovery
|
155
|
+
def initialize(constant_resolver:, packages:); end
|
156
|
+
|
157
|
+
def context_for(const_name, current_namespace_path: T.unsafe(nil)); end
|
158
|
+
def package_from_path(path); end
|
159
|
+
end
|
160
|
+
|
161
|
+
class Packwerk::ConstantDiscovery::ConstantContext < ::Struct
|
162
|
+
def location; end
|
163
|
+
def location=(_); end
|
164
|
+
def name; end
|
165
|
+
def name=(_); end
|
166
|
+
def package; end
|
167
|
+
def package=(_); end
|
168
|
+
def public?; end
|
169
|
+
|
170
|
+
class << self
|
171
|
+
def [](*_arg0); end
|
172
|
+
def inspect; end
|
173
|
+
def members; end
|
174
|
+
def new(*_arg0); end
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
class Packwerk::DependencyChecker
|
179
|
+
include ::Packwerk::Checker
|
180
|
+
|
181
|
+
sig { override.params(reference: ::Packwerk::Reference).returns(T::Boolean) }
|
182
|
+
def invalid_reference?(reference); end
|
183
|
+
|
184
|
+
sig { override.returns(::Packwerk::ViolationType) }
|
185
|
+
def violation_type; end
|
186
|
+
end
|
187
|
+
|
188
|
+
class Packwerk::DeprecatedReferences
|
189
|
+
sig { params(package: ::Packwerk::Package, filepath: ::String).void }
|
190
|
+
def initialize(package, filepath); end
|
191
|
+
|
192
|
+
sig { params(reference: ::Packwerk::Reference, violation_type: ::Packwerk::ViolationType).returns(T::Boolean) }
|
193
|
+
def add_entries(reference, violation_type); end
|
194
|
+
|
195
|
+
sig { void }
|
196
|
+
def dump; end
|
197
|
+
|
198
|
+
sig { params(reference: ::Packwerk::Reference, violation_type: ::Packwerk::ViolationType).returns(T::Boolean) }
|
199
|
+
def listed?(reference, violation_type:); end
|
200
|
+
|
201
|
+
sig { returns(T::Boolean) }
|
202
|
+
def stale_violations?; end
|
203
|
+
|
204
|
+
private
|
205
|
+
|
206
|
+
sig { returns(T::Hash[T.untyped, T.untyped]) }
|
207
|
+
def deprecated_references; end
|
208
|
+
|
209
|
+
sig { params(filepath: ::String).returns(T::Hash[T.untyped, T.untyped]) }
|
210
|
+
def load_yaml(filepath); end
|
211
|
+
|
212
|
+
sig { returns(T::Hash[T.untyped, T.untyped]) }
|
213
|
+
def prepare_entries_for_dump; end
|
214
|
+
end
|
215
|
+
|
216
|
+
class Packwerk::FileProcessor
|
217
|
+
def initialize(node_processor_factory:, parser_factory: T.unsafe(nil)); end
|
218
|
+
|
219
|
+
def call(file_path); end
|
220
|
+
end
|
221
|
+
|
222
|
+
class Packwerk::FileProcessor::UnknownFileTypeResult < ::Packwerk::Offense
|
223
|
+
def initialize(file:); end
|
224
|
+
end
|
225
|
+
|
226
|
+
class Packwerk::FilesForProcessing
|
227
|
+
def initialize(paths, configuration); end
|
228
|
+
|
229
|
+
def files; end
|
230
|
+
|
231
|
+
private
|
232
|
+
|
233
|
+
def configured_excluded_files; end
|
234
|
+
def configured_included_files; end
|
235
|
+
def custom_files; end
|
236
|
+
def custom_included_files(path); end
|
237
|
+
def files_for_globs(globs); end
|
238
|
+
|
239
|
+
class << self
|
240
|
+
def fetch(paths:, configuration:); end
|
241
|
+
end
|
242
|
+
end
|
243
|
+
|
244
|
+
module Packwerk::Formatters
|
245
|
+
end
|
246
|
+
|
247
|
+
class Packwerk::Formatters::OffensesFormatter
|
248
|
+
include ::Packwerk::OffensesFormatter
|
249
|
+
|
250
|
+
sig { params(style: ::Packwerk::OutputStyle).void }
|
251
|
+
def initialize(style: T.unsafe(nil)); end
|
252
|
+
|
253
|
+
sig { override.params(offenses: T::Array[T.nilable(::Packwerk::Offense)]).returns(::String) }
|
254
|
+
def show_offenses(offenses); end
|
255
|
+
|
256
|
+
sig { override.params(offense_collection: ::Packwerk::OffenseCollection).returns(::String) }
|
257
|
+
def show_stale_violations(offense_collection); end
|
258
|
+
|
259
|
+
private
|
260
|
+
|
261
|
+
sig { params(offenses: T::Array[T.nilable(::Packwerk::Offense)]).returns(::String) }
|
262
|
+
def offenses_list(offenses); end
|
263
|
+
|
264
|
+
sig { params(offenses: T::Array[T.nilable(::Packwerk::Offense)]).returns(::String) }
|
265
|
+
def offenses_summary(offenses); end
|
266
|
+
end
|
267
|
+
|
268
|
+
class Packwerk::Formatters::ProgressFormatter
|
269
|
+
sig { params(out: T.any(::IO, ::StringIO), style: ::Packwerk::OutputStyle).void }
|
270
|
+
def initialize(out, style: T.unsafe(nil)); end
|
271
|
+
|
272
|
+
def finished(execution_time); end
|
273
|
+
def interrupted; end
|
274
|
+
def mark_as_failed; end
|
275
|
+
def mark_as_inspected; end
|
276
|
+
def started(target_files); end
|
277
|
+
def started_validation; end
|
278
|
+
end
|
279
|
+
|
280
|
+
module Packwerk::Generators
|
281
|
+
end
|
282
|
+
|
283
|
+
class Packwerk::Generators::ConfigurationFile
|
284
|
+
sig { params(load_paths: T::Array[::String], root: ::String, out: T.any(::IO, ::StringIO)).void }
|
285
|
+
def initialize(load_paths:, root:, out: T.unsafe(nil)); end
|
286
|
+
|
287
|
+
sig { returns(T::Boolean) }
|
288
|
+
def generate; end
|
289
|
+
|
290
|
+
private
|
291
|
+
|
292
|
+
def render; end
|
293
|
+
def set_template_variables; end
|
294
|
+
def template; end
|
295
|
+
|
296
|
+
class << self
|
297
|
+
def generate(load_paths:, root:, out:); end
|
298
|
+
end
|
299
|
+
end
|
300
|
+
|
301
|
+
Packwerk::Generators::ConfigurationFile::CONFIGURATION_TEMPLATE_FILE_PATH = T.let(T.unsafe(nil), String)
|
302
|
+
|
303
|
+
class Packwerk::Generators::InflectionsFile
|
304
|
+
def initialize(root, out: T.unsafe(nil)); end
|
305
|
+
|
306
|
+
sig { returns(T::Boolean) }
|
307
|
+
def generate; end
|
308
|
+
|
309
|
+
class << self
|
310
|
+
def generate(root:, out:); end
|
311
|
+
end
|
312
|
+
end
|
313
|
+
|
314
|
+
class Packwerk::Generators::RootPackage
|
315
|
+
def initialize(root:, out: T.unsafe(nil)); end
|
316
|
+
|
317
|
+
sig { returns(T::Boolean) }
|
318
|
+
def generate; end
|
319
|
+
|
320
|
+
class << self
|
321
|
+
def generate(root:, out:); end
|
322
|
+
end
|
323
|
+
end
|
324
|
+
|
325
|
+
class Packwerk::Graph
|
326
|
+
def initialize(*edges); end
|
327
|
+
|
328
|
+
def acyclic?; end
|
329
|
+
def cycles; end
|
330
|
+
|
331
|
+
private
|
332
|
+
|
333
|
+
def add_cycle(cycle); end
|
334
|
+
def neighbours(node); end
|
335
|
+
def nodes; end
|
336
|
+
def process; end
|
337
|
+
def visit(node, visited_nodes: T.unsafe(nil), path: T.unsafe(nil)); end
|
338
|
+
end
|
339
|
+
|
340
|
+
module Packwerk::Inflections
|
341
|
+
end
|
342
|
+
|
343
|
+
class Packwerk::Inflections::Custom
|
344
|
+
def initialize(custom_inflection_file = T.unsafe(nil)); end
|
345
|
+
|
346
|
+
def apply_to(inflections_object); end
|
347
|
+
def inflections; end
|
348
|
+
def inflections=(_arg0); end
|
349
|
+
end
|
350
|
+
|
351
|
+
Packwerk::Inflections::Custom::SUPPORTED_INFLECTION_METHODS = T.let(T.unsafe(nil), Array)
|
352
|
+
|
353
|
+
module Packwerk::Inflections::Default
|
354
|
+
class << self
|
355
|
+
def apply_to(inflections_object); end
|
356
|
+
end
|
357
|
+
end
|
358
|
+
|
359
|
+
class Packwerk::Inflector
|
360
|
+
sig { params(custom_inflector: ::Packwerk::Inflections::Custom).void }
|
361
|
+
def initialize(custom_inflector:); end
|
362
|
+
|
363
|
+
def inflections(_ = T.unsafe(nil)); end
|
364
|
+
def pluralize(word, count = T.unsafe(nil)); end
|
365
|
+
|
366
|
+
class << self
|
367
|
+
def default; end
|
368
|
+
|
369
|
+
sig { params(inflections_file: ::String).returns(::Packwerk::Inflector) }
|
370
|
+
def from_file(inflections_file); end
|
371
|
+
end
|
372
|
+
end
|
373
|
+
|
374
|
+
module Packwerk::Node
|
375
|
+
class << self
|
376
|
+
def class?(node); end
|
377
|
+
def class_or_module_name(class_or_module_node); end
|
378
|
+
def constant?(node); end
|
379
|
+
def constant_assignment?(node); end
|
380
|
+
def constant_name(constant_node); end
|
381
|
+
def each_child(node); end
|
382
|
+
def enclosing_namespace_path(starting_node, ancestors:); end
|
383
|
+
def hash?(node); end
|
384
|
+
def literal_value(string_or_symbol_node); end
|
385
|
+
def location(node); end
|
386
|
+
def method_arguments(method_call_node); end
|
387
|
+
def method_call?(node); end
|
388
|
+
def method_name(method_call_node); end
|
389
|
+
def module_name_from_definition(node); end
|
390
|
+
def name_location(node); end
|
391
|
+
def parent_class(class_node); end
|
392
|
+
|
393
|
+
def parent_module_name(ancestors:); end
|
394
|
+
|
395
|
+
def string?(node); end
|
396
|
+
def symbol?(node); end
|
397
|
+
def value_from_hash(hash_node, key); end
|
398
|
+
|
399
|
+
private
|
400
|
+
|
401
|
+
def hash_pair_key(hash_pair_node); end
|
402
|
+
def hash_pair_value(hash_pair_node); end
|
403
|
+
def hash_pairs(hash_node); end
|
404
|
+
def method_call_node(block_node); end
|
405
|
+
def module_creation?(node); end
|
406
|
+
def name_from_block_definition(node); end
|
407
|
+
def name_part_from_definition(node); end
|
408
|
+
def receiver(method_call_or_block_node); end
|
409
|
+
def type_of(node); end
|
410
|
+
end
|
411
|
+
end
|
412
|
+
|
413
|
+
class Packwerk::Node::Location < ::Struct
|
414
|
+
def column; end
|
415
|
+
def column=(_); end
|
416
|
+
def line; end
|
417
|
+
def line=(_); end
|
418
|
+
|
419
|
+
class << self
|
420
|
+
def [](*_arg0); end
|
421
|
+
def inspect; end
|
422
|
+
def members; end
|
423
|
+
def new(*_arg0); end
|
424
|
+
end
|
425
|
+
end
|
426
|
+
|
427
|
+
class Packwerk::Node::TypeError < ::ArgumentError; end
|
428
|
+
|
429
|
+
class Packwerk::NodeVisitor
|
430
|
+
def initialize(node_processor:); end
|
431
|
+
|
432
|
+
def visit(node, ancestors:, result:); end
|
433
|
+
end
|
434
|
+
|
435
|
+
class Packwerk::Offense
|
436
|
+
sig { params(file: ::String, message: ::String, location: T.nilable(::Packwerk::Node::Location)).void }
|
437
|
+
def initialize(file:, message:, location: T.unsafe(nil)); end
|
438
|
+
|
439
|
+
def file; end
|
440
|
+
def location; end
|
441
|
+
def message; end
|
442
|
+
|
443
|
+
sig { params(style: ::Packwerk::OutputStyle).returns(::String) }
|
444
|
+
def to_s(style = T.unsafe(nil)); end
|
445
|
+
end
|
446
|
+
|
447
|
+
class Packwerk::OffenseCollection
|
448
|
+
sig do
|
449
|
+
params(
|
450
|
+
root_path: ::String,
|
451
|
+
deprecated_references: T::Hash[::Packwerk::Package, ::Packwerk::DeprecatedReferences]
|
452
|
+
).void
|
453
|
+
end
|
454
|
+
def initialize(root_path, deprecated_references = T.unsafe(nil)); end
|
455
|
+
|
456
|
+
sig { params(offense: ::Packwerk::Offense).void }
|
457
|
+
def add_offense(offense); end
|
458
|
+
|
459
|
+
sig { void }
|
460
|
+
def dump_deprecated_references_files; end
|
461
|
+
|
462
|
+
sig { returns(T::Array[::Packwerk::Offense]) }
|
463
|
+
def errors; end
|
464
|
+
|
465
|
+
sig { params(offense: ::Packwerk::Offense).returns(T::Boolean) }
|
466
|
+
def listed?(offense); end
|
467
|
+
|
468
|
+
sig { returns(T::Array[::Packwerk::ReferenceOffense]) }
|
469
|
+
def new_violations; end
|
470
|
+
|
471
|
+
sig { returns(T::Array[::Packwerk::Offense]) }
|
472
|
+
def outstanding_offenses; end
|
473
|
+
|
474
|
+
sig { returns(T::Boolean) }
|
475
|
+
def stale_violations?; end
|
476
|
+
|
477
|
+
private
|
478
|
+
|
479
|
+
sig { params(package: ::Packwerk::Package).returns(::String) }
|
480
|
+
def deprecated_references_file_for(package); end
|
481
|
+
|
482
|
+
sig { params(package: ::Packwerk::Package).returns(::Packwerk::DeprecatedReferences) }
|
483
|
+
def deprecated_references_for(package); end
|
484
|
+
end
|
485
|
+
|
486
|
+
module Packwerk::OffensesFormatter
|
487
|
+
interface!
|
488
|
+
|
489
|
+
sig { abstract.params(offenses: T::Array[T.nilable(::Packwerk::Offense)]).returns(::String) }
|
490
|
+
def show_offenses(offenses); end
|
491
|
+
|
492
|
+
sig { abstract.params(offense_collection: ::Packwerk::OffenseCollection).returns(::String) }
|
493
|
+
def show_stale_violations(offense_collection); end
|
494
|
+
end
|
495
|
+
|
496
|
+
module Packwerk::OutputStyle
|
497
|
+
interface!
|
498
|
+
|
499
|
+
sig { abstract.returns(::String) }
|
500
|
+
def error; end
|
501
|
+
|
502
|
+
sig { abstract.returns(::String) }
|
503
|
+
def filename; end
|
504
|
+
|
505
|
+
sig { abstract.returns(::String) }
|
506
|
+
def reset; end
|
507
|
+
end
|
508
|
+
|
509
|
+
module Packwerk::OutputStyles
|
510
|
+
end
|
511
|
+
|
512
|
+
class Packwerk::OutputStyles::Coloured
|
513
|
+
include ::Packwerk::OutputStyle
|
514
|
+
|
515
|
+
sig { override.returns(::String) }
|
516
|
+
def error; end
|
517
|
+
|
518
|
+
sig { override.returns(::String) }
|
519
|
+
def filename; end
|
520
|
+
|
521
|
+
sig { override.returns(::String) }
|
522
|
+
def reset; end
|
523
|
+
end
|
524
|
+
|
525
|
+
class Packwerk::OutputStyles::Plain
|
526
|
+
include ::Packwerk::OutputStyle
|
527
|
+
|
528
|
+
sig { override.returns(::String) }
|
529
|
+
def error; end
|
530
|
+
|
531
|
+
sig { override.returns(::String) }
|
532
|
+
def filename; end
|
533
|
+
|
534
|
+
sig { override.returns(::String) }
|
535
|
+
def reset; end
|
536
|
+
end
|
537
|
+
|
538
|
+
class Packwerk::Package
|
539
|
+
include ::Comparable
|
540
|
+
|
541
|
+
def initialize(name:, config:); end
|
542
|
+
|
543
|
+
def <=>(other); end
|
544
|
+
def dependencies; end
|
545
|
+
def dependency?(package); end
|
546
|
+
def enforce_dependencies?; end
|
547
|
+
def enforce_privacy; end
|
548
|
+
def eql?(other); end
|
549
|
+
def hash; end
|
550
|
+
def name; end
|
551
|
+
def package_path?(path); end
|
552
|
+
def public_path; end
|
553
|
+
def public_path?(path); end
|
554
|
+
def root?; end
|
555
|
+
def to_s; end
|
556
|
+
def user_defined_public_path; end
|
557
|
+
end
|
558
|
+
|
559
|
+
Packwerk::Package::ROOT_PACKAGE_NAME = T.let(T.unsafe(nil), String)
|
560
|
+
|
561
|
+
class Packwerk::PackageSet
|
562
|
+
include ::Enumerable
|
563
|
+
|
564
|
+
def initialize(packages); end
|
565
|
+
|
566
|
+
def each(&blk); end
|
567
|
+
def fetch(name); end
|
568
|
+
def package_from_path(file_path); end
|
569
|
+
|
570
|
+
class << self
|
571
|
+
def load_all_from(root_path, package_pathspec: T.unsafe(nil)); end
|
572
|
+
def package_paths(root_path, package_pathspec); end
|
573
|
+
|
574
|
+
private
|
575
|
+
|
576
|
+
def create_root_package_if_none_in(packages); end
|
577
|
+
end
|
578
|
+
end
|
579
|
+
|
580
|
+
Packwerk::PackageSet::PACKAGE_CONFIG_FILENAME = T.let(T.unsafe(nil), String)
|
581
|
+
|
582
|
+
class Packwerk::ParseRun
|
583
|
+
def initialize(files:, configuration:, progress_formatter: T.unsafe(nil), offenses_formatter: T.unsafe(nil)); end
|
584
|
+
|
585
|
+
def check; end
|
586
|
+
def detect_stale_violations; end
|
587
|
+
def update_deprecations; end
|
588
|
+
|
589
|
+
private
|
590
|
+
|
591
|
+
def find_offenses(show_errors: T.unsafe(nil)); end
|
592
|
+
def serial_find_offenses; end
|
593
|
+
def update_progress(failed: T.unsafe(nil)); end
|
594
|
+
end
|
595
|
+
|
596
|
+
class Packwerk::ParsedConstantDefinitions
|
597
|
+
def initialize(root_node:); end
|
598
|
+
|
599
|
+
def local_reference?(constant_name, location: T.unsafe(nil), namespace_path: T.unsafe(nil)); end
|
600
|
+
|
601
|
+
private
|
602
|
+
|
603
|
+
def add_definition(constant_name, current_namespace_path, location); end
|
604
|
+
def collect_local_definitions_from_root(node, current_namespace_path = T.unsafe(nil)); end
|
605
|
+
|
606
|
+
class << self
|
607
|
+
def reference_qualifications(constant_name, namespace_path:); end
|
608
|
+
end
|
609
|
+
end
|
610
|
+
|
611
|
+
module Packwerk::Parsers; end
|
612
|
+
|
613
|
+
class Packwerk::Parsers::Factory
|
614
|
+
include ::Singleton
|
615
|
+
extend ::Singleton::SingletonClassMethods
|
616
|
+
|
617
|
+
def erb_parser_class; end
|
618
|
+
def erb_parser_class=(klass); end
|
619
|
+
def for_path(path); end
|
620
|
+
end
|
621
|
+
|
622
|
+
Packwerk::Parsers::Factory::ERB_REGEX = T.let(T.unsafe(nil), Regexp)
|
623
|
+
Packwerk::Parsers::Factory::RUBY_REGEX = T.let(T.unsafe(nil), Regexp)
|
624
|
+
|
625
|
+
class Packwerk::Parsers::ParseError < ::StandardError
|
626
|
+
def initialize(result); end
|
627
|
+
|
628
|
+
def result; end
|
629
|
+
end
|
630
|
+
|
631
|
+
class Packwerk::Parsers::ParseResult < ::Packwerk::Offense; end
|
632
|
+
|
633
|
+
class Packwerk::Parsers::Ruby
|
634
|
+
def initialize(parser_class: T.unsafe(nil)); end
|
635
|
+
|
636
|
+
def call(io:, file_path: T.unsafe(nil)); end
|
637
|
+
end
|
638
|
+
|
639
|
+
class Packwerk::PrivacyChecker
|
640
|
+
include ::Packwerk::Checker
|
641
|
+
|
642
|
+
sig { override.params(reference: ::Packwerk::Reference).returns(T::Boolean) }
|
643
|
+
def invalid_reference?(reference); end
|
644
|
+
|
645
|
+
sig { override.returns(::Packwerk::ViolationType) }
|
646
|
+
def violation_type; end
|
647
|
+
|
648
|
+
private
|
649
|
+
|
650
|
+
sig { params(privacy_option: T.nilable(T.any(T::Array[::String], T::Boolean))).returns(T::Boolean) }
|
651
|
+
def enforcement_disabled?(privacy_option); end
|
652
|
+
|
653
|
+
sig do
|
654
|
+
params(
|
655
|
+
constant: ::Packwerk::ConstantDiscovery::ConstantContext,
|
656
|
+
explicitly_private_constants: T::Array[::String]
|
657
|
+
).returns(T::Boolean)
|
658
|
+
end
|
659
|
+
def explicitly_private_constant?(constant, explicitly_private_constants:); end
|
660
|
+
end
|
661
|
+
|
662
|
+
class Packwerk::Reference < ::Struct
|
663
|
+
def constant; end
|
664
|
+
def constant=(_); end
|
665
|
+
def relative_path; end
|
666
|
+
def relative_path=(_); end
|
667
|
+
def source_package; end
|
668
|
+
def source_package=(_); end
|
669
|
+
|
670
|
+
class << self
|
671
|
+
def [](*_arg0); end
|
672
|
+
def inspect; end
|
673
|
+
def members; end
|
674
|
+
def new(*_arg0); end
|
675
|
+
end
|
676
|
+
end
|
677
|
+
|
678
|
+
class Packwerk::ReferenceOffense < ::Packwerk::Offense
|
679
|
+
sig do
|
680
|
+
params(
|
681
|
+
reference: ::Packwerk::Reference,
|
682
|
+
violation_type: ::Packwerk::ViolationType,
|
683
|
+
location: T.nilable(::Packwerk::Node::Location)
|
684
|
+
).void
|
685
|
+
end
|
686
|
+
def initialize(reference:, violation_type:, location: T.unsafe(nil)); end
|
687
|
+
|
688
|
+
def reference; end
|
689
|
+
def violation_type; end
|
690
|
+
|
691
|
+
private
|
692
|
+
|
693
|
+
def build_message(reference, violation_type); end
|
694
|
+
end
|
695
|
+
|
696
|
+
class Packwerk::Result < ::T::Struct
|
697
|
+
prop :message, ::String
|
698
|
+
prop :status, T::Boolean
|
699
|
+
|
700
|
+
class << self
|
701
|
+
def inherited(s); end
|
702
|
+
end
|
703
|
+
end
|
704
|
+
|
705
|
+
|
706
|
+
Packwerk::RunContext::DEFAULT_CHECKERS = T.let(T.unsafe(nil), Array)
|
707
|
+
Packwerk::VERSION = T.let(T.unsafe(nil), String)
|
708
|
+
|
709
|
+
class Packwerk::ViolationType < ::T::Enum
|
710
|
+
enums do
|
711
|
+
Privacy = new
|
712
|
+
Dependency = new
|
713
|
+
end
|
714
|
+
end
|
data/sorbet/rbi/todo.rbi
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
module ::RSpec; end
|