visualize_packwerk 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +32 -0
  3. data/lib/visualize_packwerk/graph_interface.rb +17 -0
  4. data/lib/visualize_packwerk/node_interface.rb +29 -0
  5. data/lib/visualize_packwerk/package_graph.rb +48 -0
  6. data/lib/visualize_packwerk/package_node.rb +28 -0
  7. data/lib/visualize_packwerk/package_relationships.rb +158 -0
  8. data/lib/visualize_packwerk/railtie.rb +15 -0
  9. data/lib/visualize_packwerk/tasks/visualize_packwerk.rake +73 -0
  10. data/lib/visualize_packwerk/team_graph.rb +52 -0
  11. data/lib/visualize_packwerk/team_node.rb +27 -0
  12. data/lib/visualize_packwerk.rb +17 -0
  13. data/sorbet/config +2 -0
  14. data/sorbet/rbi/gems/activesupport@7.0.3.1.rbi +76 -0
  15. data/sorbet/rbi/gems/ast@2.4.2.rbi +522 -0
  16. data/sorbet/rbi/gems/code_ownership@1.28.0.rbi +411 -0
  17. data/sorbet/rbi/gems/code_teams@1.0.0.rbi +138 -0
  18. data/sorbet/rbi/gems/coderay@1.1.3.rbi +8 -0
  19. data/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +8 -0
  20. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +866 -0
  21. data/sorbet/rbi/gems/i18n@1.12.0.rbi +8 -0
  22. data/sorbet/rbi/gems/json@2.6.2.rbi +1423 -0
  23. data/sorbet/rbi/gems/method_source@1.0.0.rbi +8 -0
  24. data/sorbet/rbi/gems/minitest@5.16.2.rbi +9 -0
  25. data/sorbet/rbi/gems/package_protections@1.3.0.rbi +654 -0
  26. data/sorbet/rbi/gems/parallel@1.22.1.rbi +163 -0
  27. data/sorbet/rbi/gems/parse_packwerk@0.11.0.rbi +148 -0
  28. data/sorbet/rbi/gems/parser@3.1.2.0.rbi +4261 -0
  29. data/sorbet/rbi/gems/pry@0.14.1.rbi +8 -0
  30. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +8 -0
  31. data/sorbet/rbi/gems/rake@13.0.6.rbi +1854 -0
  32. data/sorbet/rbi/gems/rbi@0.0.15.rbi +2340 -0
  33. data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +8 -0
  34. data/sorbet/rbi/gems/rexml@3.2.5.rbi +8 -0
  35. data/sorbet/rbi/gems/rspec-core@3.11.0.rbi +7698 -0
  36. data/sorbet/rbi/gems/rspec-expectations@3.11.0.rbi +6201 -0
  37. data/sorbet/rbi/gems/rspec-mocks@3.11.1.rbi +3625 -0
  38. data/sorbet/rbi/gems/rspec-support@3.11.0.rbi +1176 -0
  39. data/sorbet/rbi/gems/rspec@3.11.0.rbi +40 -0
  40. data/sorbet/rbi/gems/rubocop-ast@1.19.1.rbi +8 -0
  41. data/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +8 -0
  42. data/sorbet/rbi/gems/rubocop@1.33.0.rbi +8 -0
  43. data/sorbet/rbi/gems/ruby-graphviz@1.2.5.rbi +840 -0
  44. data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +8 -0
  45. data/sorbet/rbi/gems/spoom@1.1.11.rbi +1600 -0
  46. data/sorbet/rbi/gems/tapioca@0.8.3.rbi +1978 -0
  47. data/sorbet/rbi/gems/thor@1.2.1.rbi +2921 -0
  48. data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +8 -0
  49. data/sorbet/rbi/gems/unicode-display_width@2.2.0.rbi +8 -0
  50. data/sorbet/rbi/gems/unparser@0.6.5.rbi +8 -0
  51. data/sorbet/rbi/gems/webrick@1.7.0.rbi +1802 -0
  52. data/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi +288 -0
  53. data/sorbet/rbi/gems/yard@0.9.28.rbi +12863 -0
  54. data/sorbet/tapioca/config.yml +13 -0
  55. data/sorbet/tapioca/require.rb +7 -0
  56. metadata +241 -0
@@ -0,0 +1,411 @@
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
+ module CodeOwnership
8
+ extend ::CodeOwnership
9
+
10
+ requires_ancestor { Kernel }
11
+
12
+ # Given a backtrace from either `Exception#backtrace` or `caller`, find the
13
+ # first line that corresponds to a file with assigned ownership
14
+ sig do
15
+ params(
16
+ backtrace: T.nilable(T::Array[::String]),
17
+ excluded_teams: T::Array[::CodeTeams::Team]
18
+ ).returns(T.nilable(::CodeTeams::Team))
19
+ end
20
+ def for_backtrace(backtrace, excluded_teams: T.unsafe(nil)); end
21
+
22
+ sig { params(klass: T.nilable(T.any(::Class, ::Module))).returns(T.nilable(::CodeTeams::Team)) }
23
+ def for_class(klass); end
24
+
25
+ sig { params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
26
+ def for_file(file); end
27
+
28
+ sig { params(package: ::ParsePackwerk::Package).returns(T.nilable(::CodeTeams::Team)) }
29
+ def for_package(package); end
30
+
31
+ sig { params(files: T::Array[::String], autocorrect: T::Boolean, stage_changes: T::Boolean).void }
32
+ def validate!(files: T.unsafe(nil), autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
33
+
34
+ class << self
35
+ # Generally, you should not ever need to do this, because once your ruby process loads, cached content should not change.
36
+ # Namely, the set of files, packages, and directories which are tracked for ownership should not change.
37
+ # The primary reason this is helpful is for clients of CodeOwnership who want to test their code, and each test context
38
+ # has different ownership and tracked files.
39
+ sig { void }
40
+ def bust_caches!; end
41
+
42
+ sig { params(filename: ::String).void }
43
+ def remove_file_annotation!(filename); end
44
+ end
45
+ end
46
+
47
+ class CodeOwnership::Cli
48
+ class << self
49
+ # For now, this just returns team ownership
50
+ # Later, this could also return code ownership errors about that file.
51
+ def for_file(argv); end
52
+
53
+ def run!(argv); end
54
+
55
+ private
56
+
57
+ def validate!(argv); end
58
+ end
59
+ end
60
+
61
+ class CodeOwnership::InvalidCodeOwnershipConfigurationError < ::StandardError; end
62
+
63
+ module CodeOwnership::Private
64
+ class << self
65
+ sig { void }
66
+ def bust_caches!; end
67
+
68
+ sig { returns(::CodeOwnership::Private::Configuration) }
69
+ def configuration; end
70
+
71
+ sig { returns(::CodeOwnership::Private::OwnershipMappers::FileAnnotations) }
72
+ def file_annotations_mapper; end
73
+
74
+ sig { params(files: T::Array[::String]).returns(T::Hash[::String, T::Array[::String]]) }
75
+ def files_by_mapper(files); end
76
+
77
+ sig { params(team_name: ::String, location_of_reference: ::String).returns(::CodeTeams::Team) }
78
+ def find_team!(team_name, location_of_reference); end
79
+
80
+ sig { returns(T::Array[::CodeOwnership::Private::OwnershipMappers::Interface]) }
81
+ def mappers; end
82
+
83
+ # Returns a string version of the relative path to a Rails constant,
84
+ # or nil if it can't find something
85
+ sig { params(klass: T.nilable(T.any(::Class, ::Module))).returns(T.nilable(::String)) }
86
+ def path_from_klass(klass); end
87
+
88
+ # The output of this function is string pathnames relative to the root.
89
+ sig { returns(T::Array[::String]) }
90
+ def tracked_files; end
91
+
92
+ sig { params(files: T::Array[::String], autocorrect: T::Boolean, stage_changes: T::Boolean).void }
93
+ def validate!(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
94
+ end
95
+ end
96
+
97
+ class CodeOwnership::Private::Configuration < ::T::Struct
98
+ const :js_package_paths, T::Array[::String]
99
+ const :owned_globs, T::Array[::String]
100
+ const :skip_codeowners_validation, T::Boolean
101
+ const :unowned_globs, T::Array[::String]
102
+
103
+ class << self
104
+ sig { returns(::CodeOwnership::Private::Configuration) }
105
+ def fetch; end
106
+
107
+ def inherited(s); end
108
+
109
+ sig { params(config_hash: T::Hash[T.untyped, T.untyped]).returns(T::Array[::String]) }
110
+ def js_package_paths(config_hash); end
111
+ end
112
+ end
113
+
114
+ CodeOwnership::Private::Configuration::DEFAULT_JS_PACKAGE_PATHS = T.let(T.unsafe(nil), Array)
115
+ module CodeOwnership::Private::OwnershipMappers; end
116
+
117
+ # Calculate, cache, and return a mapping of file names (relative to the root
118
+ # of the repository) to team name.
119
+ #
120
+ # Example:
121
+ #
122
+ # {
123
+ # 'app/models/company.rb' => Team.find('Setup & Onboarding'),
124
+ # ...
125
+ # }
126
+ class CodeOwnership::Private::OwnershipMappers::FileAnnotations
127
+ include ::CodeOwnership::Private::OwnershipMappers::Interface
128
+
129
+ sig { override.void }
130
+ def bust_caches!; end
131
+
132
+ sig { override.returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
133
+ def codeowners_lines_to_owners; end
134
+
135
+ sig { override.returns(::String) }
136
+ def description; end
137
+
138
+ sig { params(filename: ::String).returns(T.nilable(::CodeTeams::Team)) }
139
+ def file_annotation_based_owner(filename); end
140
+
141
+ sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
142
+ def map_file_to_owner(file); end
143
+
144
+ sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
145
+ def map_files_to_owners(files); end
146
+
147
+ sig { params(filename: ::String).void }
148
+ def remove_file_annotation!(filename); end
149
+ end
150
+
151
+ CodeOwnership::Private::OwnershipMappers::FileAnnotations::TEAM_PATTERN = T.let(T.unsafe(nil), Regexp)
152
+
153
+ # @abstract Subclasses must implement the `abstract` methods below.
154
+ module CodeOwnership::Private::OwnershipMappers::Interface
155
+ interface!
156
+
157
+ # @abstract
158
+ sig { abstract.void }
159
+ def bust_caches!; end
160
+
161
+ # @abstract
162
+ sig { abstract.returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
163
+ def codeowners_lines_to_owners; end
164
+
165
+ # @abstract
166
+ sig { abstract.returns(::String) }
167
+ def description; end
168
+
169
+ # This should be fast when run with ONE file
170
+ #
171
+ # @abstract
172
+ sig { abstract.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
173
+ def map_file_to_owner(file); end
174
+
175
+ # This should be fast when run with MANY files
176
+ #
177
+ # @abstract
178
+ sig { abstract.params(files: T::Array[::String]).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
179
+ def map_files_to_owners(files); end
180
+ end
181
+
182
+ class CodeOwnership::Private::OwnershipMappers::JsPackageOwnership
183
+ include ::CodeOwnership::Private::OwnershipMappers::Interface
184
+
185
+ sig { override.void }
186
+ def bust_caches!; end
187
+
188
+ # Package ownership ignores the passed in files when generating code owners lines.
189
+ # This is because Package ownership knows that the fastest way to find code owners for package based ownership
190
+ # 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
191
+ # In theory this means that we may generate code owners lines that cover files that are not in the passed in argument,
192
+ # but in practice this is not of consequence because in reality we never really want to generate code owners for only a
193
+ # subset of files, but rather we want code ownership for all files.
194
+ sig { override.returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
195
+ def codeowners_lines_to_owners; end
196
+
197
+ sig { override.returns(::String) }
198
+ def description; end
199
+
200
+ sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
201
+ def map_file_to_owner(file); end
202
+
203
+ sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
204
+ def map_files_to_owners(files); end
205
+
206
+ sig { params(package: ::CodeOwnership::Private::ParseJsPackages::Package).returns(T.nilable(::CodeTeams::Team)) }
207
+ def owner_for_package(package); end
208
+
209
+ private
210
+
211
+ # takes a file and finds the relevant `package.json` file by walking up the directory
212
+ # structure. Example, given `packages/a/b/c.rb`, this looks for `packages/a/b/package.json`, `packages/a/package.json`,
213
+ # `packages/package.json`, and `package.json` in that order, stopping at the first file to actually exist.
214
+ # We do additional caching so that we don't have to check for file existence every time
215
+ sig { params(file: ::String).returns(T.nilable(::CodeOwnership::Private::ParseJsPackages::Package)) }
216
+ def map_file_to_relevant_package(file); end
217
+ end
218
+
219
+ class CodeOwnership::Private::OwnershipMappers::PackageOwnership
220
+ include ::CodeOwnership::Private::OwnershipMappers::Interface
221
+
222
+ sig { override.void }
223
+ def bust_caches!; end
224
+
225
+ # Package ownership ignores the passed in files when generating code owners lines.
226
+ # This is because Package ownership knows that the fastest way to find code owners for package based ownership
227
+ # 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
228
+ # In theory this means that we may generate code owners lines that cover files that are not in the passed in argument,
229
+ # but in practice this is not of consequence because in reality we never really want to generate code owners for only a
230
+ # subset of files, but rather we want code ownership for all files.
231
+ sig { override.returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
232
+ def codeowners_lines_to_owners; end
233
+
234
+ sig { override.returns(::String) }
235
+ def description; end
236
+
237
+ sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
238
+ def map_file_to_owner(file); end
239
+
240
+ sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
241
+ def map_files_to_owners(files); end
242
+
243
+ sig { params(package: ::ParsePackwerk::Package).returns(T.nilable(::CodeTeams::Team)) }
244
+ def owner_for_package(package); end
245
+
246
+ private
247
+
248
+ # takes a file and finds the relevant `package.yml` file by walking up the directory
249
+ # structure. Example, given `packs/a/b/c.rb`, this looks for `packs/a/b/package.yml`, `packs/a/package.yml`,
250
+ # `packs/package.yml`, and `package.yml` in that order, stopping at the first file to actually exist.
251
+ # We do additional caching so that we don't have to check for file existence every time
252
+ sig { params(file: ::String).returns(T.nilable(::ParsePackwerk::Package)) }
253
+ def map_file_to_relevant_package(file); end
254
+ end
255
+
256
+ class CodeOwnership::Private::OwnershipMappers::TeamGlobs
257
+ include ::CodeOwnership::Private::OwnershipMappers::Interface
258
+
259
+ sig { override.void }
260
+ def bust_caches!; end
261
+
262
+ sig { override.returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
263
+ def codeowners_lines_to_owners; end
264
+
265
+ sig { override.returns(::String) }
266
+ def description; end
267
+
268
+ sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
269
+ def map_file_to_owner(file); end
270
+
271
+ sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
272
+ def map_files_to_owners(files); end
273
+ end
274
+
275
+ # Modeled off of ParsePackwerk
276
+ module CodeOwnership::Private::ParseJsPackages
277
+ class << self
278
+ sig { returns(T::Array[::CodeOwnership::Private::ParseJsPackages::Package]) }
279
+ def all; end
280
+ end
281
+ end
282
+
283
+ CodeOwnership::Private::ParseJsPackages::METADATA = T.let(T.unsafe(nil), String)
284
+ CodeOwnership::Private::ParseJsPackages::PACKAGE_JSON_NAME = T.let(T.unsafe(nil), String)
285
+
286
+ class CodeOwnership::Private::ParseJsPackages::Package < ::T::Struct
287
+ const :metadata, T::Hash[::String, T.untyped]
288
+ const :name, ::String
289
+
290
+ sig { returns(::Pathname) }
291
+ def directory; end
292
+
293
+ class << self
294
+ sig { params(pathname: ::Pathname).returns(::CodeOwnership::Private::ParseJsPackages::Package) }
295
+ def from(pathname); end
296
+
297
+ def inherited(s); end
298
+ end
299
+ end
300
+
301
+ CodeOwnership::Private::ParseJsPackages::ROOT_PACKAGE_NAME = T.let(T.unsafe(nil), String)
302
+ module CodeOwnership::Private::TeamPlugins; end
303
+
304
+ class CodeOwnership::Private::TeamPlugins::Github < ::CodeTeams::Plugin
305
+ sig { returns(::CodeOwnership::Private::TeamPlugins::Github::GithubStruct) }
306
+ def github; end
307
+ end
308
+
309
+ class CodeOwnership::Private::TeamPlugins::Github::GithubStruct < ::Struct
310
+ # Returns the value of attribute do_not_add_to_codeowners_file
311
+ #
312
+ # @return [Object] the current value of do_not_add_to_codeowners_file
313
+ def do_not_add_to_codeowners_file; end
314
+
315
+ # Sets the attribute do_not_add_to_codeowners_file
316
+ #
317
+ # @param value [Object] the value to set the attribute do_not_add_to_codeowners_file to.
318
+ # @return [Object] the newly set value
319
+ def do_not_add_to_codeowners_file=(_); end
320
+
321
+ # Returns the value of attribute team
322
+ #
323
+ # @return [Object] the current value of team
324
+ def team; end
325
+
326
+ # Sets the attribute team
327
+ #
328
+ # @param value [Object] the value to set the attribute team to.
329
+ # @return [Object] the newly set value
330
+ def team=(_); end
331
+
332
+ class << self
333
+ def [](*_arg0); end
334
+ def inspect; end
335
+ def members; end
336
+ def new(*_arg0); end
337
+ end
338
+ end
339
+
340
+ class CodeOwnership::Private::TeamPlugins::Ownership < ::CodeTeams::Plugin
341
+ sig { returns(T::Array[::String]) }
342
+ def owned_globs; end
343
+ end
344
+
345
+ module CodeOwnership::Private::Validations; end
346
+
347
+ class CodeOwnership::Private::Validations::FilesHaveOwners
348
+ include ::CodeOwnership::Private::Validations::Interface
349
+
350
+ sig do
351
+ override
352
+ .params(
353
+ files: T::Array[::String],
354
+ autocorrect: T::Boolean,
355
+ stage_changes: T::Boolean
356
+ ).returns(T::Array[::String])
357
+ end
358
+ def validation_errors(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
359
+ end
360
+
361
+ class CodeOwnership::Private::Validations::FilesHaveUniqueOwners
362
+ include ::CodeOwnership::Private::Validations::Interface
363
+
364
+ sig do
365
+ override
366
+ .params(
367
+ files: T::Array[::String],
368
+ autocorrect: T::Boolean,
369
+ stage_changes: T::Boolean
370
+ ).returns(T::Array[::String])
371
+ end
372
+ def validation_errors(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
373
+ end
374
+
375
+ class CodeOwnership::Private::Validations::GithubCodeownersUpToDate
376
+ include ::CodeOwnership::Private::Validations::Interface
377
+
378
+ sig do
379
+ override
380
+ .params(
381
+ files: T::Array[::String],
382
+ autocorrect: T::Boolean,
383
+ stage_changes: T::Boolean
384
+ ).returns(T::Array[::String])
385
+ end
386
+ def validation_errors(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
387
+
388
+ private
389
+
390
+ # Generate the contents of a CODEOWNERS file that GitHub can use to
391
+ # automatically assign reviewers
392
+ # https://help.github.com/articles/about-codeowners/
393
+ sig { returns(T::Array[::String]) }
394
+ def codeowners_file_lines; end
395
+ end
396
+
397
+ # @abstract Subclasses must implement the `abstract` methods below.
398
+ module CodeOwnership::Private::Validations::Interface
399
+ interface!
400
+
401
+ # @abstract
402
+ sig do
403
+ abstract
404
+ .params(
405
+ files: T::Array[::String],
406
+ autocorrect: T::Boolean,
407
+ stage_changes: T::Boolean
408
+ ).returns(T::Array[::String])
409
+ end
410
+ def validation_errors(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
411
+ end
@@ -0,0 +1,138 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `code_teams` gem.
5
+ # Please instead update this file by running `bin/tapioca gem code_teams`.
6
+
7
+ module CodeTeams
8
+ class << self
9
+ sig { returns(T::Array[::CodeTeams::Team]) }
10
+ def all; end
11
+
12
+ # Generally, you should not ever need to do this, because once your ruby process loads, cached content should not change.
13
+ # Namely, the YML files that are the source of truth for teams should not change, so we should not need to look at the YMLs again to verify.
14
+ # The primary reason this is helpful is for clients of CodeTeams who want to test their code, and each test context has different set of teams
15
+ sig { void }
16
+ def bust_caches!; end
17
+
18
+ sig { params(name: ::String).returns(T.nilable(::CodeTeams::Team)) }
19
+ def find(name); end
20
+
21
+ sig { params(dir: ::String).returns(T::Array[::CodeTeams::Team]) }
22
+ def for_directory(dir); end
23
+
24
+ sig { params(string: ::String).returns(::String) }
25
+ def tag_value_for(string); end
26
+
27
+ sig { params(teams: T::Array[::CodeTeams::Team]).returns(T::Array[::String]) }
28
+ def validation_errors(teams); end
29
+ end
30
+ end
31
+
32
+ class CodeTeams::IncorrectPublicApiUsageError < ::StandardError; end
33
+
34
+ # Plugins allow a client to add validation on custom keys in the team YML.
35
+ # For now, only a single plugin is allowed to manage validation on a top-level key.
36
+ # In the future we can think of allowing plugins to be gracefully merged with each other.
37
+ #
38
+ # @abstract It cannont be directly instantiated. Subclasses must implement the `abstract` methods below.
39
+ class CodeTeams::Plugin
40
+ abstract!
41
+
42
+ sig { params(team: ::CodeTeams::Team).void }
43
+ def initialize(team); end
44
+
45
+ class << self
46
+ sig { returns(T::Array[T.class_of(CodeTeams::Plugin)]) }
47
+ def all_plugins; end
48
+
49
+ sig { params(team: ::CodeTeams::Team).returns(T.attached_class) }
50
+ def for(team); end
51
+
52
+ sig { params(base: T.untyped).void }
53
+ def inherited(base); end
54
+
55
+ sig { params(team: ::CodeTeams::Team, key: ::String).returns(::String) }
56
+ def missing_key_error_message(team, key); end
57
+
58
+ sig { params(teams: T::Array[::CodeTeams::Team]).returns(T::Array[::String]) }
59
+ def validation_errors(teams); end
60
+
61
+ private
62
+
63
+ sig { params(team: ::CodeTeams::Team).returns(T.attached_class) }
64
+ def register_team(team); end
65
+
66
+ sig { returns(T::Hash[T.nilable(::String), T::Hash[::Class, ::CodeTeams::Plugin]]) }
67
+ def registry; end
68
+ end
69
+ end
70
+
71
+ module CodeTeams::Plugins; end
72
+
73
+ class CodeTeams::Plugins::Identity < ::CodeTeams::Plugin
74
+ sig { returns(::CodeTeams::Plugins::Identity::IdentityStruct) }
75
+ def identity; end
76
+
77
+ class << self
78
+ sig { override.params(teams: T::Array[::CodeTeams::Team]).returns(T::Array[::String]) }
79
+ def validation_errors(teams); end
80
+ end
81
+ end
82
+
83
+ class CodeTeams::Plugins::Identity::IdentityStruct < ::Struct
84
+ # Returns the value of attribute name
85
+ #
86
+ # @return [Object] the current value of name
87
+ def name; end
88
+
89
+ # Sets the attribute name
90
+ #
91
+ # @param value [Object] the value to set the attribute name to.
92
+ # @return [Object] the newly set value
93
+ def name=(_); end
94
+
95
+ class << self
96
+ def [](*_arg0); end
97
+ def inspect; end
98
+ def members; end
99
+ def new(*_arg0); end
100
+ end
101
+ end
102
+
103
+ class CodeTeams::Team
104
+ sig { params(config_yml: T.nilable(::String), raw_hash: T::Hash[T.untyped, T.untyped]).void }
105
+ def initialize(config_yml:, raw_hash:); end
106
+
107
+ sig { params(other: ::Object).returns(T::Boolean) }
108
+ def ==(other); end
109
+
110
+ sig { returns(T.nilable(::String)) }
111
+ def config_yml; end
112
+
113
+ # @param other [Object]
114
+ # @return [Boolean]
115
+ def eql?(*args, &blk); end
116
+
117
+ sig { returns(::Integer) }
118
+ def hash; end
119
+
120
+ sig { returns(::String) }
121
+ def name; end
122
+
123
+ sig { returns(T::Hash[T.untyped, T.untyped]) }
124
+ def raw_hash; end
125
+
126
+ sig { returns(::String) }
127
+ def to_tag; end
128
+
129
+ class << self
130
+ sig { params(raw_hash: T::Hash[T.untyped, T.untyped]).returns(::CodeTeams::Team) }
131
+ def from_hash(raw_hash); end
132
+
133
+ sig { params(config_yml: ::String).returns(::CodeTeams::Team) }
134
+ def from_yml(config_yml); end
135
+ end
136
+ end
137
+
138
+ CodeTeams::UNKNOWN_TEAM_STRING = T.let(T.unsafe(nil), String)
@@ -0,0 +1,8 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `coderay` gem.
5
+ # Please instead update this file by running `bin/tapioca gem coderay`.
6
+
7
+ # THIS IS AN EMPTY RBI FILE.
8
+ # see https://github.com/Shopify/tapioca/wiki/Manual-Gem-Requires
@@ -0,0 +1,8 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `concurrent-ruby` gem.
5
+ # Please instead update this file by running `bin/tapioca gem concurrent-ruby`.
6
+
7
+ # THIS IS AN EMPTY RBI FILE.
8
+ # see https://github.com/Shopify/tapioca/wiki/Manual-Gem-Requires