danger-packwerk 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +47 -32
- data/lib/danger-packwerk/basic_reference_offense.rb +19 -19
- data/lib/danger-packwerk/check/default_formatter.rb +3 -3
- data/lib/danger-packwerk/{danger_deprecated_references_yml_changes.rb → danger_package_todo_yml_changes.rb} +25 -25
- data/lib/danger-packwerk/packwerk_wrapper.rb +10 -0
- data/lib/danger-packwerk/private/{deprecated_references.rb → package_todo.rb} +8 -8
- data/lib/danger-packwerk/private.rb +1 -1
- data/lib/danger-packwerk/version.rb +1 -1
- data/lib/danger-packwerk.rb +4 -2
- data/sorbet/rbi/gems/{packwerk@2.2.1.rbi → packwerk@2.2.1-7e8e7a50705833b41fe40c201eadb85ff9a1a422.rbi} +852 -231
- metadata +7 -7
@@ -4,19 +4,25 @@
|
|
4
4
|
# This is an autogenerated file for types exported from the `packwerk` gem.
|
5
5
|
# Please instead update this file by running `bin/tapioca gem packwerk`.
|
6
6
|
|
7
|
+
# source://packwerk//lib/packwerk.rb#13
|
7
8
|
module Packwerk
|
8
9
|
extend ::ActiveSupport::Autoload
|
9
10
|
end
|
10
11
|
|
11
12
|
# Extracts the load paths from the analyzed application so that we can map constant names to paths.
|
13
|
+
#
|
14
|
+
# source://packwerk//lib/packwerk/application_load_paths.rb#8
|
12
15
|
module Packwerk::ApplicationLoadPaths
|
13
16
|
class << self
|
17
|
+
# source://packwerk//lib/packwerk/application_load_paths.rb#22
|
14
18
|
sig { returns(T::Hash[::String, ::Module]) }
|
15
19
|
def extract_application_autoload_paths; end
|
16
20
|
|
21
|
+
# source://packwerk//lib/packwerk/application_load_paths.rb#13
|
17
22
|
sig { params(root: ::String, environment: ::String).returns(T::Hash[::String, ::Module]) }
|
18
23
|
def extract_relevant_paths(root, environment); end
|
19
24
|
|
25
|
+
# source://packwerk//lib/packwerk/application_load_paths.rb#32
|
20
26
|
sig do
|
21
27
|
params(
|
22
28
|
all_paths: T::Hash[::String, ::Module],
|
@@ -26,6 +32,7 @@ module Packwerk::ApplicationLoadPaths
|
|
26
32
|
end
|
27
33
|
def filter_relevant_paths(all_paths, bundle_path: T.unsafe(nil), rails_root: T.unsafe(nil)); end
|
28
34
|
|
35
|
+
# source://packwerk//lib/packwerk/application_load_paths.rb#43
|
29
36
|
sig do
|
30
37
|
params(
|
31
38
|
load_paths: T::Hash[::Pathname, ::Module],
|
@@ -36,9 +43,11 @@ module Packwerk::ApplicationLoadPaths
|
|
36
43
|
|
37
44
|
private
|
38
45
|
|
46
|
+
# source://packwerk//lib/packwerk/application_load_paths.rb#63
|
39
47
|
sig { params(paths: T::Hash[T.untyped, ::Module]).void }
|
40
48
|
def assert_load_paths_present(paths); end
|
41
49
|
|
50
|
+
# source://packwerk//lib/packwerk/application_load_paths.rb#50
|
42
51
|
sig { params(root: ::String, environment: ::String).void }
|
43
52
|
def require_application(root, environment); end
|
44
53
|
end
|
@@ -46,113 +55,84 @@ end
|
|
46
55
|
|
47
56
|
# Checks the structure of the application and its packwerk configuration to make sure we can run a check and deliver
|
48
57
|
# correct results.
|
58
|
+
#
|
59
|
+
# source://packwerk//lib/packwerk/application_validator.rb#11
|
49
60
|
class Packwerk::ApplicationValidator
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
sig { returns(::Packwerk::ApplicationValidator::Result) }
|
54
|
-
def check_acyclic_graph; end
|
55
|
-
|
56
|
-
sig { returns(::Packwerk::ApplicationValidator::Result) }
|
57
|
-
def check_all; end
|
58
|
-
|
59
|
-
sig { returns(::Packwerk::ApplicationValidator::Result) }
|
60
|
-
def check_application_structure; end
|
61
|
-
|
62
|
-
sig { returns(::Packwerk::ApplicationValidator::Result) }
|
63
|
-
def check_package_manifest_paths; end
|
64
|
-
|
65
|
-
sig { returns(::Packwerk::ApplicationValidator::Result) }
|
66
|
-
def check_package_manifest_syntax; end
|
67
|
-
|
68
|
-
sig { returns(::Packwerk::ApplicationValidator::Result) }
|
69
|
-
def check_package_manifests_for_privacy; end
|
70
|
-
|
71
|
-
sig { returns(::Packwerk::ApplicationValidator::Result) }
|
72
|
-
def check_root_package_exists; end
|
73
|
-
|
74
|
-
sig { returns(::Packwerk::ApplicationValidator::Result) }
|
75
|
-
def check_valid_package_dependencies; end
|
76
|
-
|
77
|
-
private
|
61
|
+
include ::Packwerk::Validator
|
62
|
+
extend ::ActiveSupport::Autoload
|
78
63
|
|
64
|
+
# source://packwerk//lib/packwerk/application_validator.rb#22
|
79
65
|
sig do
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
66
|
+
override
|
67
|
+
.params(
|
68
|
+
package_set: Packwerk::PackageSet,
|
69
|
+
configuration: ::Packwerk::Configuration
|
70
|
+
).returns(::Packwerk::ApplicationValidator::Result)
|
84
71
|
end
|
85
|
-
def
|
86
|
-
|
87
|
-
# Convert the cycles:
|
88
|
-
#
|
89
|
-
# [[a, b, c], [b, c]]
|
90
|
-
#
|
91
|
-
# to the string:
|
92
|
-
#
|
93
|
-
# ["a -> b -> c -> a", "b -> c -> b"]
|
94
|
-
sig { params(cycles: T.untyped).returns(T::Array[::String]) }
|
95
|
-
def build_cycle_strings(cycles); end
|
72
|
+
def call(package_set, configuration); end
|
96
73
|
|
74
|
+
# source://packwerk//lib/packwerk/application_validator.rb#16
|
97
75
|
sig do
|
98
76
|
params(
|
99
|
-
|
100
|
-
|
101
|
-
config_file_path: T.untyped
|
77
|
+
package_set: Packwerk::PackageSet,
|
78
|
+
configuration: ::Packwerk::Configuration
|
102
79
|
).returns(::Packwerk::ApplicationValidator::Result)
|
103
80
|
end
|
104
|
-
def
|
81
|
+
def check_all(package_set, configuration); end
|
105
82
|
|
106
|
-
|
107
|
-
|
83
|
+
# source://packwerk//lib/packwerk/application_validator.rb#69
|
84
|
+
sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::ApplicationValidator::Result) }
|
85
|
+
def check_application_structure(configuration); end
|
108
86
|
|
109
|
-
|
110
|
-
|
87
|
+
# source://packwerk//lib/packwerk/application_validator.rb#84
|
88
|
+
sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::ApplicationValidator::Result) }
|
89
|
+
def check_package_manifest_paths(configuration); end
|
111
90
|
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
separator: ::String,
|
116
|
-
errors_headline: ::String
|
117
|
-
).returns(::Packwerk::ApplicationValidator::Result)
|
118
|
-
end
|
119
|
-
def merge_results(results, separator: T.unsafe(nil), errors_headline: T.unsafe(nil)); end
|
120
|
-
|
121
|
-
sig { returns(T.any(::String, T::Array[::String])) }
|
122
|
-
def package_glob; end
|
91
|
+
# source://packwerk//lib/packwerk/application_validator.rb#41
|
92
|
+
sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::ApplicationValidator::Result) }
|
93
|
+
def check_package_manifest_syntax(configuration); end
|
123
94
|
|
124
|
-
|
125
|
-
|
95
|
+
# source://packwerk//lib/packwerk/application_validator.rb#105
|
96
|
+
sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::ApplicationValidator::Result) }
|
97
|
+
def check_root_package_exists(configuration); end
|
126
98
|
|
127
|
-
|
128
|
-
|
99
|
+
# source://packwerk//lib/packwerk/application_validator.rb#34
|
100
|
+
sig { override.returns(T::Array[::String]) }
|
101
|
+
def permitted_keys; end
|
129
102
|
|
130
|
-
|
131
|
-
def private_constant_unresolvable(name, config_file_path); end
|
103
|
+
private
|
132
104
|
|
133
|
-
|
134
|
-
|
105
|
+
# source://packwerk//lib/packwerk/application_validator.rb#124
|
106
|
+
sig { params(list: T.untyped).returns(T.untyped) }
|
107
|
+
def format_yaml_strings(list); end
|
135
108
|
|
136
|
-
|
137
|
-
|
109
|
+
# source://packwerk//lib/packwerk/application_validator.rb#129
|
110
|
+
sig { params(configuration: ::Packwerk::Configuration, paths: T::Array[::String]).returns(T::Array[::Pathname]) }
|
111
|
+
def relative_paths(configuration, paths); end
|
138
112
|
end
|
139
113
|
|
114
|
+
# source://packwerk//lib/packwerk/application_validator/result.rb#6
|
140
115
|
class Packwerk::ApplicationValidator::Result < ::T::Struct
|
141
|
-
const :error_value, T.nilable(::String)
|
142
116
|
const :ok, T::Boolean
|
117
|
+
const :error_value, T.nilable(::String)
|
143
118
|
|
119
|
+
# source://packwerk//lib/packwerk/application_validator/result.rb#13
|
144
120
|
sig { returns(T::Boolean) }
|
145
121
|
def ok?; end
|
146
122
|
|
147
123
|
class << self
|
124
|
+
# source://sorbet-runtime/0.5.10588/lib/types/struct.rb#13
|
148
125
|
def inherited(s); end
|
149
126
|
end
|
150
127
|
end
|
151
128
|
|
152
129
|
# Extracts the implicit constant reference from an active record association
|
130
|
+
#
|
131
|
+
# source://packwerk//lib/packwerk/association_inspector.rb#6
|
153
132
|
class Packwerk::AssociationInspector
|
154
133
|
include ::Packwerk::ConstantNameInspector
|
155
134
|
|
135
|
+
# source://packwerk//lib/packwerk/association_inspector.rb#23
|
156
136
|
sig do
|
157
137
|
params(
|
158
138
|
inflector: T.class_of(ActiveSupport::Inflector),
|
@@ -161,49 +141,66 @@ class Packwerk::AssociationInspector
|
|
161
141
|
end
|
162
142
|
def initialize(inflector:, custom_associations: T.unsafe(nil)); end
|
163
143
|
|
144
|
+
# source://packwerk//lib/packwerk/association_inspector.rb#33
|
164
145
|
sig { override.params(node: ::AST::Node, ancestors: T::Array[::AST::Node]).returns(T.nilable(::String)) }
|
165
146
|
def constant_name_from_node(node, ancestors:); end
|
166
147
|
|
167
148
|
private
|
168
149
|
|
150
|
+
# source://packwerk//lib/packwerk/association_inspector.rb#52
|
169
151
|
sig { params(node: ::AST::Node).returns(T::Boolean) }
|
170
152
|
def association?(node); end
|
171
153
|
|
154
|
+
# source://packwerk//lib/packwerk/association_inspector.rb#66
|
172
155
|
sig { params(arguments: T::Array[::AST::Node]).returns(T.nilable(T.any(::String, ::Symbol))) }
|
173
156
|
def association_name(arguments); end
|
174
157
|
|
158
|
+
# source://packwerk//lib/packwerk/association_inspector.rb#58
|
175
159
|
sig { params(arguments: T::Array[::AST::Node]).returns(T.nilable(::AST::Node)) }
|
176
160
|
def custom_class_name(arguments); end
|
177
161
|
end
|
178
162
|
|
163
|
+
# source://packwerk//lib/packwerk/association_inspector.rb#10
|
179
164
|
Packwerk::AssociationInspector::CustomAssociations = T.type_alias { T.any(T::Array[::Symbol], T::Set[::Symbol]) }
|
165
|
+
|
166
|
+
# source://packwerk//lib/packwerk/association_inspector.rb#12
|
180
167
|
Packwerk::AssociationInspector::RAILS_ASSOCIATIONS = T.let(T.unsafe(nil), Set)
|
181
168
|
|
169
|
+
# source://packwerk//lib/packwerk/cache.rb#7
|
182
170
|
class Packwerk::Cache
|
171
|
+
# source://packwerk//lib/packwerk/cache.rb#52
|
183
172
|
sig { params(enable_cache: T::Boolean, cache_directory: ::Pathname, config_path: T.nilable(::String)).void }
|
184
173
|
def initialize(enable_cache:, cache_directory:, config_path:); end
|
185
174
|
|
175
|
+
# source://packwerk//lib/packwerk/cache.rb#67
|
186
176
|
sig { void }
|
187
177
|
def bust_cache!; end
|
188
178
|
|
179
|
+
# source://packwerk//lib/packwerk/cache.rb#133
|
189
180
|
sig { params(contents: ::String, contents_key: ::Symbol).void }
|
190
181
|
def bust_cache_if_contents_have_changed(contents, contents_key); end
|
191
182
|
|
183
|
+
# source://packwerk//lib/packwerk/cache.rb#128
|
192
184
|
sig { void }
|
193
185
|
def bust_cache_if_inflections_have_changed!; end
|
194
186
|
|
187
|
+
# source://packwerk//lib/packwerk/cache.rb#121
|
195
188
|
sig { void }
|
196
189
|
def bust_cache_if_packwerk_yml_has_changed!; end
|
197
190
|
|
191
|
+
# source://packwerk//lib/packwerk/cache.rb#157
|
198
192
|
sig { void }
|
199
193
|
def create_cache_directory!; end
|
200
194
|
|
195
|
+
# source://packwerk//lib/packwerk/cache.rb#109
|
201
196
|
sig { params(file: ::String).returns(::String) }
|
202
197
|
def digest_for_file(file); end
|
203
198
|
|
199
|
+
# source://packwerk//lib/packwerk/cache.rb#114
|
204
200
|
sig { params(str: ::String).returns(::String) }
|
205
201
|
def digest_for_string(str); end
|
206
202
|
|
203
|
+
# source://packwerk//lib/packwerk/cache.rb#77
|
207
204
|
sig do
|
208
205
|
params(
|
209
206
|
file_path: ::String,
|
@@ -213,25 +210,84 @@ class Packwerk::Cache
|
|
213
210
|
def with_cache(file_path, &block); end
|
214
211
|
end
|
215
212
|
|
213
|
+
# source://packwerk//lib/packwerk/cache.rb#10
|
216
214
|
class Packwerk::Cache::CacheContents < ::T::Struct
|
217
215
|
const :file_contents_digest, ::String
|
218
216
|
const :unresolved_references, T::Array[::Packwerk::UnresolvedReference]
|
219
217
|
|
218
|
+
# source://packwerk//lib/packwerk/cache.rb#39
|
220
219
|
sig { returns(::String) }
|
221
220
|
def serialize; end
|
222
221
|
|
223
222
|
class << self
|
223
|
+
# source://packwerk//lib/packwerk/cache.rb#20
|
224
224
|
sig { params(serialized_cache_contents: ::String).returns(::Packwerk::Cache::CacheContents) }
|
225
225
|
def deserialize(serialized_cache_contents); end
|
226
226
|
|
227
|
+
# source://sorbet-runtime/0.5.10588/lib/types/struct.rb#13
|
227
228
|
def inherited(s); end
|
228
229
|
end
|
229
230
|
end
|
230
231
|
|
232
|
+
# source://packwerk//lib/packwerk/cache.rb#44
|
231
233
|
Packwerk::Cache::CacheShape = T.type_alias { T::Hash[::String, ::Packwerk::Cache::CacheContents] }
|
232
234
|
|
235
|
+
# @abstract Subclasses must implement the `abstract` methods below.
|
236
|
+
#
|
237
|
+
# source://packwerk//lib/packwerk/checker.rb#5
|
238
|
+
module Packwerk::Checker
|
239
|
+
abstract!
|
240
|
+
|
241
|
+
# @abstract
|
242
|
+
#
|
243
|
+
# source://packwerk//lib/packwerk/checker.rb#49
|
244
|
+
sig { abstract.params(reference: ::Packwerk::Reference).returns(T::Boolean) }
|
245
|
+
def invalid_reference?(reference); end
|
246
|
+
|
247
|
+
# @abstract
|
248
|
+
#
|
249
|
+
# source://packwerk//lib/packwerk/checker.rb#52
|
250
|
+
sig { abstract.params(reference: ::Packwerk::Reference).returns(::String) }
|
251
|
+
def message(reference); end
|
252
|
+
|
253
|
+
# @abstract
|
254
|
+
#
|
255
|
+
# source://packwerk//lib/packwerk/checker.rb#46
|
256
|
+
sig { abstract.params(listed_offense: ::Packwerk::ReferenceOffense).returns(T::Boolean) }
|
257
|
+
def strict_mode_violation?(listed_offense); end
|
258
|
+
|
259
|
+
# @abstract
|
260
|
+
#
|
261
|
+
# source://packwerk//lib/packwerk/checker.rb#43
|
262
|
+
sig { abstract.returns(::String) }
|
263
|
+
def violation_type; end
|
264
|
+
|
265
|
+
class << self
|
266
|
+
# source://packwerk//lib/packwerk/checker.rb#22
|
267
|
+
sig { returns(T::Array[::Packwerk::Checker]) }
|
268
|
+
def all; end
|
269
|
+
|
270
|
+
# source://packwerk//lib/packwerk/checker.rb#27
|
271
|
+
sig { params(violation_type: ::String).returns(::Packwerk::Checker) }
|
272
|
+
def find(violation_type); end
|
273
|
+
|
274
|
+
# source://packwerk//lib/packwerk/checker.rb#15
|
275
|
+
sig { params(base: ::Class).void }
|
276
|
+
def included(base); end
|
277
|
+
|
278
|
+
private
|
279
|
+
|
280
|
+
# source://packwerk//lib/packwerk/checker.rb#34
|
281
|
+
sig { params(name: ::String).returns(::Packwerk::Checker) }
|
282
|
+
def checker_by_violation_type(name); end
|
283
|
+
end
|
284
|
+
end
|
285
|
+
|
233
286
|
# A command-line interface to Packwerk.
|
287
|
+
#
|
288
|
+
# source://packwerk//lib/packwerk/cli.rb#8
|
234
289
|
class Packwerk::Cli
|
290
|
+
# source://packwerk//lib/packwerk/cli.rb#21
|
235
291
|
sig do
|
236
292
|
params(
|
237
293
|
configuration: T.nilable(::Packwerk::Configuration),
|
@@ -244,101 +300,164 @@ class Packwerk::Cli
|
|
244
300
|
end
|
245
301
|
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
|
246
302
|
|
303
|
+
# source://packwerk//lib/packwerk/cli.rb#48
|
247
304
|
sig { params(args: T::Array[::String]).returns(T::Boolean) }
|
248
305
|
def execute_command(args); end
|
249
306
|
|
307
|
+
# source://packwerk//lib/packwerk/cli.rb#42
|
250
308
|
sig { params(args: T::Array[::String]).returns(T.noreturn) }
|
251
309
|
def run(args); end
|
252
310
|
|
253
311
|
private
|
254
312
|
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
313
|
+
# source://packwerk//lib/packwerk/cli.rb#135
|
314
|
+
sig do
|
315
|
+
params(
|
316
|
+
relative_file_paths: T::Array[::String],
|
317
|
+
ignore_nested_packages: T::Boolean
|
318
|
+
).returns(::Packwerk::FilesForProcessing)
|
319
|
+
end
|
259
320
|
def fetch_files_to_process(relative_file_paths, ignore_nested_packages); end
|
260
321
|
|
322
|
+
# source://packwerk//lib/packwerk/cli.rb#79
|
261
323
|
sig { returns(T::Boolean) }
|
262
324
|
def generate_configs; end
|
263
325
|
|
326
|
+
# source://packwerk//lib/packwerk/cli.rb#72
|
264
327
|
sig { returns(T::Boolean) }
|
265
328
|
def init; end
|
266
329
|
|
330
|
+
# source://packwerk//lib/packwerk/cli.rb#174
|
267
331
|
sig { params(result: ::Packwerk::ApplicationValidator::Result).void }
|
268
332
|
def list_validation_errors(result); end
|
269
333
|
|
334
|
+
# source://packwerk//lib/packwerk/cli.rb#123
|
270
335
|
sig { params(result: ::Packwerk::Result).returns(T::Boolean) }
|
271
336
|
def output_result(result); end
|
272
337
|
|
273
|
-
|
274
|
-
|
338
|
+
# source://packwerk//lib/packwerk/cli.rb#166
|
339
|
+
sig { returns(Packwerk::PackageSet) }
|
340
|
+
def package_set; end
|
341
|
+
|
342
|
+
# source://packwerk//lib/packwerk/cli.rb#186
|
343
|
+
sig { params(args: T::Array[::String]).returns(::Packwerk::ParseRun) }
|
344
|
+
def parse_run(args); end
|
275
345
|
|
346
|
+
# source://packwerk//lib/packwerk/cli.rb#108
|
347
|
+
sig { returns(T::Boolean) }
|
348
|
+
def usage; end
|
349
|
+
|
350
|
+
# source://packwerk//lib/packwerk/cli.rb#150
|
276
351
|
sig { params(_paths: T::Array[::String]).returns(T::Boolean) }
|
277
352
|
def validate(_paths); end
|
353
|
+
|
354
|
+
# source://packwerk//lib/packwerk/cli.rb#161
|
355
|
+
sig { returns(::Packwerk::ApplicationValidator) }
|
356
|
+
def validator; end
|
278
357
|
end
|
279
358
|
|
359
|
+
# source://packwerk//lib/packwerk/configuration.rb#8
|
280
360
|
class Packwerk::Configuration
|
281
361
|
# @return [Configuration] a new instance of Configuration
|
362
|
+
#
|
363
|
+
# source://packwerk//lib/packwerk/configuration.rb#42
|
282
364
|
def initialize(configs = T.unsafe(nil), config_path: T.unsafe(nil)); end
|
283
365
|
|
284
366
|
# Returns the value of attribute cache_directory.
|
367
|
+
#
|
368
|
+
# source://packwerk//lib/packwerk/configuration.rb#38
|
285
369
|
def cache_directory; end
|
286
370
|
|
287
371
|
# @return [Boolean]
|
372
|
+
#
|
373
|
+
# source://packwerk//lib/packwerk/configuration.rb#76
|
288
374
|
def cache_enabled?; end
|
289
375
|
|
290
376
|
# Returns the value of attribute config_path.
|
377
|
+
#
|
378
|
+
# source://packwerk//lib/packwerk/configuration.rb#38
|
291
379
|
def config_path; end
|
292
380
|
|
293
381
|
# Returns the value of attribute custom_associations.
|
382
|
+
#
|
383
|
+
# source://packwerk//lib/packwerk/configuration.rb#38
|
294
384
|
def custom_associations; end
|
295
385
|
|
296
386
|
# Returns the value of attribute exclude.
|
387
|
+
#
|
388
|
+
# source://packwerk//lib/packwerk/configuration.rb#38
|
297
389
|
def exclude; end
|
298
390
|
|
299
391
|
# Returns the value of attribute include.
|
392
|
+
#
|
393
|
+
# source://packwerk//lib/packwerk/configuration.rb#38
|
300
394
|
def include; end
|
301
395
|
|
396
|
+
# source://packwerk//lib/packwerk/configuration.rb#63
|
302
397
|
def load_paths; end
|
303
398
|
|
399
|
+
# source://packwerk//lib/packwerk/configuration.rb#72
|
400
|
+
sig { returns(::Packwerk::OffensesFormatter) }
|
401
|
+
def offenses_formatter; end
|
402
|
+
|
304
403
|
# Returns the value of attribute package_paths.
|
404
|
+
#
|
405
|
+
# source://packwerk//lib/packwerk/configuration.rb#38
|
305
406
|
def package_paths; end
|
306
407
|
|
307
408
|
# @return [Boolean]
|
409
|
+
#
|
410
|
+
# source://packwerk//lib/packwerk/configuration.rb#67
|
308
411
|
def parallel?; end
|
309
412
|
|
310
413
|
# Returns the value of attribute root_path.
|
414
|
+
#
|
415
|
+
# source://packwerk//lib/packwerk/configuration.rb#38
|
311
416
|
def root_path; end
|
312
417
|
|
313
418
|
class << self
|
314
419
|
# @raise [ArgumentError]
|
420
|
+
#
|
421
|
+
# source://packwerk//lib/packwerk/configuration.rb#12
|
315
422
|
def from_path(path = T.unsafe(nil)); end
|
316
423
|
|
317
424
|
private
|
318
425
|
|
426
|
+
# source://packwerk//lib/packwerk/configuration.rb#26
|
319
427
|
def from_packwerk_config(path); end
|
320
428
|
end
|
321
429
|
end
|
322
430
|
|
431
|
+
# source://packwerk//lib/packwerk/configuration.rb#34
|
323
432
|
Packwerk::Configuration::DEFAULT_CONFIG_PATH = T.let(T.unsafe(nil), String)
|
433
|
+
|
434
|
+
# source://packwerk//lib/packwerk/configuration.rb#36
|
324
435
|
Packwerk::Configuration::DEFAULT_EXCLUDE_GLOBS = T.let(T.unsafe(nil), Array)
|
436
|
+
|
437
|
+
# source://packwerk//lib/packwerk/configuration.rb#35
|
325
438
|
Packwerk::Configuration::DEFAULT_INCLUDE_GLOBS = T.let(T.unsafe(nil), Array)
|
326
439
|
|
327
440
|
# Extracts a constant name from an AST node of type :const
|
441
|
+
#
|
442
|
+
# source://packwerk//lib/packwerk/const_node_inspector.rb#6
|
328
443
|
class Packwerk::ConstNodeInspector
|
329
444
|
include ::Packwerk::ConstantNameInspector
|
330
445
|
|
446
|
+
# source://packwerk//lib/packwerk/const_node_inspector.rb#15
|
331
447
|
sig { override.params(node: ::AST::Node, ancestors: T::Array[::AST::Node]).returns(T.nilable(::String)) }
|
332
448
|
def constant_name_from_node(node, ancestors:); end
|
333
449
|
|
334
450
|
private
|
335
451
|
|
452
|
+
# source://packwerk//lib/packwerk/const_node_inspector.rb#43
|
336
453
|
sig { params(node: ::AST::Node, parent: ::AST::Node).returns(T.nilable(T::Boolean)) }
|
337
454
|
def constant_in_module_or_class_definition?(node, parent:); end
|
338
455
|
|
456
|
+
# source://packwerk//lib/packwerk/const_node_inspector.rb#49
|
339
457
|
sig { params(ancestors: T::Array[::AST::Node]).returns(::String) }
|
340
458
|
def fully_qualify_constant(ancestors); end
|
341
459
|
|
460
|
+
# source://packwerk//lib/packwerk/const_node_inspector.rb#38
|
342
461
|
sig { params(parent: T.nilable(::AST::Node)).returns(T::Boolean) }
|
343
462
|
def root_constant?(parent); end
|
344
463
|
end
|
@@ -353,12 +472,17 @@ end
|
|
353
472
|
# - It is OK to not always infer the exact file defining the constant. For example, when a constant is inherited, we
|
354
473
|
# have no way of inferring the file it is defined in. You could argue though that inheritance means that another
|
355
474
|
# constant with the same name exists in the inheriting class, and this view is sufficient for all our use cases.
|
475
|
+
#
|
476
|
+
# source://packwerk//lib/packwerk/constant_discovery.rb#17
|
356
477
|
class Packwerk::ConstantDiscovery
|
478
|
+
# source://packwerk//lib/packwerk/constant_discovery.rb#27
|
357
479
|
sig { params(constant_resolver: ::ConstantResolver, packages: Packwerk::PackageSet).void }
|
358
480
|
def initialize(constant_resolver:, packages:); end
|
359
481
|
|
360
482
|
# Analyze a constant via its name.
|
361
483
|
# If the constant is unresolved, we need the current namespace path to correctly infer its full name
|
484
|
+
#
|
485
|
+
# source://packwerk//lib/packwerk/constant_discovery.rb#60
|
362
486
|
sig do
|
363
487
|
params(
|
364
488
|
const_name: ::String,
|
@@ -368,10 +492,13 @@ class Packwerk::ConstantDiscovery
|
|
368
492
|
def context_for(const_name, current_namespace_path: T.unsafe(nil)); end
|
369
493
|
|
370
494
|
# Get the package that owns a given file path.
|
495
|
+
#
|
496
|
+
# source://packwerk//lib/packwerk/constant_discovery.rb#43
|
371
497
|
sig { params(path: ::String).returns(::Packwerk::Package) }
|
372
498
|
def package_from_path(path); end
|
373
499
|
end
|
374
500
|
|
501
|
+
# source://packwerk//lib/packwerk/constant_discovery.rb#20
|
375
502
|
class Packwerk::ConstantDiscovery::ConstantContext < ::Struct
|
376
503
|
# Returns the value of attribute location
|
377
504
|
#
|
@@ -382,6 +509,8 @@ class Packwerk::ConstantDiscovery::ConstantContext < ::Struct
|
|
382
509
|
#
|
383
510
|
# @param value [Object] the value to set the attribute location to.
|
384
511
|
# @return [Object] the newly set value
|
512
|
+
#
|
513
|
+
# source://packwerk//lib/packwerk/constant_discovery.rb#20
|
385
514
|
def location=(_); end
|
386
515
|
|
387
516
|
# Returns the value of attribute name
|
@@ -393,6 +522,8 @@ class Packwerk::ConstantDiscovery::ConstantContext < ::Struct
|
|
393
522
|
#
|
394
523
|
# @param value [Object] the value to set the attribute name to.
|
395
524
|
# @return [Object] the newly set value
|
525
|
+
#
|
526
|
+
# source://packwerk//lib/packwerk/constant_discovery.rb#20
|
396
527
|
def name=(_); end
|
397
528
|
|
398
529
|
# Returns the value of attribute package
|
@@ -404,12 +535,9 @@ class Packwerk::ConstantDiscovery::ConstantContext < ::Struct
|
|
404
535
|
#
|
405
536
|
# @param value [Object] the value to set the attribute package to.
|
406
537
|
# @return [Object] the newly set value
|
407
|
-
def package=(_); end
|
408
|
-
|
409
|
-
# Returns the value of attribute public?
|
410
538
|
#
|
411
|
-
#
|
412
|
-
def
|
539
|
+
# source://packwerk//lib/packwerk/constant_discovery.rb#20
|
540
|
+
def package=(_); end
|
413
541
|
|
414
542
|
class << self
|
415
543
|
def [](*_arg0); end
|
@@ -422,52 +550,42 @@ end
|
|
422
550
|
# An interface describing an object that can extract a constant name from an AST node.
|
423
551
|
#
|
424
552
|
# @abstract Subclasses must implement the `abstract` methods below.
|
553
|
+
#
|
554
|
+
# source://packwerk//lib/packwerk/constant_name_inspector.rb#8
|
425
555
|
module Packwerk::ConstantNameInspector
|
426
556
|
interface!
|
427
557
|
|
428
558
|
# @abstract
|
559
|
+
#
|
560
|
+
# source://packwerk//lib/packwerk/constant_name_inspector.rb#19
|
429
561
|
sig { abstract.params(node: ::AST::Node, ancestors: T::Array[::AST::Node]).returns(T.nilable(::String)) }
|
430
562
|
def constant_name_from_node(node, ancestors:); end
|
431
563
|
end
|
432
564
|
|
565
|
+
# source://packwerk//lib/packwerk/cache.rb#162
|
433
566
|
class Packwerk::Debug
|
434
567
|
class << self
|
568
|
+
# source://packwerk//lib/packwerk/cache.rb#167
|
435
569
|
sig { params(out: ::String).void }
|
436
570
|
def out(out); end
|
437
571
|
end
|
438
572
|
end
|
439
573
|
|
440
|
-
class
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
sig { params(reference: ::Packwerk::Reference, violation_type: ::Packwerk::ViolationType).returns(T::Boolean) }
|
451
|
-
def listed?(reference, violation_type:); end
|
452
|
-
|
453
|
-
sig { params(for_files: T::Set[::String]).returns(T::Boolean) }
|
454
|
-
def stale_violations?(for_files); end
|
455
|
-
|
456
|
-
private
|
457
|
-
|
458
|
-
sig { returns(T::Hash[::String, T.untyped]) }
|
459
|
-
def deprecated_references; end
|
460
|
-
|
461
|
-
sig { params(filepath: ::String).returns(T::Hash[::String, T.untyped]) }
|
462
|
-
def load_yaml(filepath); end
|
463
|
-
|
464
|
-
sig { returns(T::Hash[::String, T.untyped]) }
|
465
|
-
def prepare_entries_for_dump; end
|
574
|
+
# This class handles loading extensions to packwerk using the `require` directive
|
575
|
+
# in the `packwerk.yml` configuration.
|
576
|
+
#
|
577
|
+
# source://packwerk//lib/packwerk/extension_loader.rb#7
|
578
|
+
module Packwerk::ExtensionLoader
|
579
|
+
class << self
|
580
|
+
# source://packwerk//lib/packwerk/extension_loader.rb#11
|
581
|
+
sig { params(require_directive: ::String, config_dir_path: ::String).void }
|
582
|
+
def load(require_directive, config_dir_path); end
|
583
|
+
end
|
466
584
|
end
|
467
585
|
|
468
|
-
|
469
|
-
|
586
|
+
# source://packwerk//lib/packwerk/file_processor.rb#7
|
470
587
|
class Packwerk::FileProcessor
|
588
|
+
# source://packwerk//lib/packwerk/file_processor.rb#26
|
471
589
|
sig do
|
472
590
|
params(
|
473
591
|
node_processor_factory: ::Packwerk::NodeProcessorFactory,
|
@@ -477,36 +595,46 @@ class Packwerk::FileProcessor
|
|
477
595
|
end
|
478
596
|
def initialize(node_processor_factory:, cache:, parser_factory: T.unsafe(nil)); end
|
479
597
|
|
598
|
+
# source://packwerk//lib/packwerk/file_processor.rb#40
|
480
599
|
sig { params(relative_file: ::String).returns(::Packwerk::FileProcessor::ProcessedFile) }
|
481
600
|
def call(relative_file); end
|
482
601
|
|
483
602
|
private
|
484
603
|
|
604
|
+
# source://packwerk//lib/packwerk/file_processor.rb#74
|
485
605
|
sig { params(relative_file: ::String, parser: ::Packwerk::Parsers::ParserInterface).returns(T.untyped) }
|
486
606
|
def parse_into_ast(relative_file, parser); end
|
487
607
|
|
608
|
+
# source://packwerk//lib/packwerk/file_processor.rb#81
|
488
609
|
sig { params(file_path: ::String).returns(T.nilable(::Packwerk::Parsers::ParserInterface)) }
|
489
610
|
def parser_for(file_path); end
|
490
611
|
|
612
|
+
# source://packwerk//lib/packwerk/file_processor.rb#63
|
491
613
|
sig { params(node: ::Parser::AST::Node, relative_file: ::String).returns(T::Array[::Packwerk::UnresolvedReference]) }
|
492
614
|
def references_from_ast(node, relative_file); end
|
493
615
|
end
|
494
616
|
|
617
|
+
# source://packwerk//lib/packwerk/file_processor.rb#32
|
495
618
|
class Packwerk::FileProcessor::ProcessedFile < ::T::Struct
|
496
|
-
const :offenses, T::Array[::Packwerk::Offense], default: T.unsafe(nil)
|
497
619
|
const :unresolved_references, T::Array[::Packwerk::UnresolvedReference], default: T.unsafe(nil)
|
620
|
+
const :offenses, T::Array[::Packwerk::Offense], default: T.unsafe(nil)
|
498
621
|
|
499
622
|
class << self
|
623
|
+
# source://sorbet-runtime/0.5.10588/lib/types/struct.rb#13
|
500
624
|
def inherited(s); end
|
501
625
|
end
|
502
626
|
end
|
503
627
|
|
628
|
+
# source://packwerk//lib/packwerk/file_processor.rb#10
|
504
629
|
class Packwerk::FileProcessor::UnknownFileTypeResult < ::Packwerk::Offense
|
630
|
+
# source://packwerk//lib/packwerk/file_processor.rb#14
|
505
631
|
sig { params(file: ::String).void }
|
506
632
|
def initialize(file:); end
|
507
633
|
end
|
508
634
|
|
635
|
+
# source://packwerk//lib/packwerk/files_for_processing.rb#5
|
509
636
|
class Packwerk::FilesForProcessing
|
637
|
+
# source://packwerk//lib/packwerk/files_for_processing.rb#32
|
510
638
|
sig do
|
511
639
|
params(
|
512
640
|
relative_file_paths: T::Array[::String],
|
@@ -516,53 +644,74 @@ class Packwerk::FilesForProcessing
|
|
516
644
|
end
|
517
645
|
def initialize(relative_file_paths, configuration, ignore_nested_packages); end
|
518
646
|
|
647
|
+
# source://packwerk//lib/packwerk/files_for_processing.rb#41
|
519
648
|
sig { returns(T::Set[::String]) }
|
520
649
|
def files; end
|
521
650
|
|
651
|
+
# source://packwerk//lib/packwerk/files_for_processing.rb#46
|
652
|
+
sig { returns(T::Boolean) }
|
653
|
+
def files_specified?; end
|
654
|
+
|
522
655
|
private
|
523
656
|
|
657
|
+
# source://packwerk//lib/packwerk/files_for_processing.rb#105
|
524
658
|
sig { returns(T::Set[::String]) }
|
525
659
|
def configured_excluded_files; end
|
526
660
|
|
661
|
+
# source://packwerk//lib/packwerk/files_for_processing.rb#100
|
527
662
|
sig { returns(T::Set[::String]) }
|
528
663
|
def configured_included_files; end
|
529
664
|
|
665
|
+
# source://packwerk//lib/packwerk/files_for_processing.rb#53
|
530
666
|
sig { returns(T::Set[::String]) }
|
531
|
-
def
|
532
|
-
|
533
|
-
sig { params(relative_file_path: ::String).returns(T::Set[::String]) }
|
534
|
-
def custom_included_files(relative_file_path); end
|
667
|
+
def files_for_processing; end
|
535
668
|
|
669
|
+
# source://packwerk//lib/packwerk/files_for_processing.rb#110
|
536
670
|
sig { params(relative_globs: T::Array[::String]).returns(T::Set[::String]) }
|
537
671
|
def relative_files_for_globs(relative_globs); end
|
538
672
|
|
673
|
+
# source://packwerk//lib/packwerk/files_for_processing.rb#64
|
674
|
+
sig { returns(T::Set[::String]) }
|
675
|
+
def specified_files; end
|
676
|
+
|
677
|
+
# source://packwerk//lib/packwerk/files_for_processing.rb#77
|
678
|
+
sig { params(relative_file_path: ::String).returns(T::Set[::String]) }
|
679
|
+
def specified_included_files(relative_file_path); end
|
680
|
+
|
539
681
|
class << self
|
682
|
+
# source://packwerk//lib/packwerk/files_for_processing.rb#20
|
540
683
|
sig do
|
541
684
|
params(
|
542
685
|
relative_file_paths: T::Array[::String],
|
543
686
|
configuration: ::Packwerk::Configuration,
|
544
687
|
ignore_nested_packages: T::Boolean
|
545
|
-
).returns(
|
688
|
+
).returns(::Packwerk::FilesForProcessing)
|
546
689
|
end
|
547
690
|
def fetch(relative_file_paths:, configuration:, ignore_nested_packages: T.unsafe(nil)); end
|
548
691
|
end
|
549
692
|
end
|
550
693
|
|
694
|
+
# source://packwerk//lib/packwerk/files_for_processing.rb#8
|
551
695
|
Packwerk::FilesForProcessing::RelativeFileSet = T.type_alias { T::Set[::String] }
|
552
696
|
|
697
|
+
# source://packwerk//lib/packwerk.rb#66
|
553
698
|
module Packwerk::Formatters
|
554
699
|
extend ::ActiveSupport::Autoload
|
555
700
|
end
|
556
701
|
|
702
|
+
# source://packwerk//lib/packwerk/formatters/offenses_formatter.rb#6
|
557
703
|
class Packwerk::Formatters::OffensesFormatter
|
558
704
|
include ::Packwerk::OffensesFormatter
|
559
705
|
|
560
|
-
|
561
|
-
|
706
|
+
# source://packwerk//lib/packwerk/formatters/offenses_formatter.rb#33
|
707
|
+
sig { override.returns(::String) }
|
708
|
+
def identifier; end
|
562
709
|
|
710
|
+
# source://packwerk//lib/packwerk/formatters/offenses_formatter.rb#14
|
563
711
|
sig { override.params(offenses: T::Array[T.nilable(::Packwerk::Offense)]).returns(::String) }
|
564
712
|
def show_offenses(offenses); end
|
565
713
|
|
714
|
+
# source://packwerk//lib/packwerk/formatters/offenses_formatter.rb#24
|
566
715
|
sig do
|
567
716
|
override
|
568
717
|
.params(
|
@@ -572,84 +721,152 @@ class Packwerk::Formatters::OffensesFormatter
|
|
572
721
|
end
|
573
722
|
def show_stale_violations(offense_collection, fileset); end
|
574
723
|
|
724
|
+
# source://packwerk//lib/packwerk/formatters/offenses_formatter.rb#38
|
725
|
+
sig { override.params(strict_mode_violations: T::Array[::Packwerk::ReferenceOffense]).returns(::String) }
|
726
|
+
def show_strict_mode_violations(strict_mode_violations); end
|
727
|
+
|
575
728
|
private
|
576
729
|
|
730
|
+
# source://packwerk//lib/packwerk/formatters/offenses_formatter.rb#54
|
731
|
+
sig { params(offense: ::Packwerk::ReferenceOffense).returns(::String) }
|
732
|
+
def format_strict_mode_violation(offense); end
|
733
|
+
|
734
|
+
# source://packwerk//lib/packwerk/formatters/offenses_formatter.rb#62
|
577
735
|
sig { params(offenses: T::Array[T.nilable(::Packwerk::Offense)]).returns(::String) }
|
578
736
|
def offenses_list(offenses); end
|
579
737
|
|
738
|
+
# source://packwerk//lib/packwerk/formatters/offenses_formatter.rb#70
|
580
739
|
sig { params(offenses: T::Array[T.nilable(::Packwerk::Offense)]).returns(::String) }
|
581
740
|
def offenses_summary(offenses); end
|
741
|
+
|
742
|
+
# source://packwerk//lib/packwerk/formatters/offenses_formatter.rb#49
|
743
|
+
sig { returns(::Packwerk::OutputStyle) }
|
744
|
+
def style; end
|
582
745
|
end
|
583
746
|
|
747
|
+
# source://packwerk//lib/packwerk/formatters/offenses_formatter.rb#9
|
748
|
+
Packwerk::Formatters::OffensesFormatter::IDENTIFIER = T.let(T.unsafe(nil), String)
|
749
|
+
|
750
|
+
# source://packwerk//lib/packwerk/formatters/progress_formatter.rb#8
|
584
751
|
class Packwerk::Formatters::ProgressFormatter
|
752
|
+
# source://packwerk//lib/packwerk/formatters/progress_formatter.rb#12
|
585
753
|
sig { params(out: T.any(::IO, ::StringIO), style: ::Packwerk::OutputStyle).void }
|
586
754
|
def initialize(out, style: T.unsafe(nil)); end
|
587
755
|
|
588
|
-
|
756
|
+
# source://packwerk//lib/packwerk/formatters/progress_formatter.rb#39
|
589
757
|
def interrupted; end
|
758
|
+
|
759
|
+
# source://packwerk//lib/packwerk/formatters/progress_formatter.rb#35
|
590
760
|
def mark_as_failed; end
|
761
|
+
|
762
|
+
# source://packwerk//lib/packwerk/formatters/progress_formatter.rb#31
|
591
763
|
def mark_as_inspected; end
|
592
|
-
|
764
|
+
|
765
|
+
# source://packwerk//lib/packwerk/formatters/progress_formatter.rb#24
|
766
|
+
def started_inspection(target_files, &block); end
|
767
|
+
|
768
|
+
# source://packwerk//lib/packwerk/formatters/progress_formatter.rb#17
|
593
769
|
def started_validation(&block); end
|
770
|
+
|
771
|
+
private
|
772
|
+
|
773
|
+
# source://packwerk//lib/packwerk/formatters/progress_formatter.rb#46
|
774
|
+
def finished(execution_time); end
|
775
|
+
|
776
|
+
# source://packwerk//lib/packwerk/formatters/progress_formatter.rb#55
|
777
|
+
def start_inspection(target_files); end
|
778
|
+
|
779
|
+
# source://packwerk//lib/packwerk/formatters/progress_formatter.rb#51
|
780
|
+
def start_validation; end
|
594
781
|
end
|
595
782
|
|
783
|
+
# source://packwerk//lib/packwerk.rb#72
|
596
784
|
module Packwerk::Generators
|
597
785
|
extend ::ActiveSupport::Autoload
|
598
786
|
end
|
599
787
|
|
788
|
+
# source://packwerk//lib/packwerk/generators/configuration_file.rb#8
|
600
789
|
class Packwerk::Generators::ConfigurationFile
|
790
|
+
# source://packwerk//lib/packwerk/generators/configuration_file.rb#20
|
601
791
|
sig { params(root: ::String, out: T.any(::IO, ::StringIO)).void }
|
602
792
|
def initialize(root:, out: T.unsafe(nil)); end
|
603
793
|
|
794
|
+
# source://packwerk//lib/packwerk/generators/configuration_file.rb#26
|
604
795
|
sig { returns(T::Boolean) }
|
605
796
|
def generate; end
|
606
797
|
|
607
798
|
private
|
608
799
|
|
800
|
+
# source://packwerk//lib/packwerk/generators/configuration_file.rb#43
|
609
801
|
def render; end
|
802
|
+
|
803
|
+
# source://packwerk//lib/packwerk/generators/configuration_file.rb#47
|
610
804
|
def template; end
|
611
805
|
|
612
806
|
class << self
|
807
|
+
# source://packwerk//lib/packwerk/generators/configuration_file.rb#14
|
613
808
|
def generate(root:, out:); end
|
614
809
|
end
|
615
810
|
end
|
616
811
|
|
812
|
+
# source://packwerk//lib/packwerk/generators/configuration_file.rb#11
|
617
813
|
Packwerk::Generators::ConfigurationFile::CONFIGURATION_TEMPLATE_FILE_PATH = T.let(T.unsafe(nil), String)
|
618
814
|
|
815
|
+
# source://packwerk//lib/packwerk/generators/root_package.rb#6
|
619
816
|
class Packwerk::Generators::RootPackage
|
620
817
|
# @return [RootPackage] a new instance of RootPackage
|
818
|
+
#
|
819
|
+
# source://packwerk//lib/packwerk/generators/root_package.rb#15
|
621
820
|
def initialize(root:, out: T.unsafe(nil)); end
|
622
821
|
|
822
|
+
# source://packwerk//lib/packwerk/generators/root_package.rb#21
|
623
823
|
sig { returns(T::Boolean) }
|
624
824
|
def generate; end
|
625
825
|
|
626
826
|
class << self
|
827
|
+
# source://packwerk//lib/packwerk/generators/root_package.rb#10
|
627
828
|
def generate(root:, out:); end
|
628
829
|
end
|
629
830
|
end
|
630
831
|
|
631
832
|
# A general implementation of a graph data structure with the ability to check for - and list - cycles.
|
833
|
+
#
|
834
|
+
# source://packwerk//lib/packwerk/graph.rb#6
|
632
835
|
class Packwerk::Graph
|
633
|
-
#
|
634
|
-
|
635
|
-
def initialize(
|
836
|
+
# source://packwerk//lib/packwerk/graph.rb#14
|
837
|
+
sig { params(edges: T::Array[T::Array[T.nilable(T.any(::Integer, ::String))]]).void }
|
838
|
+
def initialize(edges); end
|
636
839
|
|
637
840
|
# @return [Boolean]
|
841
|
+
#
|
842
|
+
# source://packwerk//lib/packwerk/graph.rb#24
|
638
843
|
def acyclic?; end
|
639
844
|
|
845
|
+
# source://packwerk//lib/packwerk/graph.rb#20
|
640
846
|
def cycles; end
|
641
847
|
|
642
848
|
private
|
643
849
|
|
850
|
+
# source://packwerk//lib/packwerk/graph.rb#74
|
644
851
|
def add_cycle(cycle); end
|
852
|
+
|
853
|
+
# source://packwerk//lib/packwerk/graph.rb#67
|
645
854
|
def neighbours(node); end
|
855
|
+
|
856
|
+
# source://packwerk//lib/packwerk/graph.rb#30
|
646
857
|
def nodes; end
|
858
|
+
|
859
|
+
# source://packwerk//lib/packwerk/graph.rb#34
|
647
860
|
def process; end
|
861
|
+
|
862
|
+
# source://packwerk//lib/packwerk/graph.rb#42
|
648
863
|
def visit(node, visited_nodes: T.unsafe(nil), path: T.unsafe(nil)); end
|
649
864
|
end
|
650
865
|
|
866
|
+
# source://packwerk//lib/packwerk/node.rb#5
|
651
867
|
class Packwerk::Node; end
|
652
868
|
|
869
|
+
# source://packwerk//lib/packwerk/node.rb#6
|
653
870
|
class Packwerk::Node::Location < ::Struct
|
654
871
|
# Returns the value of attribute column
|
655
872
|
#
|
@@ -660,6 +877,8 @@ class Packwerk::Node::Location < ::Struct
|
|
660
877
|
#
|
661
878
|
# @param value [Object] the value to set the attribute column to.
|
662
879
|
# @return [Object] the newly set value
|
880
|
+
#
|
881
|
+
# source://packwerk//lib/packwerk/node.rb#6
|
663
882
|
def column=(_); end
|
664
883
|
|
665
884
|
# Returns the value of attribute line
|
@@ -671,6 +890,8 @@ class Packwerk::Node::Location < ::Struct
|
|
671
890
|
#
|
672
891
|
# @param value [Object] the value to set the attribute line to.
|
673
892
|
# @return [Object] the newly set value
|
893
|
+
#
|
894
|
+
# source://packwerk//lib/packwerk/node.rb#6
|
674
895
|
def line=(_); end
|
675
896
|
|
676
897
|
class << self
|
@@ -682,117 +903,162 @@ class Packwerk::Node::Location < ::Struct
|
|
682
903
|
end
|
683
904
|
|
684
905
|
# Convenience methods for working with Parser::AST::Node nodes.
|
906
|
+
#
|
907
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#9
|
685
908
|
module Packwerk::NodeHelpers
|
686
909
|
class << self
|
910
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#117
|
687
911
|
sig { params(node: ::AST::Node).returns(T::Boolean) }
|
688
912
|
def class?(node); end
|
689
913
|
|
914
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#16
|
690
915
|
sig { params(class_or_module_node: ::AST::Node).returns(::String) }
|
691
916
|
def class_or_module_name(class_or_module_node); end
|
692
917
|
|
918
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#107
|
693
919
|
sig { params(node: ::AST::Node).returns(T::Boolean) }
|
694
920
|
def constant?(node); end
|
695
921
|
|
922
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#112
|
696
923
|
sig { params(node: ::AST::Node).returns(T::Boolean) }
|
697
924
|
def constant_assignment?(node); end
|
698
925
|
|
926
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#31
|
699
927
|
sig { params(constant_node: ::AST::Node).returns(::String) }
|
700
928
|
def constant_name(constant_node); end
|
701
929
|
|
930
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#63
|
702
931
|
sig { params(node: ::AST::Node).returns(T.untyped) }
|
703
932
|
def each_child(node); end
|
704
933
|
|
934
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#74
|
705
935
|
sig { params(starting_node: ::AST::Node, ancestors: T::Array[::AST::Node]).returns(T::Array[::String]) }
|
706
936
|
def enclosing_namespace_path(starting_node, ancestors:); end
|
707
937
|
|
938
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#127
|
708
939
|
sig { params(node: ::AST::Node).returns(T::Boolean) }
|
709
940
|
def hash?(node); end
|
710
941
|
|
942
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#87
|
711
943
|
sig { params(string_or_symbol_node: ::AST::Node).returns(T.any(::String, ::Symbol)) }
|
712
944
|
def literal_value(string_or_symbol_node); end
|
713
945
|
|
946
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#101
|
714
947
|
sig { params(node: ::Parser::AST::Node).returns(::Packwerk::Node::Location) }
|
715
948
|
def location(node); end
|
716
949
|
|
717
950
|
# @raise [TypeError]
|
951
|
+
#
|
952
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#142
|
718
953
|
sig { params(method_call_node: ::AST::Node).returns(T::Array[::AST::Node]) }
|
719
954
|
def method_arguments(method_call_node); end
|
720
955
|
|
956
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#122
|
721
957
|
sig { params(node: ::AST::Node).returns(T::Boolean) }
|
722
958
|
def method_call?(node); end
|
723
959
|
|
724
960
|
# @raise [TypeError]
|
961
|
+
#
|
962
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#151
|
725
963
|
sig { params(method_call_node: ::AST::Node).returns(::Symbol) }
|
726
964
|
def method_name(method_call_node); end
|
727
965
|
|
966
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#160
|
728
967
|
sig { params(node: ::AST::Node).returns(T.nilable(::String)) }
|
729
968
|
def module_name_from_definition(node); end
|
730
969
|
|
970
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#185
|
731
971
|
sig { params(node: ::Parser::AST::Node).returns(T.nilable(::Packwerk::Node::Location)) }
|
732
972
|
def name_location(node); end
|
733
973
|
|
734
974
|
# @raise [TypeError]
|
975
|
+
#
|
976
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#195
|
735
977
|
sig { params(class_node: ::AST::Node).returns(T.nilable(::AST::Node)) }
|
736
978
|
def parent_class(class_node); end
|
737
979
|
|
980
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#204
|
738
981
|
sig { params(ancestors: T::Array[::AST::Node]).returns(::String) }
|
739
982
|
def parent_module_name(ancestors:); end
|
740
983
|
|
984
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#132
|
741
985
|
sig { params(node: ::AST::Node).returns(T::Boolean) }
|
742
986
|
def string?(node); end
|
743
987
|
|
988
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#137
|
744
989
|
sig { params(node: ::AST::Node).returns(T::Boolean) }
|
745
990
|
def symbol?(node); end
|
746
991
|
|
747
992
|
# @raise [TypeError]
|
993
|
+
#
|
994
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#216
|
748
995
|
sig { params(hash_node: ::AST::Node, key: ::Symbol).returns(T.untyped) }
|
749
996
|
def value_from_hash(hash_node, key); end
|
750
997
|
|
751
998
|
private
|
752
999
|
|
1000
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#298
|
753
1001
|
sig { params(node: T.nilable(::AST::Node)).returns(T::Boolean) }
|
754
1002
|
def dynamic_class_creation?(node); end
|
755
1003
|
|
756
1004
|
# @raise [TypeError]
|
1005
|
+
#
|
1006
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#249
|
757
1007
|
sig { params(hash_pair_node: ::AST::Node).returns(T.untyped) }
|
758
1008
|
def hash_pair_key(hash_pair_node); end
|
759
1009
|
|
760
1010
|
# @raise [TypeError]
|
1011
|
+
#
|
1012
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#260
|
761
1013
|
sig { params(hash_pair_node: ::AST::Node).returns(T.untyped) }
|
762
1014
|
def hash_pair_value(hash_pair_node); end
|
763
1015
|
|
764
1016
|
# @raise [TypeError]
|
1017
|
+
#
|
1018
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#271
|
765
1019
|
sig { params(hash_node: ::AST::Node).returns(T::Array[::AST::Node]) }
|
766
1020
|
def hash_pairs(hash_node); end
|
767
1021
|
|
768
1022
|
# @raise [TypeError]
|
1023
|
+
#
|
1024
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#280
|
769
1025
|
sig { params(block_node: ::AST::Node).returns(::AST::Node) }
|
770
1026
|
def method_call_node(block_node); end
|
771
1027
|
|
1028
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#289
|
772
1029
|
sig { params(node: ::AST::Node).returns(T::Boolean) }
|
773
1030
|
def module_creation?(node); end
|
774
1031
|
|
1032
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#305
|
775
1033
|
sig { params(node: ::AST::Node).returns(T.nilable(::String)) }
|
776
1034
|
def name_from_block_definition(node); end
|
777
1035
|
|
1036
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#313
|
778
1037
|
sig { params(node: ::AST::Node).returns(T.nilable(::String)) }
|
779
1038
|
def name_part_from_definition(node); end
|
780
1039
|
|
1040
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#323
|
781
1041
|
sig { params(method_call_or_block_node: ::AST::Node).returns(T.nilable(::AST::Node)) }
|
782
1042
|
def receiver(method_call_or_block_node); end
|
783
1043
|
|
1044
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#244
|
784
1045
|
sig { params(node: ::AST::Node).returns(::Symbol) }
|
785
1046
|
def type_of(node); end
|
786
1047
|
end
|
787
1048
|
end
|
788
1049
|
|
1050
|
+
# source://packwerk//lib/packwerk/node_helpers.rb#10
|
789
1051
|
class Packwerk::NodeHelpers::TypeError < ::ArgumentError; end
|
790
1052
|
|
791
1053
|
# Processes a single node in an abstract syntax tree (AST) using the provided checkers.
|
1054
|
+
#
|
1055
|
+
# source://packwerk//lib/packwerk/node_processor.rb#6
|
792
1056
|
class Packwerk::NodeProcessor
|
1057
|
+
# source://packwerk//lib/packwerk/node_processor.rb#15
|
793
1058
|
sig { params(reference_extractor: ::Packwerk::ReferenceExtractor, relative_file: ::String).void }
|
794
1059
|
def initialize(reference_extractor:, relative_file:); end
|
795
1060
|
|
1061
|
+
# source://packwerk//lib/packwerk/node_processor.rb#26
|
796
1062
|
sig do
|
797
1063
|
params(
|
798
1064
|
node: ::Parser::AST::Node,
|
@@ -802,97 +1068,149 @@ class Packwerk::NodeProcessor
|
|
802
1068
|
def call(node, ancestors); end
|
803
1069
|
end
|
804
1070
|
|
1071
|
+
# source://packwerk//lib/packwerk/node_processor_factory.rb#5
|
805
1072
|
class Packwerk::NodeProcessorFactory < ::T::Struct
|
806
|
-
const :constant_name_inspectors, T::Array[::Packwerk::ConstantNameInspector]
|
807
|
-
const :context_provider, ::Packwerk::ConstantDiscovery
|
808
1073
|
const :root_path, ::String
|
1074
|
+
const :context_provider, ::Packwerk::ConstantDiscovery
|
1075
|
+
const :constant_name_inspectors, T::Array[::Packwerk::ConstantNameInspector]
|
809
1076
|
|
1077
|
+
# source://packwerk//lib/packwerk/node_processor_factory.rb#13
|
810
1078
|
sig { params(relative_file: ::String, node: ::AST::Node).returns(::Packwerk::NodeProcessor) }
|
811
1079
|
def for(relative_file:, node:); end
|
812
1080
|
|
813
1081
|
private
|
814
1082
|
|
1083
|
+
# source://packwerk//lib/packwerk/node_processor_factory.rb#23
|
815
1084
|
sig { params(node: ::AST::Node).returns(::Packwerk::ReferenceExtractor) }
|
816
1085
|
def reference_extractor(node:); end
|
817
1086
|
|
818
1087
|
class << self
|
1088
|
+
# source://sorbet-runtime/0.5.10588/lib/types/struct.rb#13
|
819
1089
|
def inherited(s); end
|
820
1090
|
end
|
821
1091
|
end
|
822
1092
|
|
823
1093
|
# Visits all nodes of an AST, processing them using a given node processor.
|
1094
|
+
#
|
1095
|
+
# source://packwerk//lib/packwerk/node_visitor.rb#6
|
824
1096
|
class Packwerk::NodeVisitor
|
1097
|
+
# source://packwerk//lib/packwerk/node_visitor.rb#10
|
825
1098
|
sig { params(node_processor: ::Packwerk::NodeProcessor).void }
|
826
1099
|
def initialize(node_processor:); end
|
827
1100
|
|
1101
|
+
# source://packwerk//lib/packwerk/node_visitor.rb#14
|
828
1102
|
def visit(node, ancestors:, result:); end
|
829
1103
|
end
|
830
1104
|
|
1105
|
+
# source://packwerk//lib/packwerk/offense.rb#7
|
831
1106
|
class Packwerk::Offense
|
1107
|
+
# source://packwerk//lib/packwerk/offense.rb#24
|
832
1108
|
sig { params(file: ::String, message: ::String, location: T.nilable(::Packwerk::Node::Location)).void }
|
833
1109
|
def initialize(file:, message:, location: T.unsafe(nil)); end
|
834
1110
|
|
1111
|
+
# source://packwerk//lib/packwerk/offense.rb#15
|
835
1112
|
sig { returns(::String) }
|
836
1113
|
def file; end
|
837
1114
|
|
1115
|
+
# source://packwerk//lib/packwerk/offense.rb#12
|
838
1116
|
sig { returns(T.nilable(::Packwerk::Node::Location)) }
|
839
1117
|
def location; end
|
840
1118
|
|
1119
|
+
# source://packwerk//lib/packwerk/offense.rb#18
|
841
1120
|
sig { returns(::String) }
|
842
1121
|
def message; end
|
843
1122
|
|
1123
|
+
# source://packwerk//lib/packwerk/offense.rb#31
|
844
1124
|
sig { params(style: ::Packwerk::OutputStyle).returns(::String) }
|
845
1125
|
def to_s(style = T.unsafe(nil)); end
|
846
1126
|
end
|
847
1127
|
|
1128
|
+
# source://packwerk//lib/packwerk/offense_collection.rb#7
|
848
1129
|
class Packwerk::OffenseCollection
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
deprecated_references: T::Hash[::Packwerk::Package, ::Packwerk::DeprecatedReferences]
|
853
|
-
).void
|
854
|
-
end
|
855
|
-
def initialize(root_path, deprecated_references = T.unsafe(nil)); end
|
1130
|
+
# source://packwerk//lib/packwerk/offense_collection.rb#17
|
1131
|
+
sig { params(root_path: ::String, package_todo: T::Hash[::Packwerk::Package, ::Packwerk::PackageTodo]).void }
|
1132
|
+
def initialize(root_path, package_todo = T.unsafe(nil)); end
|
856
1133
|
|
1134
|
+
# source://packwerk//lib/packwerk/offense_collection.rb#48
|
857
1135
|
sig { params(offense: ::Packwerk::Offense).void }
|
858
1136
|
def add_offense(offense); end
|
859
1137
|
|
860
|
-
|
861
|
-
def dump_deprecated_references_files; end
|
862
|
-
|
1138
|
+
# source://packwerk//lib/packwerk/offense_collection.rb#29
|
863
1139
|
sig { returns(T::Array[::Packwerk::Offense]) }
|
864
1140
|
def errors; end
|
865
1141
|
|
1142
|
+
# source://packwerk//lib/packwerk/offense_collection.rb#38
|
866
1143
|
sig { params(offense: ::Packwerk::Offense).returns(T::Boolean) }
|
867
1144
|
def listed?(offense); end
|
868
1145
|
|
1146
|
+
# source://packwerk//lib/packwerk/offense_collection.rb#26
|
869
1147
|
sig { returns(T::Array[::Packwerk::ReferenceOffense]) }
|
870
1148
|
def new_violations; end
|
871
1149
|
|
1150
|
+
# source://packwerk//lib/packwerk/offense_collection.rb#75
|
872
1151
|
sig { returns(T::Array[::Packwerk::Offense]) }
|
873
1152
|
def outstanding_offenses; end
|
874
1153
|
|
1154
|
+
# source://packwerk//lib/packwerk/offense_collection.rb#69
|
1155
|
+
sig { params(package_set: Packwerk::PackageSet).void }
|
1156
|
+
def persist_package_todo_files(package_set); end
|
1157
|
+
|
1158
|
+
# source://packwerk//lib/packwerk/offense_collection.rb#62
|
875
1159
|
sig { params(for_files: T::Set[::String]).returns(T::Boolean) }
|
876
1160
|
def stale_violations?(for_files); end
|
877
1161
|
|
1162
|
+
# source://packwerk//lib/packwerk/offense_collection.rb#32
|
1163
|
+
sig { returns(T::Array[::Packwerk::ReferenceOffense]) }
|
1164
|
+
def strict_mode_violations; end
|
1165
|
+
|
878
1166
|
private
|
879
1167
|
|
1168
|
+
# source://packwerk//lib/packwerk/offense_collection.rb#82
|
1169
|
+
sig { params(offense: ::Packwerk::ReferenceOffense).returns(T::Boolean) }
|
1170
|
+
def already_listed?(offense); end
|
1171
|
+
|
1172
|
+
# source://packwerk//lib/packwerk/offense_collection.rb#94
|
1173
|
+
sig { params(package_set: Packwerk::PackageSet).void }
|
1174
|
+
def cleanup_extra_package_todo_files(package_set); end
|
1175
|
+
|
1176
|
+
# source://packwerk//lib/packwerk/offense_collection.rb#106
|
1177
|
+
sig { void }
|
1178
|
+
def dump_package_todo_files; end
|
1179
|
+
|
1180
|
+
# source://packwerk//lib/packwerk/offense_collection.rb#119
|
880
1181
|
sig { params(package: ::Packwerk::Package).returns(::String) }
|
881
|
-
def
|
1182
|
+
def package_todo_file_for(package); end
|
882
1183
|
|
883
|
-
|
884
|
-
|
1184
|
+
# source://packwerk//lib/packwerk/offense_collection.rb#111
|
1185
|
+
sig { params(package: ::Packwerk::Package).returns(::Packwerk::PackageTodo) }
|
1186
|
+
def package_todo_for(package); end
|
1187
|
+
|
1188
|
+
# source://packwerk//lib/packwerk/offense_collection.rb#88
|
1189
|
+
sig { params(offense: ::Packwerk::ReferenceOffense).returns(T::Boolean) }
|
1190
|
+
def strict_mode_violation?(offense); end
|
885
1191
|
end
|
886
1192
|
|
887
1193
|
# @abstract Subclasses must implement the `abstract` methods below.
|
1194
|
+
#
|
1195
|
+
# source://packwerk//lib/packwerk/offenses_formatter.rb#5
|
888
1196
|
module Packwerk::OffensesFormatter
|
889
|
-
|
1197
|
+
abstract!
|
1198
|
+
|
1199
|
+
# @abstract
|
1200
|
+
#
|
1201
|
+
# source://packwerk//lib/packwerk/offenses_formatter.rb#69
|
1202
|
+
sig { abstract.returns(::String) }
|
1203
|
+
def identifier; end
|
890
1204
|
|
891
1205
|
# @abstract
|
1206
|
+
#
|
1207
|
+
# source://packwerk//lib/packwerk/offenses_formatter.rb#61
|
892
1208
|
sig { abstract.params(offenses: T::Array[T.nilable(::Packwerk::Offense)]).returns(::String) }
|
893
1209
|
def show_offenses(offenses); end
|
894
1210
|
|
895
1211
|
# @abstract
|
1212
|
+
#
|
1213
|
+
# source://packwerk//lib/packwerk/offenses_formatter.rb#65
|
896
1214
|
sig do
|
897
1215
|
abstract
|
898
1216
|
.params(
|
@@ -901,52 +1219,103 @@ module Packwerk::OffensesFormatter
|
|
901
1219
|
).returns(::String)
|
902
1220
|
end
|
903
1221
|
def show_stale_violations(offense_collection, for_files); end
|
1222
|
+
|
1223
|
+
# @abstract
|
1224
|
+
#
|
1225
|
+
# source://packwerk//lib/packwerk/offenses_formatter.rb#73
|
1226
|
+
sig { abstract.params(strict_mode_violations: T::Array[::Packwerk::ReferenceOffense]).returns(::String) }
|
1227
|
+
def show_strict_mode_violations(strict_mode_violations); end
|
1228
|
+
|
1229
|
+
class << self
|
1230
|
+
# source://packwerk//lib/packwerk/offenses_formatter.rb#31
|
1231
|
+
sig { returns(T::Array[::Packwerk::OffensesFormatter]) }
|
1232
|
+
def all; end
|
1233
|
+
|
1234
|
+
# source://packwerk//lib/packwerk/offenses_formatter.rb#36
|
1235
|
+
sig { params(identifier: ::String).returns(::Packwerk::OffensesFormatter) }
|
1236
|
+
def find(identifier); end
|
1237
|
+
|
1238
|
+
# source://packwerk//lib/packwerk/offenses_formatter.rb#24
|
1239
|
+
sig { params(base: ::Class).void }
|
1240
|
+
def included(base); end
|
1241
|
+
|
1242
|
+
private
|
1243
|
+
|
1244
|
+
# source://packwerk//lib/packwerk/offenses_formatter.rb#43
|
1245
|
+
sig { params(name: ::String).returns(::Packwerk::OffensesFormatter) }
|
1246
|
+
def formatter_by_identifier(name); end
|
1247
|
+
end
|
1248
|
+
end
|
1249
|
+
|
1250
|
+
# source://packwerk//lib/packwerk/offenses_formatter.rb#11
|
1251
|
+
class Packwerk::OffensesFormatter::DuplicateFormatterError < ::StandardError
|
1252
|
+
# source://packwerk//lib/packwerk/offenses_formatter.rb#15
|
1253
|
+
sig { params(identifier: ::String).void }
|
1254
|
+
def initialize(identifier); end
|
904
1255
|
end
|
905
1256
|
|
906
1257
|
# @abstract Subclasses must implement the `abstract` methods below.
|
1258
|
+
#
|
1259
|
+
# source://packwerk//lib/packwerk/output_style.rb#5
|
907
1260
|
module Packwerk::OutputStyle
|
908
1261
|
interface!
|
909
1262
|
|
910
1263
|
# @abstract
|
1264
|
+
#
|
1265
|
+
# source://packwerk//lib/packwerk/output_style.rb#18
|
911
1266
|
sig { abstract.returns(::String) }
|
912
1267
|
def error; end
|
913
1268
|
|
914
1269
|
# @abstract
|
1270
|
+
#
|
1271
|
+
# source://packwerk//lib/packwerk/output_style.rb#15
|
915
1272
|
sig { abstract.returns(::String) }
|
916
1273
|
def filename; end
|
917
1274
|
|
918
1275
|
# @abstract
|
1276
|
+
#
|
1277
|
+
# source://packwerk//lib/packwerk/output_style.rb#12
|
919
1278
|
sig { abstract.returns(::String) }
|
920
1279
|
def reset; end
|
921
1280
|
end
|
922
1281
|
|
1282
|
+
# source://packwerk//lib/packwerk.rb#55
|
923
1283
|
module Packwerk::OutputStyles
|
924
1284
|
extend ::ActiveSupport::Autoload
|
925
1285
|
end
|
926
1286
|
|
927
1287
|
# See https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit for ANSI escape colour codes
|
1288
|
+
#
|
1289
|
+
# source://packwerk//lib/packwerk/output_styles/coloured.rb#7
|
928
1290
|
class Packwerk::OutputStyles::Coloured
|
929
1291
|
include ::Packwerk::OutputStyle
|
930
1292
|
|
1293
|
+
# source://packwerk//lib/packwerk/output_styles/coloured.rb#23
|
931
1294
|
sig { override.returns(::String) }
|
932
1295
|
def error; end
|
933
1296
|
|
1297
|
+
# source://packwerk//lib/packwerk/output_styles/coloured.rb#17
|
934
1298
|
sig { override.returns(::String) }
|
935
1299
|
def filename; end
|
936
1300
|
|
1301
|
+
# source://packwerk//lib/packwerk/output_styles/coloured.rb#12
|
937
1302
|
sig { override.returns(::String) }
|
938
1303
|
def reset; end
|
939
1304
|
end
|
940
1305
|
|
1306
|
+
# source://packwerk//lib/packwerk/output_styles/plain.rb#6
|
941
1307
|
class Packwerk::OutputStyles::Plain
|
942
1308
|
include ::Packwerk::OutputStyle
|
943
1309
|
|
1310
|
+
# source://packwerk//lib/packwerk/output_styles/plain.rb#21
|
944
1311
|
sig { override.returns(::String) }
|
945
1312
|
def error; end
|
946
1313
|
|
1314
|
+
# source://packwerk//lib/packwerk/output_styles/plain.rb#16
|
947
1315
|
sig { override.returns(::String) }
|
948
1316
|
def filename; end
|
949
1317
|
|
1318
|
+
# source://packwerk//lib/packwerk/output_styles/plain.rb#11
|
950
1319
|
sig { override.returns(::String) }
|
951
1320
|
def reset; end
|
952
1321
|
end
|
@@ -954,78 +1323,94 @@ end
|
|
954
1323
|
# The basic unit of modularity for packwerk; a folder that has been declared to define a package.
|
955
1324
|
# The package contains all constants defined in files in this folder and all subfolders that are not packages
|
956
1325
|
# themselves.
|
1326
|
+
#
|
1327
|
+
# source://packwerk//lib/packwerk/package.rb#8
|
957
1328
|
class Packwerk::Package
|
958
1329
|
include ::Comparable
|
959
1330
|
|
1331
|
+
# source://packwerk//lib/packwerk/package.rb#24
|
960
1332
|
sig { params(name: ::String, config: T.nilable(T.any(::FalseClass, T::Hash[T.untyped, T.untyped]))).void }
|
961
1333
|
def initialize(name:, config:); end
|
962
1334
|
|
1335
|
+
# source://packwerk//lib/packwerk/package.rb#49
|
963
1336
|
sig { params(other: T.untyped).returns(T.nilable(::Integer)) }
|
964
1337
|
def <=>(other); end
|
965
1338
|
|
1339
|
+
# source://packwerk//lib/packwerk/package.rb#21
|
1340
|
+
sig { returns(T::Hash[T.untyped, T.untyped]) }
|
1341
|
+
def config; end
|
1342
|
+
|
1343
|
+
# source://packwerk//lib/packwerk/package.rb#18
|
966
1344
|
sig { returns(T::Array[::String]) }
|
967
1345
|
def dependencies; end
|
968
1346
|
|
1347
|
+
# source://packwerk//lib/packwerk/package.rb#37
|
969
1348
|
sig { params(package: ::Packwerk::Package).returns(T::Boolean) }
|
970
1349
|
def dependency?(package); end
|
971
1350
|
|
1351
|
+
# source://packwerk//lib/packwerk/package.rb#32
|
972
1352
|
sig { returns(T::Boolean) }
|
973
1353
|
def enforce_dependencies?; end
|
974
1354
|
|
975
|
-
|
976
|
-
def enforce_privacy; end
|
977
|
-
|
1355
|
+
# source://packwerk//lib/packwerk/package.rb#56
|
978
1356
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
979
1357
|
def eql?(other); end
|
980
1358
|
|
1359
|
+
# source://packwerk//lib/packwerk/package.rb#61
|
981
1360
|
sig { returns(::Integer) }
|
982
1361
|
def hash; end
|
983
1362
|
|
1363
|
+
# source://packwerk//lib/packwerk/package.rb#15
|
984
1364
|
sig { returns(::String) }
|
985
1365
|
def name; end
|
986
1366
|
|
1367
|
+
# source://packwerk//lib/packwerk/package.rb#42
|
987
1368
|
sig { params(path: ::String).returns(T::Boolean) }
|
988
1369
|
def package_path?(path); end
|
989
1370
|
|
990
|
-
|
991
|
-
def public_path; end
|
992
|
-
|
993
|
-
sig { params(path: ::String).returns(T::Boolean) }
|
994
|
-
def public_path?(path); end
|
995
|
-
|
1371
|
+
# source://packwerk//lib/packwerk/package.rb#71
|
996
1372
|
sig { returns(T::Boolean) }
|
997
1373
|
def root?; end
|
998
1374
|
|
1375
|
+
# source://packwerk//lib/packwerk/package.rb#66
|
999
1376
|
sig { returns(::String) }
|
1000
1377
|
def to_s; end
|
1001
|
-
|
1002
|
-
sig { returns(T.nilable(::String)) }
|
1003
|
-
def user_defined_public_path; end
|
1004
1378
|
end
|
1005
1379
|
|
1380
|
+
# source://packwerk//lib/packwerk/package.rb#12
|
1006
1381
|
Packwerk::Package::ROOT_PACKAGE_NAME = T.let(T.unsafe(nil), String)
|
1007
1382
|
|
1008
1383
|
# A set of {Packwerk::Package}s as well as methods to parse packages from the filesystem.
|
1384
|
+
#
|
1385
|
+
# source://packwerk//lib/packwerk/package_set.rb#11
|
1009
1386
|
class Packwerk::PackageSet
|
1010
1387
|
extend T::Generic
|
1011
1388
|
include ::Enumerable
|
1012
1389
|
|
1390
|
+
Elem = type_member { { fixed: Packwerk::Package } }
|
1391
|
+
|
1392
|
+
# source://packwerk//lib/packwerk/package_set.rb#79
|
1013
1393
|
sig { params(packages: T::Array[::Packwerk::Package]).void }
|
1014
1394
|
def initialize(packages); end
|
1015
1395
|
|
1396
|
+
# source://packwerk//lib/packwerk/package_set.rb#88
|
1016
1397
|
sig { override.params(blk: T.proc.params(arg0: ::Packwerk::Package).returns(T.untyped)).returns(T.untyped) }
|
1017
1398
|
def each(&blk); end
|
1018
1399
|
|
1400
|
+
# source://packwerk//lib/packwerk/package_set.rb#93
|
1019
1401
|
sig { params(name: ::String).returns(T.nilable(::Packwerk::Package)) }
|
1020
1402
|
def fetch(name); end
|
1021
1403
|
|
1404
|
+
# source://packwerk//lib/packwerk/package_set.rb#98
|
1022
1405
|
sig { params(file_path: T.any(::Pathname, ::String)).returns(::Packwerk::Package) }
|
1023
1406
|
def package_from_path(file_path); end
|
1024
1407
|
|
1408
|
+
# source://packwerk//lib/packwerk/package_set.rb#76
|
1025
1409
|
sig { returns(T::Hash[::String, ::Packwerk::Package]) }
|
1026
1410
|
def packages; end
|
1027
1411
|
|
1028
1412
|
class << self
|
1413
|
+
# source://packwerk//lib/packwerk/package_set.rb#24
|
1029
1414
|
sig do
|
1030
1415
|
params(
|
1031
1416
|
root_path: ::String,
|
@@ -1034,6 +1419,7 @@ class Packwerk::PackageSet
|
|
1034
1419
|
end
|
1035
1420
|
def load_all_from(root_path, package_pathspec: T.unsafe(nil)); end
|
1036
1421
|
|
1422
|
+
# source://packwerk//lib/packwerk/package_set.rb#44
|
1037
1423
|
sig do
|
1038
1424
|
params(
|
1039
1425
|
root_path: ::String,
|
@@ -1045,41 +1431,92 @@ class Packwerk::PackageSet
|
|
1045
1431
|
|
1046
1432
|
private
|
1047
1433
|
|
1434
|
+
# source://packwerk//lib/packwerk/package_set.rb#61
|
1048
1435
|
sig { params(packages: T::Array[::Packwerk::Package]).void }
|
1049
1436
|
def create_root_package_if_none_in(packages); end
|
1050
1437
|
|
1438
|
+
# source://packwerk//lib/packwerk/package_set.rb#68
|
1051
1439
|
sig { params(globs: T::Array[::String], path: ::Pathname).returns(T::Boolean) }
|
1052
1440
|
def exclude_path?(globs, path); end
|
1053
1441
|
end
|
1054
1442
|
end
|
1055
1443
|
|
1444
|
+
# source://packwerk//lib/packwerk/package_set.rb#18
|
1056
1445
|
Packwerk::PackageSet::PACKAGE_CONFIG_FILENAME = T.let(T.unsafe(nil), String)
|
1057
1446
|
|
1447
|
+
# source://packwerk//lib/packwerk/package_todo.rb#7
|
1448
|
+
class Packwerk::PackageTodo
|
1449
|
+
# source://packwerk//lib/packwerk/package_todo.rb#15
|
1450
|
+
sig { params(package: ::Packwerk::Package, filepath: ::String).void }
|
1451
|
+
def initialize(package, filepath); end
|
1452
|
+
|
1453
|
+
# source://packwerk//lib/packwerk/package_todo.rb#39
|
1454
|
+
sig { params(reference: ::Packwerk::Reference, violation_type: ::String).returns(T::Boolean) }
|
1455
|
+
def add_entries(reference, violation_type); end
|
1456
|
+
|
1457
|
+
# source://packwerk//lib/packwerk/package_todo.rb#114
|
1458
|
+
sig { void }
|
1459
|
+
def delete_if_exists; end
|
1460
|
+
|
1461
|
+
# source://packwerk//lib/packwerk/package_todo.rb#93
|
1462
|
+
sig { void }
|
1463
|
+
def dump; end
|
1464
|
+
|
1465
|
+
# source://packwerk//lib/packwerk/package_todo.rb#26
|
1466
|
+
sig { params(reference: ::Packwerk::Reference, violation_type: ::String).returns(T::Boolean) }
|
1467
|
+
def listed?(reference, violation_type:); end
|
1468
|
+
|
1469
|
+
# source://packwerk//lib/packwerk/package_todo.rb#54
|
1470
|
+
sig { params(for_files: T::Set[::String]).returns(T::Boolean) }
|
1471
|
+
def stale_violations?(for_files); end
|
1472
|
+
|
1473
|
+
private
|
1474
|
+
|
1475
|
+
# source://packwerk//lib/packwerk/package_todo.rb#143
|
1476
|
+
sig { params(filepath: ::String).returns(T::Hash[::String, T.untyped]) }
|
1477
|
+
def load_yaml(filepath); end
|
1478
|
+
|
1479
|
+
# source://packwerk//lib/packwerk/package_todo.rb#121
|
1480
|
+
sig { returns(T::Hash[::String, T.untyped]) }
|
1481
|
+
def prepare_entries_for_dump; end
|
1482
|
+
|
1483
|
+
# source://packwerk//lib/packwerk/package_todo.rb#134
|
1484
|
+
sig { returns(T::Hash[::String, T.untyped]) }
|
1485
|
+
def todo_list; end
|
1486
|
+
end
|
1487
|
+
|
1488
|
+
# source://packwerk//lib/packwerk/package_todo.rb#10
|
1489
|
+
Packwerk::PackageTodo::EntriesType = T.type_alias { T::Hash[::String, T.untyped] }
|
1490
|
+
|
1491
|
+
# source://packwerk//lib/packwerk/parse_run.rb#7
|
1058
1492
|
class Packwerk::ParseRun
|
1493
|
+
# source://packwerk//lib/packwerk/parse_run.rb#23
|
1059
1494
|
sig do
|
1060
1495
|
params(
|
1061
1496
|
relative_file_set: T::Set[::String],
|
1062
1497
|
configuration: ::Packwerk::Configuration,
|
1063
|
-
|
1064
|
-
offenses_formatter: ::Packwerk::OffensesFormatter
|
1498
|
+
file_set_specified: T::Boolean,
|
1499
|
+
offenses_formatter: T.nilable(::Packwerk::OffensesFormatter),
|
1500
|
+
progress_formatter: ::Packwerk::Formatters::ProgressFormatter
|
1065
1501
|
).void
|
1066
1502
|
end
|
1067
|
-
def initialize(relative_file_set:, configuration:,
|
1503
|
+
def initialize(relative_file_set:, configuration:, file_set_specified: T.unsafe(nil), offenses_formatter: T.unsafe(nil), progress_formatter: T.unsafe(nil)); end
|
1068
1504
|
|
1505
|
+
# source://packwerk//lib/packwerk/parse_run.rb#61
|
1069
1506
|
sig { returns(::Packwerk::Result) }
|
1070
1507
|
def check; end
|
1071
1508
|
|
1509
|
+
# source://packwerk//lib/packwerk/parse_run.rb#39
|
1072
1510
|
sig { returns(::Packwerk::Result) }
|
1073
|
-
def
|
1074
|
-
|
1075
|
-
sig { returns(::Packwerk::Result) }
|
1076
|
-
def update_deprecations; end
|
1511
|
+
def update_todo; end
|
1077
1512
|
|
1078
1513
|
private
|
1079
1514
|
|
1080
|
-
|
1081
|
-
|
1515
|
+
# source://packwerk//lib/packwerk/parse_run.rb#80
|
1516
|
+
sig { params(run_context: ::Packwerk::RunContext, show_errors: T::Boolean).returns(::Packwerk::OffenseCollection) }
|
1517
|
+
def find_offenses(run_context, show_errors: T.unsafe(nil)); end
|
1082
1518
|
|
1519
|
+
# source://packwerk//lib/packwerk/parse_run.rb#103
|
1083
1520
|
sig do
|
1084
1521
|
params(
|
1085
1522
|
block: T.proc.params(path: ::String).returns(T::Array[::Packwerk::Offense])
|
@@ -1087,106 +1524,159 @@ class Packwerk::ParseRun
|
|
1087
1524
|
end
|
1088
1525
|
def serial_find_offenses(&block); end
|
1089
1526
|
|
1527
|
+
# source://packwerk//lib/packwerk/parse_run.rb#118
|
1090
1528
|
sig { params(failed: T::Boolean).void }
|
1091
1529
|
def update_progress(failed: T.unsafe(nil)); end
|
1092
1530
|
end
|
1093
1531
|
|
1532
|
+
# source://packwerk//lib/packwerk/parse_run.rb#10
|
1094
1533
|
Packwerk::ParseRun::ProcessFileProc = T.type_alias { T.proc.params(path: ::String).returns(T::Array[::Packwerk::Offense]) }
|
1095
1534
|
|
1096
1535
|
# A collection of constant definitions parsed from an Abstract Syntax Tree (AST).
|
1536
|
+
#
|
1537
|
+
# source://packwerk//lib/packwerk/parsed_constant_definitions.rb#8
|
1097
1538
|
class Packwerk::ParsedConstantDefinitions
|
1098
1539
|
# @return [ParsedConstantDefinitions] a new instance of ParsedConstantDefinitions
|
1540
|
+
#
|
1541
|
+
# source://packwerk//lib/packwerk/parsed_constant_definitions.rb#24
|
1099
1542
|
def initialize(root_node:); end
|
1100
1543
|
|
1101
1544
|
# @return [Boolean]
|
1545
|
+
#
|
1546
|
+
# source://packwerk//lib/packwerk/parsed_constant_definitions.rb#30
|
1102
1547
|
def local_reference?(constant_name, location: T.unsafe(nil), namespace_path: T.unsafe(nil)); end
|
1103
1548
|
|
1104
1549
|
private
|
1105
1550
|
|
1551
|
+
# source://packwerk//lib/packwerk/parsed_constant_definitions.rb#58
|
1106
1552
|
def add_definition(constant_name, current_namespace_path, location); end
|
1553
|
+
|
1554
|
+
# source://packwerk//lib/packwerk/parsed_constant_definitions.rb#41
|
1107
1555
|
def collect_local_definitions_from_root(node, current_namespace_path = T.unsafe(nil)); end
|
1108
1556
|
|
1109
1557
|
class << self
|
1110
1558
|
# What fully qualified constants can this constant refer to in this context?
|
1559
|
+
#
|
1560
|
+
# source://packwerk//lib/packwerk/parsed_constant_definitions.rb#11
|
1111
1561
|
def reference_qualifications(constant_name, namespace_path:); end
|
1112
1562
|
end
|
1113
1563
|
end
|
1114
1564
|
|
1565
|
+
# source://packwerk//lib/packwerk/parsers.rb#5
|
1115
1566
|
module Packwerk::Parsers; end
|
1116
1567
|
|
1568
|
+
# source://packwerk//lib/packwerk/parsers/erb.rb#11
|
1117
1569
|
class Packwerk::Parsers::Erb
|
1118
1570
|
include ::Packwerk::Parsers::ParserInterface
|
1119
1571
|
|
1120
1572
|
# @return [Erb] a new instance of Erb
|
1573
|
+
#
|
1574
|
+
# source://packwerk//lib/packwerk/parsers/erb.rb#14
|
1121
1575
|
def initialize(parser_class: T.unsafe(nil), ruby_parser: T.unsafe(nil)); end
|
1122
1576
|
|
1577
|
+
# source://packwerk//lib/packwerk/parsers/erb.rb#19
|
1123
1578
|
def call(io:, file_path: T.unsafe(nil)); end
|
1579
|
+
|
1580
|
+
# source://packwerk//lib/packwerk/parsers/erb.rb#25
|
1124
1581
|
def parse_buffer(buffer, file_path:); end
|
1125
1582
|
|
1126
1583
|
private
|
1127
1584
|
|
1128
1585
|
# @yield [node]
|
1586
|
+
#
|
1587
|
+
# source://packwerk//lib/packwerk/parsers/erb.rb#52
|
1129
1588
|
def code_nodes(node, &block); end
|
1130
1589
|
|
1590
|
+
# source://packwerk//lib/packwerk/parsers/erb.rb#38
|
1131
1591
|
def to_ruby_ast(erb_ast, file_path); end
|
1132
1592
|
end
|
1133
1593
|
|
1594
|
+
# source://packwerk//lib/packwerk/parsers/factory.rb#8
|
1134
1595
|
class Packwerk::Parsers::Factory
|
1135
1596
|
include ::Singleton
|
1136
1597
|
extend ::Singleton::SingletonClassMethods
|
1137
1598
|
|
1599
|
+
# source://packwerk//lib/packwerk/parsers/factory.rb#33
|
1138
1600
|
def erb_parser_class; end
|
1601
|
+
|
1602
|
+
# source://packwerk//lib/packwerk/parsers/factory.rb#37
|
1139
1603
|
def erb_parser_class=(klass); end
|
1140
1604
|
|
1605
|
+
# source://packwerk//lib/packwerk/parsers/factory.rb#24
|
1141
1606
|
sig { params(path: ::String).returns(T.nilable(::Packwerk::Parsers::ParserInterface)) }
|
1142
1607
|
def for_path(path); end
|
1143
1608
|
end
|
1144
1609
|
|
1610
|
+
# source://packwerk//lib/packwerk/parsers/factory.rb#20
|
1145
1611
|
Packwerk::Parsers::Factory::ERB_REGEX = T.let(T.unsafe(nil), Regexp)
|
1612
|
+
|
1613
|
+
# source://packwerk//lib/packwerk/parsers/factory.rb#12
|
1146
1614
|
Packwerk::Parsers::Factory::RUBY_REGEX = T.let(T.unsafe(nil), Regexp)
|
1147
1615
|
|
1616
|
+
# source://packwerk//lib/packwerk/parsers.rb#13
|
1148
1617
|
class Packwerk::Parsers::ParseError < ::StandardError
|
1149
1618
|
# @return [ParseError] a new instance of ParseError
|
1619
|
+
#
|
1620
|
+
# source://packwerk//lib/packwerk/parsers.rb#16
|
1150
1621
|
def initialize(result); end
|
1151
1622
|
|
1152
1623
|
# Returns the value of attribute result.
|
1624
|
+
#
|
1625
|
+
# source://packwerk//lib/packwerk/parsers.rb#14
|
1153
1626
|
def result; end
|
1154
1627
|
end
|
1155
1628
|
|
1629
|
+
# source://packwerk//lib/packwerk/parsers.rb#11
|
1156
1630
|
class Packwerk::Parsers::ParseResult < ::Packwerk::Offense; end
|
1157
1631
|
|
1158
1632
|
# @abstract Subclasses must implement the `abstract` methods below.
|
1633
|
+
#
|
1634
|
+
# source://packwerk//lib/packwerk/parsers/parser_interface.rb#6
|
1159
1635
|
module Packwerk::Parsers::ParserInterface
|
1160
1636
|
requires_ancestor { Kernel }
|
1161
1637
|
|
1162
1638
|
interface!
|
1163
1639
|
|
1164
1640
|
# @abstract
|
1641
|
+
#
|
1642
|
+
# source://packwerk//lib/packwerk/parsers/parser_interface.rb#15
|
1165
1643
|
sig { abstract.params(io: ::File, file_path: ::String).returns(T.untyped) }
|
1166
1644
|
def call(io:, file_path:); end
|
1167
1645
|
end
|
1168
1646
|
|
1647
|
+
# source://packwerk//lib/packwerk/parsers/ruby.rb#9
|
1169
1648
|
class Packwerk::Parsers::Ruby
|
1170
1649
|
include ::Packwerk::Parsers::ParserInterface
|
1171
1650
|
|
1172
1651
|
# @return [Ruby] a new instance of Ruby
|
1652
|
+
#
|
1653
|
+
# source://packwerk//lib/packwerk/parsers/ruby.rb#25
|
1173
1654
|
def initialize(parser_class: T.unsafe(nil)); end
|
1174
1655
|
|
1656
|
+
# source://packwerk//lib/packwerk/parsers/ruby.rb#30
|
1175
1657
|
def call(io:, file_path: T.unsafe(nil)); end
|
1176
1658
|
end
|
1177
1659
|
|
1660
|
+
# source://packwerk//lib/packwerk/parsers/ruby.rb#12
|
1178
1661
|
class Packwerk::Parsers::Ruby::RaiseExceptionsParser < ::Parser::Ruby27
|
1179
1662
|
# @return [RaiseExceptionsParser] a new instance of RaiseExceptionsParser
|
1663
|
+
#
|
1664
|
+
# source://packwerk//lib/packwerk/parsers/ruby.rb#13
|
1180
1665
|
def initialize(builder); end
|
1181
1666
|
end
|
1182
1667
|
|
1668
|
+
# source://packwerk//lib/packwerk/parsers/ruby.rb#19
|
1183
1669
|
class Packwerk::Parsers::Ruby::TolerateInvalidUtf8Builder < ::Parser::Builders::Default
|
1670
|
+
# source://packwerk//lib/packwerk/parsers/ruby.rb#20
|
1184
1671
|
def string_value(token); end
|
1185
1672
|
end
|
1186
1673
|
|
1674
|
+
# source://packwerk//lib/packwerk/package_set.rb#8
|
1187
1675
|
Packwerk::PathSpec = T.type_alias { T.any(::String, T::Array[::String]) }
|
1188
1676
|
|
1189
1677
|
# A reference from a file in one package to a constant that may be defined in a different package.
|
1678
|
+
#
|
1679
|
+
# source://packwerk//lib/packwerk/reference.rb#6
|
1190
1680
|
class Packwerk::Reference < ::Struct
|
1191
1681
|
# Returns the value of attribute constant
|
1192
1682
|
#
|
@@ -1197,8 +1687,23 @@ class Packwerk::Reference < ::Struct
|
|
1197
1687
|
#
|
1198
1688
|
# @param value [Object] the value to set the attribute constant to.
|
1199
1689
|
# @return [Object] the newly set value
|
1690
|
+
#
|
1691
|
+
# source://packwerk//lib/packwerk/reference.rb#6
|
1200
1692
|
def constant=(_); end
|
1201
1693
|
|
1694
|
+
# Returns the value of attribute package
|
1695
|
+
#
|
1696
|
+
# @return [Object] the current value of package
|
1697
|
+
def package; end
|
1698
|
+
|
1699
|
+
# Sets the attribute package
|
1700
|
+
#
|
1701
|
+
# @param value [Object] the value to set the attribute package to.
|
1702
|
+
# @return [Object] the newly set value
|
1703
|
+
#
|
1704
|
+
# source://packwerk//lib/packwerk/reference.rb#6
|
1705
|
+
def package=(_); end
|
1706
|
+
|
1202
1707
|
# Returns the value of attribute relative_path
|
1203
1708
|
#
|
1204
1709
|
# @return [Object] the current value of relative_path
|
@@ -1208,6 +1713,8 @@ class Packwerk::Reference < ::Struct
|
|
1208
1713
|
#
|
1209
1714
|
# @param value [Object] the value to set the attribute relative_path to.
|
1210
1715
|
# @return [Object] the newly set value
|
1716
|
+
#
|
1717
|
+
# source://packwerk//lib/packwerk/reference.rb#6
|
1211
1718
|
def relative_path=(_); end
|
1212
1719
|
|
1213
1720
|
# Returns the value of attribute source_location
|
@@ -1219,18 +1726,9 @@ class Packwerk::Reference < ::Struct
|
|
1219
1726
|
#
|
1220
1727
|
# @param value [Object] the value to set the attribute source_location to.
|
1221
1728
|
# @return [Object] the newly set value
|
1222
|
-
def source_location=(_); end
|
1223
|
-
|
1224
|
-
# Returns the value of attribute source_package
|
1225
1729
|
#
|
1226
|
-
#
|
1227
|
-
def
|
1228
|
-
|
1229
|
-
# Sets the attribute source_package
|
1230
|
-
#
|
1231
|
-
# @param value [Object] the value to set the attribute source_package to.
|
1232
|
-
# @return [Object] the newly set value
|
1233
|
-
def source_package=(_); end
|
1730
|
+
# source://packwerk//lib/packwerk/reference.rb#6
|
1731
|
+
def source_location=(_); end
|
1234
1732
|
|
1235
1733
|
class << self
|
1236
1734
|
def [](*_arg0); end
|
@@ -1240,85 +1738,64 @@ class Packwerk::Reference < ::Struct
|
|
1240
1738
|
end
|
1241
1739
|
end
|
1242
1740
|
|
1741
|
+
# source://packwerk//lib/packwerk.rb#79
|
1243
1742
|
module Packwerk::ReferenceChecking
|
1244
1743
|
extend ::ActiveSupport::Autoload
|
1245
1744
|
end
|
1246
1745
|
|
1746
|
+
# source://packwerk//lib/packwerk.rb#84
|
1247
1747
|
module Packwerk::ReferenceChecking::Checkers
|
1248
1748
|
extend ::ActiveSupport::Autoload
|
1249
1749
|
end
|
1250
1750
|
|
1251
|
-
# @abstract Subclasses must implement the `abstract` methods below.
|
1252
|
-
module Packwerk::ReferenceChecking::Checkers::Checker
|
1253
|
-
abstract!
|
1254
|
-
|
1255
|
-
# @abstract
|
1256
|
-
sig { abstract.params(reference: ::Packwerk::Reference).returns(T::Boolean) }
|
1257
|
-
def invalid_reference?(reference); end
|
1258
|
-
|
1259
|
-
# @abstract
|
1260
|
-
sig { abstract.params(reference: ::Packwerk::Reference).returns(::String) }
|
1261
|
-
def message(reference); end
|
1262
|
-
|
1263
|
-
sig { params(reference: ::Packwerk::Reference).returns(::String) }
|
1264
|
-
def standard_help_message(reference); end
|
1265
|
-
|
1266
|
-
# @abstract
|
1267
|
-
sig { abstract.returns(::Packwerk::ViolationType) }
|
1268
|
-
def violation_type; end
|
1269
|
-
end
|
1270
|
-
|
1271
1751
|
# Checks whether a given reference conforms to the configured graph of dependencies.
|
1752
|
+
#
|
1753
|
+
# source://packwerk//lib/packwerk/reference_checking/checkers/dependency_checker.rb#8
|
1272
1754
|
class Packwerk::ReferenceChecking::Checkers::DependencyChecker
|
1273
|
-
include ::Packwerk::
|
1755
|
+
include ::Packwerk::Checker
|
1274
1756
|
|
1757
|
+
# source://packwerk//lib/packwerk/reference_checking/checkers/dependency_checker.rb#24
|
1275
1758
|
sig { override.params(reference: ::Packwerk::Reference).returns(T::Boolean) }
|
1276
1759
|
def invalid_reference?(reference); end
|
1277
1760
|
|
1761
|
+
# source://packwerk//lib/packwerk/reference_checking/checkers/dependency_checker.rb#36
|
1278
1762
|
sig { override.params(reference: ::Packwerk::Reference).returns(::String) }
|
1279
1763
|
def message(reference); end
|
1280
1764
|
|
1281
|
-
|
1282
|
-
|
1283
|
-
end
|
1284
|
-
|
1285
|
-
# Checks whether a given reference references a private constant of another package.
|
1286
|
-
class Packwerk::ReferenceChecking::Checkers::PrivacyChecker
|
1287
|
-
include ::Packwerk::ReferenceChecking::Checkers::Checker
|
1288
|
-
|
1289
|
-
sig { override.params(reference: ::Packwerk::Reference).returns(T::Boolean) }
|
1290
|
-
def invalid_reference?(reference); end
|
1291
|
-
|
1292
|
-
sig { override.params(reference: ::Packwerk::Reference).returns(::String) }
|
1293
|
-
def message(reference); end
|
1765
|
+
# source://packwerk//lib/packwerk/reference_checking/checkers/dependency_checker.rb#51
|
1766
|
+
sig { override.params(listed_offense: ::Packwerk::ReferenceOffense).returns(T::Boolean) }
|
1767
|
+
def strict_mode_violation?(listed_offense); end
|
1294
1768
|
|
1295
|
-
|
1769
|
+
# source://packwerk//lib/packwerk/reference_checking/checkers/dependency_checker.rb#15
|
1770
|
+
sig { override.returns(::String) }
|
1296
1771
|
def violation_type; end
|
1297
1772
|
|
1298
1773
|
private
|
1299
1774
|
|
1300
|
-
|
1301
|
-
|
1302
|
-
|
1303
|
-
sig do
|
1304
|
-
params(
|
1305
|
-
constant: ::Packwerk::ConstantDiscovery::ConstantContext,
|
1306
|
-
explicitly_private_constants: T::Array[::String]
|
1307
|
-
).returns(T::Boolean)
|
1308
|
-
end
|
1309
|
-
def explicitly_private_constant?(constant, explicitly_private_constants:); end
|
1775
|
+
# source://packwerk//lib/packwerk/reference_checking/checkers/dependency_checker.rb#59
|
1776
|
+
sig { params(reference: ::Packwerk::Reference).returns(::String) }
|
1777
|
+
def standard_help_message(reference); end
|
1310
1778
|
end
|
1311
1779
|
|
1780
|
+
# source://packwerk//lib/packwerk/reference_checking/checkers/dependency_checker.rb#12
|
1781
|
+
Packwerk::ReferenceChecking::Checkers::DependencyChecker::VIOLATION_TYPE = T.let(T.unsafe(nil), String)
|
1782
|
+
|
1783
|
+
# source://packwerk//lib/packwerk/reference_checking/reference_checker.rb#6
|
1312
1784
|
class Packwerk::ReferenceChecking::ReferenceChecker
|
1313
|
-
|
1785
|
+
# source://packwerk//lib/packwerk/reference_checking/reference_checker.rb#10
|
1786
|
+
sig { params(checkers: T::Array[::Packwerk::Checker]).void }
|
1314
1787
|
def initialize(checkers); end
|
1315
1788
|
|
1789
|
+
# source://packwerk//lib/packwerk/reference_checking/reference_checker.rb#19
|
1316
1790
|
sig { params(reference: ::Packwerk::Reference).returns(T::Array[::Packwerk::Offense]) }
|
1317
1791
|
def call(reference); end
|
1318
1792
|
end
|
1319
1793
|
|
1320
1794
|
# Extracts a possible constant reference from a given AST node.
|
1795
|
+
#
|
1796
|
+
# source://packwerk//lib/packwerk/reference_extractor.rb#6
|
1321
1797
|
class Packwerk::ReferenceExtractor
|
1798
|
+
# source://packwerk//lib/packwerk/reference_extractor.rb#59
|
1322
1799
|
sig do
|
1323
1800
|
params(
|
1324
1801
|
constant_name_inspectors: T::Array[::Packwerk::ConstantNameInspector],
|
@@ -1328,6 +1805,7 @@ class Packwerk::ReferenceExtractor
|
|
1328
1805
|
end
|
1329
1806
|
def initialize(constant_name_inspectors:, root_node:, root_path:); end
|
1330
1807
|
|
1808
|
+
# source://packwerk//lib/packwerk/reference_extractor.rb#76
|
1331
1809
|
sig do
|
1332
1810
|
params(
|
1333
1811
|
node: ::Parser::AST::Node,
|
@@ -1340,8 +1818,11 @@ class Packwerk::ReferenceExtractor
|
|
1340
1818
|
private
|
1341
1819
|
|
1342
1820
|
# @return [Boolean]
|
1821
|
+
#
|
1822
|
+
# source://packwerk//lib/packwerk/reference_extractor.rb#120
|
1343
1823
|
def local_reference?(constant_name, name_location, namespace_path); end
|
1344
1824
|
|
1825
|
+
# source://packwerk//lib/packwerk/reference_extractor.rb#105
|
1345
1826
|
sig do
|
1346
1827
|
params(
|
1347
1828
|
constant_name: ::String,
|
@@ -1353,6 +1834,7 @@ class Packwerk::ReferenceExtractor
|
|
1353
1834
|
def reference_from_constant(constant_name, node:, ancestors:, relative_file:); end
|
1354
1835
|
|
1355
1836
|
class << self
|
1837
|
+
# source://packwerk//lib/packwerk/reference_extractor.rb#18
|
1356
1838
|
sig do
|
1357
1839
|
params(
|
1358
1840
|
unresolved_references: T::Array[::Packwerk::UnresolvedReference],
|
@@ -1364,35 +1846,45 @@ class Packwerk::ReferenceExtractor
|
|
1364
1846
|
end
|
1365
1847
|
|
1366
1848
|
# An offense related to a {Packwerk::Reference}.
|
1849
|
+
#
|
1850
|
+
# source://packwerk//lib/packwerk/reference_offense.rb#6
|
1367
1851
|
class Packwerk::ReferenceOffense < ::Packwerk::Offense
|
1852
|
+
# source://packwerk//lib/packwerk/reference_offense.rb#25
|
1368
1853
|
sig do
|
1369
1854
|
params(
|
1370
1855
|
reference: ::Packwerk::Reference,
|
1371
|
-
violation_type: ::
|
1856
|
+
violation_type: ::String,
|
1372
1857
|
message: ::String,
|
1373
1858
|
location: T.nilable(::Packwerk::Node::Location)
|
1374
1859
|
).void
|
1375
1860
|
end
|
1376
1861
|
def initialize(reference:, violation_type:, message:, location: T.unsafe(nil)); end
|
1377
1862
|
|
1863
|
+
# source://packwerk//lib/packwerk/reference_offense.rb#11
|
1378
1864
|
sig { returns(::Packwerk::Reference) }
|
1379
1865
|
def reference; end
|
1380
1866
|
|
1381
|
-
|
1867
|
+
# source://packwerk//lib/packwerk/reference_offense.rb#14
|
1868
|
+
sig { returns(::String) }
|
1382
1869
|
def violation_type; end
|
1383
1870
|
end
|
1384
1871
|
|
1872
|
+
# source://packwerk//lib/packwerk/result.rb#5
|
1385
1873
|
class Packwerk::Result < ::T::Struct
|
1386
1874
|
const :message, ::String
|
1387
1875
|
const :status, T::Boolean
|
1388
1876
|
|
1389
1877
|
class << self
|
1878
|
+
# source://sorbet-runtime/0.5.10588/lib/types/struct.rb#13
|
1390
1879
|
def inherited(s); end
|
1391
1880
|
end
|
1392
1881
|
end
|
1393
1882
|
|
1394
1883
|
# Holds the context of a Packwerk run across multiple files.
|
1884
|
+
#
|
1885
|
+
# source://packwerk//lib/packwerk/run_context.rb#8
|
1395
1886
|
class Packwerk::RunContext
|
1887
|
+
# source://packwerk//lib/packwerk/run_context.rb#46
|
1396
1888
|
sig do
|
1397
1889
|
params(
|
1398
1890
|
root_path: ::String,
|
@@ -1402,47 +1894,55 @@ class Packwerk::RunContext
|
|
1402
1894
|
config_path: T.nilable(::String),
|
1403
1895
|
package_paths: T.nilable(T.any(::String, T::Array[::String])),
|
1404
1896
|
custom_associations: T.any(T::Array[::Symbol], T::Set[::Symbol]),
|
1405
|
-
checkers: T::Array[::Packwerk::
|
1897
|
+
checkers: T::Array[::Packwerk::Checker],
|
1406
1898
|
cache_enabled: T::Boolean
|
1407
1899
|
).void
|
1408
1900
|
end
|
1409
1901
|
def initialize(root_path:, load_paths:, inflector:, cache_directory:, config_path: T.unsafe(nil), package_paths: T.unsafe(nil), custom_associations: T.unsafe(nil), checkers: T.unsafe(nil), cache_enabled: T.unsafe(nil)); end
|
1410
1902
|
|
1903
|
+
# source://packwerk//lib/packwerk/run_context.rb#90
|
1904
|
+
sig { returns(Packwerk::PackageSet) }
|
1905
|
+
def package_set; end
|
1906
|
+
|
1907
|
+
# source://packwerk//lib/packwerk/run_context.rb#77
|
1411
1908
|
sig { params(relative_file: ::String).returns(T::Array[::Packwerk::Offense]) }
|
1412
1909
|
def process_file(relative_file:); end
|
1413
1910
|
|
1414
1911
|
private
|
1415
1912
|
|
1913
|
+
# source://packwerk//lib/packwerk/run_context.rb#128
|
1416
1914
|
sig { returns(T::Array[::Packwerk::ConstantNameInspector]) }
|
1417
1915
|
def constant_name_inspectors; end
|
1418
1916
|
|
1917
|
+
# source://packwerk//lib/packwerk/run_context.rb#111
|
1419
1918
|
sig { returns(::Packwerk::ConstantDiscovery) }
|
1420
1919
|
def context_provider; end
|
1421
1920
|
|
1921
|
+
# source://packwerk//lib/packwerk/run_context.rb#97
|
1422
1922
|
sig { returns(::Packwerk::FileProcessor) }
|
1423
1923
|
def file_processor; end
|
1424
1924
|
|
1925
|
+
# source://packwerk//lib/packwerk/run_context.rb#102
|
1425
1926
|
sig { returns(::Packwerk::NodeProcessorFactory) }
|
1426
1927
|
def node_processor_factory; end
|
1427
1928
|
|
1428
|
-
|
1429
|
-
def package_set; end
|
1430
|
-
|
1929
|
+
# source://packwerk//lib/packwerk/run_context.rb#119
|
1431
1930
|
sig { returns(::ConstantResolver) }
|
1432
1931
|
def resolver; end
|
1433
1932
|
|
1434
1933
|
class << self
|
1934
|
+
# source://packwerk//lib/packwerk/run_context.rb#17
|
1435
1935
|
sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::RunContext) }
|
1436
1936
|
def from_configuration(configuration); end
|
1437
1937
|
end
|
1438
1938
|
end
|
1439
1939
|
|
1440
|
-
Packwerk::RunContext::DEFAULT_CHECKERS = T.let(T.unsafe(nil), Array)
|
1441
|
-
|
1442
1940
|
# An unresolved reference from a file in one package to a constant that may be defined in a different package.
|
1443
1941
|
# Unresolved means that we know how it's referred to in the file,
|
1444
1942
|
# and we have enough context on that reference to figure out the fully qualified reference such that we
|
1445
1943
|
# can produce a Reference in a separate pass. However, we have not yet resolved it to its fully qualified version.
|
1944
|
+
#
|
1945
|
+
# source://packwerk//lib/packwerk/unresolved_reference.rb#9
|
1446
1946
|
class Packwerk::UnresolvedReference < ::Struct
|
1447
1947
|
# Returns the value of attribute constant_name
|
1448
1948
|
#
|
@@ -1453,6 +1953,8 @@ class Packwerk::UnresolvedReference < ::Struct
|
|
1453
1953
|
#
|
1454
1954
|
# @param value [Object] the value to set the attribute constant_name to.
|
1455
1955
|
# @return [Object] the newly set value
|
1956
|
+
#
|
1957
|
+
# source://packwerk//lib/packwerk/unresolved_reference.rb#9
|
1456
1958
|
def constant_name=(_); end
|
1457
1959
|
|
1458
1960
|
# Returns the value of attribute namespace_path
|
@@ -1464,6 +1966,8 @@ class Packwerk::UnresolvedReference < ::Struct
|
|
1464
1966
|
#
|
1465
1967
|
# @param value [Object] the value to set the attribute namespace_path to.
|
1466
1968
|
# @return [Object] the newly set value
|
1969
|
+
#
|
1970
|
+
# source://packwerk//lib/packwerk/unresolved_reference.rb#9
|
1467
1971
|
def namespace_path=(_); end
|
1468
1972
|
|
1469
1973
|
# Returns the value of attribute relative_path
|
@@ -1475,6 +1979,8 @@ class Packwerk::UnresolvedReference < ::Struct
|
|
1475
1979
|
#
|
1476
1980
|
# @param value [Object] the value to set the attribute relative_path to.
|
1477
1981
|
# @return [Object] the newly set value
|
1982
|
+
#
|
1983
|
+
# source://packwerk//lib/packwerk/unresolved_reference.rb#9
|
1478
1984
|
def relative_path=(_); end
|
1479
1985
|
|
1480
1986
|
# Returns the value of attribute source_location
|
@@ -1486,6 +1992,8 @@ class Packwerk::UnresolvedReference < ::Struct
|
|
1486
1992
|
#
|
1487
1993
|
# @param value [Object] the value to set the attribute source_location to.
|
1488
1994
|
# @return [Object] the newly set value
|
1995
|
+
#
|
1996
|
+
# source://packwerk//lib/packwerk/unresolved_reference.rb#9
|
1489
1997
|
def source_location=(_); end
|
1490
1998
|
|
1491
1999
|
class << self
|
@@ -1496,11 +2004,124 @@ class Packwerk::UnresolvedReference < ::Struct
|
|
1496
2004
|
end
|
1497
2005
|
end
|
1498
2006
|
|
2007
|
+
# source://packwerk//lib/packwerk/version.rb#5
|
1499
2008
|
Packwerk::VERSION = T.let(T.unsafe(nil), String)
|
1500
2009
|
|
1501
|
-
|
1502
|
-
|
1503
|
-
|
1504
|
-
|
2010
|
+
# @abstract Subclasses must implement the `abstract` methods below.
|
2011
|
+
#
|
2012
|
+
# source://packwerk//lib/packwerk/validator.rb#9
|
2013
|
+
module Packwerk::Validator
|
2014
|
+
abstract!
|
2015
|
+
|
2016
|
+
# @abstract
|
2017
|
+
#
|
2018
|
+
# source://packwerk//lib/packwerk/validator.rb#36
|
2019
|
+
sig do
|
2020
|
+
abstract
|
2021
|
+
.params(
|
2022
|
+
package_set: Packwerk::PackageSet,
|
2023
|
+
configuration: ::Packwerk::Configuration
|
2024
|
+
).returns(::Packwerk::ApplicationValidator::Result)
|
2025
|
+
end
|
2026
|
+
def call(package_set, configuration); end
|
2027
|
+
|
2028
|
+
# source://packwerk//lib/packwerk/validator.rb#67
|
2029
|
+
sig do
|
2030
|
+
params(
|
2031
|
+
results: T::Array[::Packwerk::ApplicationValidator::Result],
|
2032
|
+
separator: ::String,
|
2033
|
+
before_errors: ::String,
|
2034
|
+
after_errors: ::String
|
2035
|
+
).returns(::Packwerk::ApplicationValidator::Result)
|
2036
|
+
end
|
2037
|
+
def merge_results(results, separator: T.unsafe(nil), before_errors: T.unsafe(nil), after_errors: T.unsafe(nil)); end
|
2038
|
+
|
2039
|
+
# source://packwerk//lib/packwerk/validator.rb#55
|
2040
|
+
sig { params(configuration: ::Packwerk::Configuration).returns(T.any(::String, T::Array[::String])) }
|
2041
|
+
def package_glob(configuration); end
|
2042
|
+
|
2043
|
+
# source://packwerk//lib/packwerk/validator.rb#48
|
2044
|
+
sig do
|
2045
|
+
params(
|
2046
|
+
configuration: ::Packwerk::Configuration,
|
2047
|
+
glob_pattern: T.nilable(T.any(::String, T::Array[::String]))
|
2048
|
+
).returns(T::Array[::String])
|
1505
2049
|
end
|
2050
|
+
def package_manifests(configuration, glob_pattern = T.unsafe(nil)); end
|
2051
|
+
|
2052
|
+
# source://packwerk//lib/packwerk/validator.rb#40
|
2053
|
+
sig { params(configuration: ::Packwerk::Configuration, setting: T.untyped).returns(T.untyped) }
|
2054
|
+
def package_manifests_settings_for(configuration, setting); end
|
2055
|
+
|
2056
|
+
# @abstract
|
2057
|
+
#
|
2058
|
+
# source://packwerk//lib/packwerk/validator.rb#32
|
2059
|
+
sig { abstract.returns(T::Array[::String]) }
|
2060
|
+
def permitted_keys; end
|
2061
|
+
|
2062
|
+
# source://packwerk//lib/packwerk/validator.rb#86
|
2063
|
+
sig { params(configuration: ::Packwerk::Configuration, path: ::String).returns(::Pathname) }
|
2064
|
+
def relative_path(configuration, path); end
|
2065
|
+
|
2066
|
+
class << self
|
2067
|
+
# source://packwerk//lib/packwerk/validator.rb#26
|
2068
|
+
sig { returns(T::Array[::Packwerk::Validator]) }
|
2069
|
+
def all; end
|
2070
|
+
|
2071
|
+
# source://packwerk//lib/packwerk/validator.rb#19
|
2072
|
+
sig { params(base: ::Class).void }
|
2073
|
+
def included(base); end
|
2074
|
+
end
|
2075
|
+
end
|
2076
|
+
|
2077
|
+
# source://packwerk//lib/packwerk/validators/dependency_validator.rb#5
|
2078
|
+
module Packwerk::Validators; end
|
2079
|
+
|
2080
|
+
# source://packwerk//lib/packwerk/validators/dependency_validator.rb#6
|
2081
|
+
class Packwerk::Validators::DependencyValidator
|
2082
|
+
include ::Packwerk::Validator
|
2083
|
+
|
2084
|
+
# source://packwerk//lib/packwerk/validators/dependency_validator.rb#13
|
2085
|
+
sig do
|
2086
|
+
override
|
2087
|
+
.params(
|
2088
|
+
package_set: Packwerk::PackageSet,
|
2089
|
+
configuration: ::Packwerk::Configuration
|
2090
|
+
).returns(::Packwerk::ApplicationValidator::Result)
|
2091
|
+
end
|
2092
|
+
def call(package_set, configuration); end
|
2093
|
+
|
2094
|
+
# source://packwerk//lib/packwerk/validators/dependency_validator.rb#24
|
2095
|
+
sig { override.returns(T::Array[::String]) }
|
2096
|
+
def permitted_keys; end
|
2097
|
+
|
2098
|
+
private
|
2099
|
+
|
2100
|
+
# Convert the cycles:
|
2101
|
+
#
|
2102
|
+
# [[a, b, c], [b, c]]
|
2103
|
+
#
|
2104
|
+
# to the string:
|
2105
|
+
#
|
2106
|
+
# ["a -> b -> c -> a", "b -> c -> b"]
|
2107
|
+
#
|
2108
|
+
# source://packwerk//lib/packwerk/validators/dependency_validator.rb#144
|
2109
|
+
sig { params(cycles: T.untyped).returns(T::Array[::String]) }
|
2110
|
+
def build_cycle_strings(cycles); end
|
2111
|
+
|
2112
|
+
# source://packwerk//lib/packwerk/validators/dependency_validator.rb#66
|
2113
|
+
sig { params(package_set: Packwerk::PackageSet).returns(::Packwerk::ApplicationValidator::Result) }
|
2114
|
+
def check_acyclic_graph(package_set); end
|
2115
|
+
|
2116
|
+
# source://packwerk//lib/packwerk/validators/dependency_validator.rb#34
|
2117
|
+
sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::ApplicationValidator::Result) }
|
2118
|
+
def check_package_manifest_syntax(configuration); end
|
2119
|
+
|
2120
|
+
# source://packwerk//lib/packwerk/validators/dependency_validator.rb#92
|
2121
|
+
sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::ApplicationValidator::Result) }
|
2122
|
+
def check_valid_package_dependencies(configuration); end
|
2123
|
+
|
2124
|
+
# source://packwerk//lib/packwerk/validators/dependency_validator.rb#128
|
2125
|
+
sig { params(configuration: ::Packwerk::Configuration, path: T.untyped).returns(T::Boolean) }
|
2126
|
+
def invalid_package_path?(configuration, path); end
|
1506
2127
|
end
|