pack_stats 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -7
- data/lib/pack_stats/private/metrics/nested_packs.rb +1 -1
- data/lib/pack_stats/private/metrics/packages.rb +3 -2
- data/lib/pack_stats/private/metrics/packages_by_team.rb +3 -2
- data/lib/pack_stats/private/metrics/packwerk_checker_usage.rb +6 -8
- data/lib/pack_stats/private/metrics.rb +1 -1
- data/lib/pack_stats/private.rb +7 -0
- data/lib/pack_stats.rb +14 -17
- data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
- data/sorbet/rbi/gems/code_ownership@1.29.2.rbi +525 -0
- data/sorbet/rbi/gems/packs@0.0.5.rbi +111 -0
- data/sorbet/rbi/gems/{parse_packwerk@0.14.0.rbi → parse_packwerk@0.16.0.rbi} +84 -15
- data/sorbet/rbi/gems/rubocop-packs@0.0.30.rbi +272 -0
- metadata +21 -5
- data/sorbet/rbi/gems/code_ownership@1.28.0.rbi +0 -337
- data/sorbet/rbi/gems/rubocop-packs@0.0.20.rbi +0 -141
@@ -0,0 +1,525 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `code_ownership` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem code_ownership`.
|
6
|
+
|
7
|
+
# source://code_ownership//lib/code_ownership/cli.rb#7
|
8
|
+
module CodeOwnership
|
9
|
+
extend ::CodeOwnership
|
10
|
+
|
11
|
+
requires_ancestor { Kernel }
|
12
|
+
|
13
|
+
# Given a backtrace from either `Exception#backtrace` or `caller`, find the
|
14
|
+
# first line that corresponds to a file with assigned ownership
|
15
|
+
#
|
16
|
+
# source://code_ownership//lib/code_ownership.rb#95
|
17
|
+
sig do
|
18
|
+
params(
|
19
|
+
backtrace: T.nilable(T::Array[::String]),
|
20
|
+
excluded_teams: T::Array[::CodeTeams::Team]
|
21
|
+
).returns(T.nilable(::CodeTeams::Team))
|
22
|
+
end
|
23
|
+
def for_backtrace(backtrace, excluded_teams: T.unsafe(nil)); end
|
24
|
+
|
25
|
+
# source://code_ownership//lib/code_ownership.rb#127
|
26
|
+
sig { params(klass: T.nilable(T.any(::Class, ::Module))).returns(T.nilable(::CodeTeams::Team)) }
|
27
|
+
def for_class(klass); end
|
28
|
+
|
29
|
+
# source://code_ownership//lib/code_ownership.rb#21
|
30
|
+
sig { params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
|
31
|
+
def for_file(file); end
|
32
|
+
|
33
|
+
# source://code_ownership//lib/code_ownership.rb#144
|
34
|
+
sig { params(package: ::Packs::Pack).returns(T.nilable(::CodeTeams::Team)) }
|
35
|
+
def for_package(package); end
|
36
|
+
|
37
|
+
# source://code_ownership//lib/code_ownership.rb#39
|
38
|
+
sig { params(team: T.any(::CodeTeams::Team, ::String)).returns(::String) }
|
39
|
+
def for_team(team); end
|
40
|
+
|
41
|
+
# source://code_ownership//lib/code_ownership.rb#83
|
42
|
+
sig { params(files: T::Array[::String], autocorrect: T::Boolean, stage_changes: T::Boolean).void }
|
43
|
+
def validate!(files: T.unsafe(nil), autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
|
44
|
+
|
45
|
+
class << self
|
46
|
+
# Generally, you should not ever need to do this, because once your ruby process loads, cached content should not change.
|
47
|
+
# Namely, the set of files, packages, and directories which are tracked for ownership should not change.
|
48
|
+
# The primary reason this is helpful is for clients of CodeOwnership who want to test their code, and each test context
|
49
|
+
# has different ownership and tracked files.
|
50
|
+
#
|
51
|
+
# source://code_ownership//lib/code_ownership.rb#153
|
52
|
+
sig { void }
|
53
|
+
def bust_caches!; end
|
54
|
+
|
55
|
+
# source://code_ownership//lib/code_ownership.rb#72
|
56
|
+
sig { params(filename: ::String).void }
|
57
|
+
def remove_file_annotation!(filename); end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# source://code_ownership//lib/code_ownership/cli.rb#8
|
62
|
+
class CodeOwnership::Cli
|
63
|
+
class << self
|
64
|
+
# For now, this just returns team ownership
|
65
|
+
# Later, this could also return code ownership errors about that file.
|
66
|
+
#
|
67
|
+
# source://code_ownership//lib/code_ownership/cli.rb#76
|
68
|
+
def for_file(argv); end
|
69
|
+
|
70
|
+
# source://code_ownership//lib/code_ownership/cli.rb#123
|
71
|
+
def for_team(argv); end
|
72
|
+
|
73
|
+
# source://code_ownership//lib/code_ownership/cli.rb#9
|
74
|
+
def run!(argv); end
|
75
|
+
|
76
|
+
private
|
77
|
+
|
78
|
+
# source://code_ownership//lib/code_ownership/cli.rb#33
|
79
|
+
def validate!(argv); end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
# source://code_ownership//lib/code_ownership.rb#68
|
84
|
+
class CodeOwnership::InvalidCodeOwnershipConfigurationError < ::StandardError; end
|
85
|
+
|
86
|
+
# source://code_ownership//lib/code_ownership/private/configuration.rb#4
|
87
|
+
module CodeOwnership::Private
|
88
|
+
class << self
|
89
|
+
# source://code_ownership//lib/code_ownership/private.rb#30
|
90
|
+
sig { void }
|
91
|
+
def bust_caches!; end
|
92
|
+
|
93
|
+
# source://code_ownership//lib/code_ownership/private.rb#24
|
94
|
+
sig { returns(::CodeOwnership::Private::Configuration) }
|
95
|
+
def configuration; end
|
96
|
+
|
97
|
+
# source://code_ownership//lib/code_ownership/private.rb#69
|
98
|
+
sig { returns(::CodeOwnership::Private::OwnershipMappers::FileAnnotations) }
|
99
|
+
def file_annotations_mapper; end
|
100
|
+
|
101
|
+
# source://code_ownership//lib/code_ownership/private.rb#106
|
102
|
+
sig { params(files: T::Array[::String]).returns(T::Hash[::String, T::Array[::String]]) }
|
103
|
+
def files_by_mapper(files); end
|
104
|
+
|
105
|
+
# source://code_ownership//lib/code_ownership/private.rb#96
|
106
|
+
sig { params(team_name: ::String, location_of_reference: ::String).returns(::CodeTeams::Team) }
|
107
|
+
def find_team!(team_name, location_of_reference); end
|
108
|
+
|
109
|
+
# source://code_ownership//lib/code_ownership/private.rb#59
|
110
|
+
sig { returns(T::Array[::CodeOwnership::Private::OwnershipMappers::Interface]) }
|
111
|
+
def mappers; end
|
112
|
+
|
113
|
+
# Returns a string version of the relative path to a Rails constant,
|
114
|
+
# or nil if it can't find something
|
115
|
+
#
|
116
|
+
# source://code_ownership//lib/code_ownership/private.rb#77
|
117
|
+
sig { params(klass: T.nilable(T.any(::Class, ::Module))).returns(T.nilable(::String)) }
|
118
|
+
def path_from_klass(klass); end
|
119
|
+
|
120
|
+
# The output of this function is string pathnames relative to the root.
|
121
|
+
#
|
122
|
+
# source://code_ownership//lib/code_ownership/private.rb#90
|
123
|
+
sig { returns(T::Array[::String]) }
|
124
|
+
def tracked_files; end
|
125
|
+
|
126
|
+
# source://code_ownership//lib/code_ownership/private.rb#37
|
127
|
+
sig { params(files: T::Array[::String], autocorrect: T::Boolean, stage_changes: T::Boolean).void }
|
128
|
+
def validate!(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
# source://code_ownership//lib/code_ownership/private/configuration.rb#5
|
133
|
+
class CodeOwnership::Private::Configuration < ::T::Struct
|
134
|
+
const :js_package_paths, T::Array[::String]
|
135
|
+
const :owned_globs, T::Array[::String]
|
136
|
+
const :skip_codeowners_validation, T::Boolean
|
137
|
+
const :unowned_globs, T::Array[::String]
|
138
|
+
|
139
|
+
class << self
|
140
|
+
# source://code_ownership//lib/code_ownership/private/configuration.rb#15
|
141
|
+
sig { returns(::CodeOwnership::Private::Configuration) }
|
142
|
+
def fetch; end
|
143
|
+
|
144
|
+
# source://sorbet-runtime/0.5.9924/lib/types/struct.rb#13
|
145
|
+
def inherited(s); end
|
146
|
+
|
147
|
+
# source://code_ownership//lib/code_ownership/private/configuration.rb#27
|
148
|
+
sig { params(config_hash: T::Hash[T.untyped, T.untyped]).returns(T::Array[::String]) }
|
149
|
+
def js_package_paths(config_hash); end
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
# source://code_ownership//lib/code_ownership/private/configuration.rb#7
|
154
|
+
CodeOwnership::Private::Configuration::DEFAULT_JS_PACKAGE_PATHS = T.let(T.unsafe(nil), Array)
|
155
|
+
|
156
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/interface.rb#7
|
157
|
+
module CodeOwnership::Private::OwnershipMappers; end
|
158
|
+
|
159
|
+
# Calculate, cache, and return a mapping of file names (relative to the root
|
160
|
+
# of the repository) to team name.
|
161
|
+
#
|
162
|
+
# Example:
|
163
|
+
#
|
164
|
+
# {
|
165
|
+
# 'app/models/company.rb' => Team.find('Setup & Onboarding'),
|
166
|
+
# ...
|
167
|
+
# }
|
168
|
+
#
|
169
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#17
|
170
|
+
class CodeOwnership::Private::OwnershipMappers::FileAnnotations
|
171
|
+
include ::CodeOwnership::Private::OwnershipMappers::Interface
|
172
|
+
|
173
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#113
|
174
|
+
sig { override.void }
|
175
|
+
def bust_caches!; end
|
176
|
+
|
177
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#102
|
178
|
+
sig { override.returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
|
179
|
+
def codeowners_lines_to_owners; end
|
180
|
+
|
181
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#108
|
182
|
+
sig { override.returns(::String) }
|
183
|
+
def description; end
|
184
|
+
|
185
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#50
|
186
|
+
sig { params(filename: ::String).returns(T.nilable(::CodeTeams::Team)) }
|
187
|
+
def file_annotation_based_owner(filename); end
|
188
|
+
|
189
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#29
|
190
|
+
sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
|
191
|
+
def map_file_to_owner(file); end
|
192
|
+
|
193
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#38
|
194
|
+
sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
|
195
|
+
def map_files_to_owners(files); end
|
196
|
+
|
197
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#86
|
198
|
+
sig { params(filename: ::String).void }
|
199
|
+
def remove_file_annotation!(filename); end
|
200
|
+
end
|
201
|
+
|
202
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#23
|
203
|
+
CodeOwnership::Private::OwnershipMappers::FileAnnotations::TEAM_PATTERN = T.let(T.unsafe(nil), Regexp)
|
204
|
+
|
205
|
+
# @abstract Subclasses must implement the `abstract` methods below.
|
206
|
+
#
|
207
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/interface.rb#8
|
208
|
+
module CodeOwnership::Private::OwnershipMappers::Interface
|
209
|
+
interface!
|
210
|
+
|
211
|
+
# @abstract
|
212
|
+
#
|
213
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/interface.rb#45
|
214
|
+
sig { abstract.void }
|
215
|
+
def bust_caches!; end
|
216
|
+
|
217
|
+
# @abstract
|
218
|
+
#
|
219
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/interface.rb#37
|
220
|
+
sig { abstract.returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
|
221
|
+
def codeowners_lines_to_owners; end
|
222
|
+
|
223
|
+
# @abstract
|
224
|
+
#
|
225
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/interface.rb#41
|
226
|
+
sig { abstract.returns(::String) }
|
227
|
+
def description; end
|
228
|
+
|
229
|
+
# This should be fast when run with ONE file
|
230
|
+
#
|
231
|
+
# @abstract
|
232
|
+
#
|
233
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/interface.rb#21
|
234
|
+
sig { abstract.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
|
235
|
+
def map_file_to_owner(file); end
|
236
|
+
|
237
|
+
# This should be fast when run with MANY files
|
238
|
+
#
|
239
|
+
# @abstract
|
240
|
+
#
|
241
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/interface.rb#31
|
242
|
+
sig { abstract.params(files: T::Array[::String]).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
|
243
|
+
def map_files_to_owners(files); end
|
244
|
+
end
|
245
|
+
|
246
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/js_package_ownership.rb#8
|
247
|
+
class CodeOwnership::Private::OwnershipMappers::JsPackageOwnership
|
248
|
+
include ::CodeOwnership::Private::OwnershipMappers::Interface
|
249
|
+
|
250
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/js_package_ownership.rb#80
|
251
|
+
sig { override.void }
|
252
|
+
def bust_caches!; end
|
253
|
+
|
254
|
+
# Package ownership ignores the passed in files when generating code owners lines.
|
255
|
+
# This is because Package ownership knows that the fastest way to find code owners for package based ownership
|
256
|
+
# is to simply iterate over the packages and grab the owner, rather than iterating over each file just to get what package it is in
|
257
|
+
# In theory this means that we may generate code owners lines that cover files that are not in the passed in argument,
|
258
|
+
# but in practice this is not of consequence because in reality we never really want to generate code owners for only a
|
259
|
+
# subset of files, but rather we want code ownership for all files.
|
260
|
+
#
|
261
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/js_package_ownership.rb#54
|
262
|
+
sig { override.returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
|
263
|
+
def codeowners_lines_to_owners; end
|
264
|
+
|
265
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/js_package_ownership.rb#64
|
266
|
+
sig { override.returns(::String) }
|
267
|
+
def description; end
|
268
|
+
|
269
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/js_package_ownership.rb#18
|
270
|
+
sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
|
271
|
+
def map_file_to_owner(file); end
|
272
|
+
|
273
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/js_package_ownership.rb#31
|
274
|
+
sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
|
275
|
+
def map_files_to_owners(files); end
|
276
|
+
|
277
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/js_package_ownership.rb#69
|
278
|
+
sig { params(package: ::CodeOwnership::Private::ParseJsPackages::Package).returns(T.nilable(::CodeTeams::Team)) }
|
279
|
+
def owner_for_package(package); end
|
280
|
+
|
281
|
+
private
|
282
|
+
|
283
|
+
# takes a file and finds the relevant `package.json` file by walking up the directory
|
284
|
+
# structure. Example, given `packages/a/b/c.rb`, this looks for `packages/a/b/package.json`, `packages/a/package.json`,
|
285
|
+
# `packages/package.json`, and `package.json` in that order, stopping at the first file to actually exist.
|
286
|
+
# We do additional caching so that we don't have to check for file existence every time
|
287
|
+
#
|
288
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/js_package_ownership.rb#91
|
289
|
+
sig { params(file: ::String).returns(T.nilable(::CodeOwnership::Private::ParseJsPackages::Package)) }
|
290
|
+
def map_file_to_relevant_package(file); end
|
291
|
+
end
|
292
|
+
|
293
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/package_ownership.rb#8
|
294
|
+
class CodeOwnership::Private::OwnershipMappers::PackageOwnership
|
295
|
+
include ::CodeOwnership::Private::OwnershipMappers::Interface
|
296
|
+
|
297
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/package_ownership.rb#80
|
298
|
+
sig { override.void }
|
299
|
+
def bust_caches!; end
|
300
|
+
|
301
|
+
# Package ownership ignores the passed in files when generating code owners lines.
|
302
|
+
# This is because Package ownership knows that the fastest way to find code owners for package based ownership
|
303
|
+
# is to simply iterate over the packages and grab the owner, rather than iterating over each file just to get what package it is in
|
304
|
+
# In theory this means that we may generate code owners lines that cover files that are not in the passed in argument,
|
305
|
+
# but in practice this is not of consequence because in reality we never really want to generate code owners for only a
|
306
|
+
# subset of files, but rather we want code ownership for all files.
|
307
|
+
#
|
308
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/package_ownership.rb#54
|
309
|
+
sig { override.returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
|
310
|
+
def codeowners_lines_to_owners; end
|
311
|
+
|
312
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/package_ownership.rb#64
|
313
|
+
sig { override.returns(::String) }
|
314
|
+
def description; end
|
315
|
+
|
316
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/package_ownership.rb#18
|
317
|
+
sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
|
318
|
+
def map_file_to_owner(file); end
|
319
|
+
|
320
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/package_ownership.rb#31
|
321
|
+
sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
|
322
|
+
def map_files_to_owners(files); end
|
323
|
+
|
324
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/package_ownership.rb#69
|
325
|
+
sig { params(package: ::Packs::Pack).returns(T.nilable(::CodeTeams::Team)) }
|
326
|
+
def owner_for_package(package); end
|
327
|
+
end
|
328
|
+
|
329
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/team_globs.rb#8
|
330
|
+
class CodeOwnership::Private::OwnershipMappers::TeamGlobs
|
331
|
+
include ::CodeOwnership::Private::OwnershipMappers::Interface
|
332
|
+
|
333
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/team_globs.rb#56
|
334
|
+
sig { override.void }
|
335
|
+
def bust_caches!; end
|
336
|
+
|
337
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/team_globs.rb#45
|
338
|
+
sig { override.returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
|
339
|
+
def codeowners_lines_to_owners; end
|
340
|
+
|
341
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/team_globs.rb#62
|
342
|
+
sig { override.returns(::String) }
|
343
|
+
def description; end
|
344
|
+
|
345
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/team_globs.rb#38
|
346
|
+
sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
|
347
|
+
def map_file_to_owner(file); end
|
348
|
+
|
349
|
+
# source://code_ownership//lib/code_ownership/private/ownership_mappers/team_globs.rb#22
|
350
|
+
sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
|
351
|
+
def map_files_to_owners(files); end
|
352
|
+
end
|
353
|
+
|
354
|
+
# Modeled off of ParsePackwerk
|
355
|
+
#
|
356
|
+
# source://code_ownership//lib/code_ownership/private/parse_js_packages.rb#8
|
357
|
+
module CodeOwnership::Private::ParseJsPackages
|
358
|
+
class << self
|
359
|
+
# source://code_ownership//lib/code_ownership/private/parse_js_packages.rb#57
|
360
|
+
sig { returns(T::Array[::CodeOwnership::Private::ParseJsPackages::Package]) }
|
361
|
+
def all; end
|
362
|
+
end
|
363
|
+
end
|
364
|
+
|
365
|
+
# source://code_ownership//lib/code_ownership/private/parse_js_packages.rb#13
|
366
|
+
CodeOwnership::Private::ParseJsPackages::METADATA = T.let(T.unsafe(nil), String)
|
367
|
+
|
368
|
+
# source://code_ownership//lib/code_ownership/private/parse_js_packages.rb#12
|
369
|
+
CodeOwnership::Private::ParseJsPackages::PACKAGE_JSON_NAME = T.let(T.unsafe(nil), String)
|
370
|
+
|
371
|
+
# source://code_ownership//lib/code_ownership/private/parse_js_packages.rb#15
|
372
|
+
class CodeOwnership::Private::ParseJsPackages::Package < ::T::Struct
|
373
|
+
const :metadata, T::Hash[::String, T.untyped]
|
374
|
+
const :name, ::String
|
375
|
+
|
376
|
+
# source://code_ownership//lib/code_ownership/private/parse_js_packages.rb#48
|
377
|
+
sig { returns(::Pathname) }
|
378
|
+
def directory; end
|
379
|
+
|
380
|
+
class << self
|
381
|
+
# source://code_ownership//lib/code_ownership/private/parse_js_packages.rb#22
|
382
|
+
sig { params(pathname: ::Pathname).returns(::CodeOwnership::Private::ParseJsPackages::Package) }
|
383
|
+
def from(pathname); end
|
384
|
+
|
385
|
+
# source://sorbet-runtime/0.5.9924/lib/types/struct.rb#13
|
386
|
+
def inherited(s); end
|
387
|
+
end
|
388
|
+
end
|
389
|
+
|
390
|
+
# source://code_ownership//lib/code_ownership/private/parse_js_packages.rb#11
|
391
|
+
CodeOwnership::Private::ParseJsPackages::ROOT_PACKAGE_NAME = T.let(T.unsafe(nil), String)
|
392
|
+
|
393
|
+
# source://code_ownership//lib/code_ownership/private/team_plugins/ownership.rb#5
|
394
|
+
module CodeOwnership::Private::TeamPlugins; end
|
395
|
+
|
396
|
+
# source://code_ownership//lib/code_ownership/private/team_plugins/github.rb#6
|
397
|
+
class CodeOwnership::Private::TeamPlugins::Github < ::CodeTeams::Plugin
|
398
|
+
# source://code_ownership//lib/code_ownership/private/team_plugins/github.rb#13
|
399
|
+
sig { returns(::CodeOwnership::Private::TeamPlugins::Github::GithubStruct) }
|
400
|
+
def github; end
|
401
|
+
end
|
402
|
+
|
403
|
+
# source://code_ownership//lib/code_ownership/private/team_plugins/github.rb#10
|
404
|
+
class CodeOwnership::Private::TeamPlugins::Github::GithubStruct < ::Struct
|
405
|
+
# Returns the value of attribute do_not_add_to_codeowners_file
|
406
|
+
#
|
407
|
+
# @return [Object] the current value of do_not_add_to_codeowners_file
|
408
|
+
def do_not_add_to_codeowners_file; end
|
409
|
+
|
410
|
+
# Sets the attribute do_not_add_to_codeowners_file
|
411
|
+
#
|
412
|
+
# @param value [Object] the value to set the attribute do_not_add_to_codeowners_file to.
|
413
|
+
# @return [Object] the newly set value
|
414
|
+
#
|
415
|
+
# source://code_ownership//lib/code_ownership/private/team_plugins/github.rb#10
|
416
|
+
def do_not_add_to_codeowners_file=(_); end
|
417
|
+
|
418
|
+
# Returns the value of attribute team
|
419
|
+
#
|
420
|
+
# @return [Object] the current value of team
|
421
|
+
def team; end
|
422
|
+
|
423
|
+
# Sets the attribute team
|
424
|
+
#
|
425
|
+
# @param value [Object] the value to set the attribute team to.
|
426
|
+
# @return [Object] the newly set value
|
427
|
+
#
|
428
|
+
# source://code_ownership//lib/code_ownership/private/team_plugins/github.rb#10
|
429
|
+
def team=(_); end
|
430
|
+
|
431
|
+
class << self
|
432
|
+
def [](*_arg0); end
|
433
|
+
def inspect; end
|
434
|
+
def members; end
|
435
|
+
def new(*_arg0); end
|
436
|
+
end
|
437
|
+
end
|
438
|
+
|
439
|
+
# source://code_ownership//lib/code_ownership/private/team_plugins/ownership.rb#6
|
440
|
+
class CodeOwnership::Private::TeamPlugins::Ownership < ::CodeTeams::Plugin
|
441
|
+
# source://code_ownership//lib/code_ownership/private/team_plugins/ownership.rb#11
|
442
|
+
sig { returns(T::Array[::String]) }
|
443
|
+
def owned_globs; end
|
444
|
+
end
|
445
|
+
|
446
|
+
# source://code_ownership//lib/code_ownership/private/validations/interface.rb#5
|
447
|
+
module CodeOwnership::Private::Validations; end
|
448
|
+
|
449
|
+
# source://code_ownership//lib/code_ownership/private/validations/files_have_owners.rb#6
|
450
|
+
class CodeOwnership::Private::Validations::FilesHaveOwners
|
451
|
+
include ::CodeOwnership::Private::Validations::Interface
|
452
|
+
|
453
|
+
# source://code_ownership//lib/code_ownership/private/validations/files_have_owners.rb#12
|
454
|
+
sig do
|
455
|
+
override
|
456
|
+
.params(
|
457
|
+
files: T::Array[::String],
|
458
|
+
autocorrect: T::Boolean,
|
459
|
+
stage_changes: T::Boolean
|
460
|
+
).returns(T::Array[::String])
|
461
|
+
end
|
462
|
+
def validation_errors(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
|
463
|
+
end
|
464
|
+
|
465
|
+
# source://code_ownership//lib/code_ownership/private/validations/files_have_unique_owners.rb#6
|
466
|
+
class CodeOwnership::Private::Validations::FilesHaveUniqueOwners
|
467
|
+
include ::CodeOwnership::Private::Validations::Interface
|
468
|
+
|
469
|
+
# source://code_ownership//lib/code_ownership/private/validations/files_have_unique_owners.rb#12
|
470
|
+
sig do
|
471
|
+
override
|
472
|
+
.params(
|
473
|
+
files: T::Array[::String],
|
474
|
+
autocorrect: T::Boolean,
|
475
|
+
stage_changes: T::Boolean
|
476
|
+
).returns(T::Array[::String])
|
477
|
+
end
|
478
|
+
def validation_errors(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
|
479
|
+
end
|
480
|
+
|
481
|
+
# source://code_ownership//lib/code_ownership/private/validations/github_codeowners_up_to_date.rb#6
|
482
|
+
class CodeOwnership::Private::Validations::GithubCodeownersUpToDate
|
483
|
+
include ::CodeOwnership::Private::Validations::Interface
|
484
|
+
|
485
|
+
# source://code_ownership//lib/code_ownership/private/validations/github_codeowners_up_to_date.rb#12
|
486
|
+
sig do
|
487
|
+
override
|
488
|
+
.params(
|
489
|
+
files: T::Array[::String],
|
490
|
+
autocorrect: T::Boolean,
|
491
|
+
stage_changes: T::Boolean
|
492
|
+
).returns(T::Array[::String])
|
493
|
+
end
|
494
|
+
def validation_errors(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
|
495
|
+
|
496
|
+
private
|
497
|
+
|
498
|
+
# Generate the contents of a CODEOWNERS file that GitHub can use to
|
499
|
+
# automatically assign reviewers
|
500
|
+
# https://help.github.com/articles/about-codeowners/
|
501
|
+
#
|
502
|
+
# source://code_ownership//lib/code_ownership/private/validations/github_codeowners_up_to_date.rb#100
|
503
|
+
sig { returns(T::Array[::String]) }
|
504
|
+
def codeowners_file_lines; end
|
505
|
+
end
|
506
|
+
|
507
|
+
# @abstract Subclasses must implement the `abstract` methods below.
|
508
|
+
#
|
509
|
+
# source://code_ownership//lib/code_ownership/private/validations/interface.rb#6
|
510
|
+
module CodeOwnership::Private::Validations::Interface
|
511
|
+
interface!
|
512
|
+
|
513
|
+
# @abstract
|
514
|
+
#
|
515
|
+
# source://code_ownership//lib/code_ownership/private/validations/interface.rb#13
|
516
|
+
sig do
|
517
|
+
abstract
|
518
|
+
.params(
|
519
|
+
files: T::Array[::String],
|
520
|
+
autocorrect: T::Boolean,
|
521
|
+
stage_changes: T::Boolean
|
522
|
+
).returns(T::Array[::String])
|
523
|
+
end
|
524
|
+
def validation_errors(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
|
525
|
+
end
|
@@ -0,0 +1,111 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `packs` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem packs`.
|
6
|
+
|
7
|
+
# source://packs//lib/packs/pack.rb#3
|
8
|
+
module Packs
|
9
|
+
class << self
|
10
|
+
# source://packs//lib/packs.rb#16
|
11
|
+
sig { returns(T::Array[::Packs::Pack]) }
|
12
|
+
def all; end
|
13
|
+
|
14
|
+
# source://packs//lib/packs.rb#34
|
15
|
+
sig { void }
|
16
|
+
def bust_cache!; end
|
17
|
+
|
18
|
+
# source://packs//lib/packs.rb#41
|
19
|
+
sig { returns(::Packs::Private::Configuration) }
|
20
|
+
def config; end
|
21
|
+
|
22
|
+
# @yield [config]
|
23
|
+
#
|
24
|
+
# source://packs//lib/packs.rb#47
|
25
|
+
sig { params(blk: T.proc.params(arg0: ::Packs::Private::Configuration).void).void }
|
26
|
+
def configure(&blk); end
|
27
|
+
|
28
|
+
# source://packs//lib/packs.rb#21
|
29
|
+
sig { params(name: ::String).returns(T.nilable(::Packs::Pack)) }
|
30
|
+
def find(name); end
|
31
|
+
|
32
|
+
# source://packs//lib/packs.rb#26
|
33
|
+
sig { params(file_path: T.any(::Pathname, ::String)).returns(T.nilable(::Packs::Pack)) }
|
34
|
+
def for_file(file_path); end
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
# source://packs//lib/packs.rb#73
|
39
|
+
sig { returns(T::Array[::Pathname]) }
|
40
|
+
def package_glob_patterns; end
|
41
|
+
|
42
|
+
# source://packs//lib/packs.rb#59
|
43
|
+
sig { returns(T::Hash[::String, ::Packs::Pack]) }
|
44
|
+
def packs_by_name; end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# source://packs//lib/packs.rb#10
|
49
|
+
Packs::PACKAGE_FILE = T.let(T.unsafe(nil), String)
|
50
|
+
|
51
|
+
# source://packs//lib/packs/pack.rb#4
|
52
|
+
class Packs::Pack < ::T::Struct
|
53
|
+
const :name, ::String
|
54
|
+
const :path, ::Pathname
|
55
|
+
const :raw_hash, T::Hash[T.untyped, T.untyped]
|
56
|
+
const :relative_path, ::Pathname
|
57
|
+
|
58
|
+
# source://packs//lib/packs/pack.rb#34
|
59
|
+
sig { returns(::String) }
|
60
|
+
def last_name; end
|
61
|
+
|
62
|
+
# source://packs//lib/packs/pack.rb#39
|
63
|
+
sig { returns(T::Hash[T.untyped, T.untyped]) }
|
64
|
+
def metadata; end
|
65
|
+
|
66
|
+
# source://packs//lib/packs/pack.rb#28
|
67
|
+
sig { params(relative: T::Boolean).returns(::Pathname) }
|
68
|
+
def yml(relative: T.unsafe(nil)); end
|
69
|
+
|
70
|
+
class << self
|
71
|
+
# source://packs//lib/packs/pack.rb#13
|
72
|
+
sig { params(package_yml_absolute_path: ::Pathname).returns(::Packs::Pack) }
|
73
|
+
def from(package_yml_absolute_path); end
|
74
|
+
|
75
|
+
# source://sorbet-runtime/0.5.9924/lib/types/struct.rb#13
|
76
|
+
def inherited(s); end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
# source://packs//lib/packs/private/configuration.rb#4
|
81
|
+
module Packs::Private
|
82
|
+
class << self
|
83
|
+
# source://packs//lib/packs/private.rb#10
|
84
|
+
sig { returns(::Pathname) }
|
85
|
+
def root; end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
# source://packs//lib/packs/private/configuration.rb#5
|
90
|
+
class Packs::Private::Configuration < ::T::Struct
|
91
|
+
prop :pack_paths, T::Array[::String]
|
92
|
+
|
93
|
+
class << self
|
94
|
+
# source://packs//lib/packs/private/configuration.rb#17
|
95
|
+
sig { returns(::Packs::Private::Configuration) }
|
96
|
+
def fetch; end
|
97
|
+
|
98
|
+
# source://sorbet-runtime/0.5.9924/lib/types/struct.rb#13
|
99
|
+
def inherited(s); end
|
100
|
+
|
101
|
+
# source://packs//lib/packs/private/configuration.rb#26
|
102
|
+
sig { params(config_hash: T::Hash[T.untyped, T.untyped]).returns(T::Array[::String]) }
|
103
|
+
def pack_paths(config_hash); end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
# source://packs//lib/packs/private/configuration.rb#7
|
108
|
+
Packs::Private::Configuration::CONFIGURATION_PATHNAME = T.let(T.unsafe(nil), Pathname)
|
109
|
+
|
110
|
+
# source://packs//lib/packs/private/configuration.rb#9
|
111
|
+
Packs::Private::Configuration::DEFAULT_PACK_PATHS = T.let(T.unsafe(nil), Array)
|