sorbet-result 1.0.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/.standard.yml +6 -0
  4. data/.tool-versions +1 -1
  5. data/CHANGELOG.md +21 -0
  6. data/Gemfile +3 -5
  7. data/Gemfile.lock +79 -64
  8. data/README.md +25 -2
  9. data/Rakefile +3 -5
  10. data/lib/minitest/result_assertions.rb +48 -0
  11. data/lib/sorbet-result.rb +1 -5
  12. data/lib/typed/result.rb +199 -7
  13. data/sorbet/rbi/gems/.gitattributes +1 -0
  14. data/sorbet/rbi/gems/ast@2.4.2.rbi +1 -0
  15. data/sorbet/rbi/gems/erubi@1.13.0.rbi +150 -0
  16. data/sorbet/rbi/gems/{io-console@0.6.0.rbi → io-console@0.7.2.rbi} +1 -0
  17. data/sorbet/rbi/gems/{json@2.6.3.rbi → json@2.7.5.rbi} +168 -72
  18. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14238 -0
  19. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +240 -0
  20. data/sorbet/rbi/gems/{minitest@5.18.1.rbi → minitest@5.25.1.rbi} +337 -282
  21. data/sorbet/rbi/gems/netrc@0.11.0.rbi +1 -0
  22. data/sorbet/rbi/gems/{parallel@1.23.0.rbi → parallel@1.26.3.rbi} +38 -20
  23. data/sorbet/rbi/gems/{parser@3.2.2.3.rbi → parser@3.3.5.1.rbi} +663 -2397
  24. data/sorbet/rbi/gems/prism@1.2.0.rbi +39085 -0
  25. data/sorbet/rbi/gems/psych@5.1.2.rbi +1732 -0
  26. data/sorbet/rbi/gems/{racc@1.7.1.rbi → racc@1.8.1.rbi} +37 -36
  27. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +1 -0
  28. data/sorbet/rbi/gems/{rake@13.0.6.rbi → rake@13.2.1.rbi} +79 -75
  29. data/sorbet/rbi/gems/rbi@0.2.1.rbi +4535 -0
  30. data/sorbet/rbi/gems/{regexp_parser@2.8.1.rbi → regexp_parser@2.9.2.rbi} +190 -167
  31. data/sorbet/rbi/gems/{reline@0.3.5.rbi → reline@0.5.10.rbi} +1 -0
  32. data/sorbet/rbi/gems/{rubocop-ast@1.29.0.rbi → rubocop-ast@1.33.1.rbi} +1220 -748
  33. data/sorbet/rbi/gems/rubocop-performance@1.22.1.rbi +9 -0
  34. data/sorbet/rbi/gems/rubocop-sorbet@0.7.8.rbi +9 -0
  35. data/sorbet/rbi/gems/{rubocop@1.52.1.rbi → rubocop@1.66.1.rbi} +6236 -3446
  36. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1 -0
  37. data/sorbet/rbi/gems/spoom@1.5.0.rbi +4932 -0
  38. data/sorbet/rbi/gems/standard-custom@1.0.2.rbi +9 -0
  39. data/sorbet/rbi/gems/standard-performance@1.5.0.rbi +9 -0
  40. data/sorbet/rbi/gems/standard-sorbet@0.0.2.rbi +53 -0
  41. data/sorbet/rbi/gems/standard@1.41.1.rbi +926 -0
  42. data/sorbet/rbi/gems/stringio@3.1.1.rbi +9 -0
  43. data/sorbet/rbi/gems/{tapioca@0.11.6.rbi → tapioca@0.16.3.rbi} +937 -635
  44. data/sorbet/rbi/gems/{thor@1.2.2.rbi → thor@1.3.2.rbi} +832 -419
  45. data/sorbet/rbi/gems/{unicode-display_width@2.4.2.rbi → unicode-display_width@2.6.0.rbi} +1 -0
  46. data/sorbet/rbi/gems/{yard-sorbet@0.8.1.rbi → yard-sorbet@0.9.0.rbi} +36 -29
  47. data/sorbet/rbi/gems/{yard@0.9.34.rbi → yard@0.9.37.rbi} +431 -271
  48. data/sorbet/tapioca/config.yml +3 -12
  49. data/sorbet/tapioca/require.rb +0 -1
  50. metadata +37 -47
  51. data/.rubocop.yml +0 -33
  52. data/lib/typed/failure.rb +0 -81
  53. data/lib/typed/success.rb +0 -80
  54. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +0 -1083
  55. data/sorbet/rbi/gems/irb@1.7.0.rbi +0 -342
  56. data/sorbet/rbi/gems/rbi@0.0.16.rbi +0 -3008
  57. data/sorbet/rbi/gems/rexml@3.2.5.rbi +0 -4717
  58. data/sorbet/rbi/gems/rubocop-minitest@0.31.0.rbi +0 -2528
  59. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +0 -328
  60. data/sorbet/rbi/gems/rubocop-sorbet@0.7.0.rbi +0 -1043
  61. data/sorbet/rbi/gems/spoom@1.2.1.rbi +0 -2503
  62. data/sorbet/rbi/gems/unparser@0.6.8.rbi +0 -4525
  63. data/sorbet/rbi/gems/zeitwerk@2.6.8.rbi +0 -986
@@ -1,2503 +0,0 @@
1
- # typed: true
2
-
3
- # DO NOT EDIT MANUALLY
4
- # This is an autogenerated file for types exported from the `spoom` gem.
5
- # Please instead update this file by running `bin/tapioca gem spoom`.
6
-
7
- # source://spoom//lib/spoom.rb#7
8
- module Spoom; end
9
-
10
- # source://spoom//lib/spoom/cli/helper.rb#9
11
- module Spoom::Cli; end
12
-
13
- # source://spoom//lib/spoom/cli/bump.rb#9
14
- class Spoom::Cli::Bump < ::Thor
15
- include ::Spoom::Colorize
16
- include ::Spoom::Cli::Helper
17
-
18
- # source://spoom//lib/spoom/cli/bump.rb#49
19
- sig { params(directory: ::String).void }
20
- def bump(directory = T.unsafe(nil)); end
21
-
22
- def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
23
-
24
- # source://spoom//lib/spoom/cli/bump.rb#170
25
- def print_changes(files, command:, from: T.unsafe(nil), to: T.unsafe(nil), dry: T.unsafe(nil), path: T.unsafe(nil)); end
26
-
27
- # source://spoom//lib/spoom/cli/bump.rb#192
28
- def undo_changes(files, from_strictness); end
29
- end
30
-
31
- # source://spoom//lib/spoom/cli/config.rb#9
32
- class Spoom::Cli::Config < ::Thor
33
- include ::Spoom::Colorize
34
- include ::Spoom::Cli::Helper
35
-
36
- def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
37
-
38
- # source://spoom//lib/spoom/cli/config.rb#15
39
- def show; end
40
- end
41
-
42
- # source://spoom//lib/spoom/cli/coverage.rb#9
43
- class Spoom::Cli::Coverage < ::Thor
44
- include ::Spoom::Colorize
45
- include ::Spoom::Cli::Helper
46
-
47
- # source://spoom//lib/spoom/cli/coverage.rb#198
48
- def bundle_install(path, sha); end
49
-
50
- def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
51
-
52
- # source://spoom//lib/spoom/cli/coverage.rb#210
53
- def message_no_data(file); end
54
-
55
- # source://spoom//lib/spoom/cli/coverage.rb#173
56
- def open(file = T.unsafe(nil)); end
57
-
58
- # source://spoom//lib/spoom/cli/coverage.rb#189
59
- def parse_time(string, option); end
60
-
61
- # source://spoom//lib/spoom/cli/coverage.rb#142
62
- def report; end
63
-
64
- # source://spoom//lib/spoom/cli/coverage.rb#20
65
- def snapshot; end
66
-
67
- # source://spoom//lib/spoom/cli/coverage.rb#42
68
- def timeline; end
69
- end
70
-
71
- # source://spoom//lib/spoom/cli/coverage.rb#12
72
- Spoom::Cli::Coverage::DATA_DIR = T.let(T.unsafe(nil), String)
73
-
74
- # source://spoom//lib/spoom/cli/helper.rb#10
75
- module Spoom::Cli::Helper
76
- include ::Spoom::Colorize
77
-
78
- requires_ancestor { Thor }
79
-
80
- # source://spoom//lib/spoom/cli/helper.rb#119
81
- sig { params(string: ::String).returns(::String) }
82
- def blue(string); end
83
-
84
- # Is the `--color` option true?
85
- #
86
- # source://spoom//lib/spoom/cli/helper.rb#83
87
- sig { returns(T::Boolean) }
88
- def color?; end
89
-
90
- # Colorize a string if `color?`
91
- #
92
- # source://spoom//lib/spoom/cli/helper.rb#112
93
- sig { params(string: ::String, color: ::Spoom::Color).returns(::String) }
94
- def colorize(string, *color); end
95
-
96
- # Returns the context at `--path` (by default the current working directory)
97
- #
98
- # source://spoom//lib/spoom/cli/helper.rb#51
99
- sig { returns(::Spoom::Context) }
100
- def context; end
101
-
102
- # Raise if `spoom` is not ran inside a context with a `sorbet/config` file
103
- #
104
- # source://spoom//lib/spoom/cli/helper.rb#57
105
- sig { returns(::Spoom::Context) }
106
- def context_requiring_sorbet!; end
107
-
108
- # source://spoom//lib/spoom/cli/helper.rb#124
109
- sig { params(string: ::String).returns(::String) }
110
- def cyan(string); end
111
-
112
- # Return the path specified through `--path`
113
- #
114
- # source://spoom//lib/spoom/cli/helper.rb#72
115
- sig { returns(::String) }
116
- def exec_path; end
117
-
118
- # source://spoom//lib/spoom/cli/helper.rb#129
119
- sig { params(string: ::String).returns(::String) }
120
- def gray(string); end
121
-
122
- # source://spoom//lib/spoom/cli/helper.rb#134
123
- sig { params(string: ::String).returns(::String) }
124
- def green(string); end
125
-
126
- # source://spoom//lib/spoom/cli/helper.rb#88
127
- sig { params(string: ::String).returns(::String) }
128
- def highlight(string); end
129
-
130
- # source://spoom//lib/spoom/cli/helper.rb#139
131
- sig { params(string: ::String).returns(::String) }
132
- def red(string); end
133
-
134
- # Print `message` on `$stdout`
135
- #
136
- # source://spoom//lib/spoom/cli/helper.rb#20
137
- sig { params(message: ::String).void }
138
- def say(message); end
139
-
140
- # Print `message` on `$stderr`
141
- #
142
- # The message is prefixed by a status (default: `Error`).
143
- #
144
- # source://spoom//lib/spoom/cli/helper.rb#39
145
- sig { params(message: ::String, status: T.nilable(::String), nl: T::Boolean).void }
146
- def say_error(message, status: T.unsafe(nil), nl: T.unsafe(nil)); end
147
-
148
- # source://spoom//lib/spoom/cli/helper.rb#144
149
- sig { params(string: ::String).returns(::String) }
150
- def yellow(string); end
151
- end
152
-
153
- # source://spoom//lib/spoom/cli/lsp.rb#10
154
- class Spoom::Cli::LSP < ::Thor
155
- include ::Spoom::Colorize
156
- include ::Spoom::Cli::Helper
157
-
158
- # TODO: options, filter, limit, kind etc.. filter rbi
159
- #
160
- # source://spoom//lib/spoom/cli/lsp.rb#55
161
- def defs(file, line, col); end
162
-
163
- # TODO: options, filter, limit, kind etc.. filter rbi
164
- #
165
- # source://spoom//lib/spoom/cli/lsp.rb#65
166
- def find(query); end
167
-
168
- def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
169
-
170
- # TODO: options, filter, limit, kind etc.. filter rbi
171
- #
172
- # source://spoom//lib/spoom/cli/lsp.rb#41
173
- def hover(file, line, col); end
174
-
175
- # TODO: options, filter, limit, kind etc.. filter rbi
176
- #
177
- # source://spoom//lib/spoom/cli/lsp.rb#26
178
- def list; end
179
-
180
- # source://spoom//lib/spoom/cli/lsp.rb#114
181
- def lsp_client; end
182
-
183
- # TODO: options, filter, limit, kind etc.. filter rbi
184
- #
185
- # source://spoom//lib/spoom/cli/lsp.rb#85
186
- def refs(file, line, col); end
187
-
188
- # source://spoom//lib/spoom/cli/lsp.rb#137
189
- def run(&block); end
190
-
191
- # source://spoom//lib/spoom/cli/lsp.rb#16
192
- def show; end
193
-
194
- # TODO: options, filter, limit, kind etc.. filter rbi
195
- #
196
- # source://spoom//lib/spoom/cli/lsp.rb#95
197
- def sigs(file, line, col); end
198
-
199
- # source://spoom//lib/spoom/cli/lsp.rb#129
200
- def symbol_printer; end
201
-
202
- # TODO: options, filter, limit, kind etc.. filter rbi
203
- #
204
- # source://spoom//lib/spoom/cli/lsp.rb#75
205
- def symbols(file); end
206
-
207
- # source://spoom//lib/spoom/cli/lsp.rb#162
208
- def to_uri(path); end
209
-
210
- # TODO: options, filter, limit, kind etc.. filter rbi
211
- #
212
- # source://spoom//lib/spoom/cli/lsp.rb#105
213
- def types(file, line, col); end
214
- end
215
-
216
- # source://spoom//lib/spoom/cli.rb#16
217
- class Spoom::Cli::Main < ::Thor
218
- include ::Spoom::Colorize
219
- include ::Spoom::Cli::Helper
220
-
221
- # source://spoom//lib/spoom/cli.rb#61
222
- def __print_version; end
223
-
224
- # source://thor/1.2.1/lib/thor.rb#239
225
- def bump(*args); end
226
-
227
- # source://thor/1.2.1/lib/thor.rb#239
228
- def config(*args); end
229
-
230
- # source://thor/1.2.1/lib/thor.rb#239
231
- def coverage(*args); end
232
-
233
- # source://spoom//lib/spoom/cli.rb#43
234
- def files; end
235
-
236
- # source://thor/1.2.1/lib/thor.rb#239
237
- def lsp(*args); end
238
-
239
- # source://thor/1.2.1/lib/thor.rb#239
240
- def tc(*args); end
241
-
242
- class << self
243
- # @return [Boolean]
244
- #
245
- # source://spoom//lib/spoom/cli.rb#68
246
- def exit_on_failure?; end
247
- end
248
- end
249
-
250
- # source://spoom//lib/spoom/cli/run.rb#6
251
- class Spoom::Cli::Run < ::Thor
252
- include ::Spoom::Colorize
253
- include ::Spoom::Cli::Helper
254
-
255
- # source://spoom//lib/spoom/cli/run.rb#131
256
- def colorize_message(message); end
257
-
258
- # source://spoom//lib/spoom/cli/run.rb#122
259
- def format_error(error, format); end
260
-
261
- def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
262
-
263
- # source://spoom//lib/spoom/cli/run.rb#26
264
- def tc(*paths_to_select); end
265
- end
266
-
267
- # source://spoom//lib/spoom/cli/run.rb#15
268
- Spoom::Cli::Run::DEFAULT_FORMAT = T.let(T.unsafe(nil), String)
269
-
270
- # source://spoom//lib/spoom/cli/run.rb#11
271
- Spoom::Cli::Run::SORT_CODE = T.let(T.unsafe(nil), String)
272
-
273
- # source://spoom//lib/spoom/cli/run.rb#13
274
- Spoom::Cli::Run::SORT_ENUM = T.let(T.unsafe(nil), Array)
275
-
276
- # source://spoom//lib/spoom/cli/run.rb#12
277
- Spoom::Cli::Run::SORT_LOC = T.let(T.unsafe(nil), String)
278
-
279
- # source://spoom//lib/spoom/colors.rb#5
280
- class Spoom::Color < ::T::Enum
281
- enums do
282
- CLEAR = new
283
- BOLD = new
284
- BLACK = new
285
- RED = new
286
- GREEN = new
287
- YELLOW = new
288
- BLUE = new
289
- MAGENTA = new
290
- CYAN = new
291
- WHITE = new
292
- LIGHT_BLACK = new
293
- LIGHT_RED = new
294
- LIGHT_GREEN = new
295
- LIGHT_YELLOW = new
296
- LIGHT_BLUE = new
297
- LIGHT_MAGENTA = new
298
- LIGHT_CYAN = new
299
- LIGHT_WHITE = new
300
- end
301
-
302
- # source://spoom//lib/spoom/colors.rb#32
303
- sig { returns(::String) }
304
- def ansi_code; end
305
- end
306
-
307
- # source://spoom//lib/spoom/colors.rb#37
308
- module Spoom::Colorize
309
- # source://spoom//lib/spoom/colors.rb#41
310
- sig { params(string: ::String, color: ::Spoom::Color).returns(::String) }
311
- def set_color(string, *color); end
312
- end
313
-
314
- # An abstraction to a Ruby project context
315
- #
316
- # A context maps to a directory in the file system.
317
- # It is used to manipulate files and run commands in the context of this directory.
318
- #
319
- # source://spoom//lib/spoom/context/bundle.rb#5
320
- class Spoom::Context
321
- include ::Spoom::Context::Bundle
322
- include ::Spoom::Context::Exec
323
- include ::Spoom::Context::FileSystem
324
- include ::Spoom::Context::Git
325
- include ::Spoom::Context::Sorbet
326
-
327
- # Create a new context about `absolute_path`
328
- #
329
- # The directory will not be created if it doesn't exist.
330
- # Call `#make!` to create it.
331
- #
332
- # source://spoom//lib/spoom/context.rb#51
333
- sig { params(absolute_path: ::String).void }
334
- def initialize(absolute_path); end
335
-
336
- # The absolute path to the directory this context is about
337
- #
338
- # source://spoom//lib/spoom/context.rb#44
339
- sig { returns(::String) }
340
- def absolute_path; end
341
-
342
- class << self
343
- # Create a new context in the system's temporary directory
344
- #
345
- # `name` is used as prefix to the temporary directory name.
346
- # The directory will be created if it doesn't exist.
347
- #
348
- # source://spoom//lib/spoom/context.rb#37
349
- sig { params(name: T.nilable(::String)).returns(T.attached_class) }
350
- def mktmp!(name = T.unsafe(nil)); end
351
- end
352
- end
353
-
354
- # Bundle features for a context
355
- #
356
- # source://spoom//lib/spoom/context/bundle.rb#7
357
- module Spoom::Context::Bundle
358
- requires_ancestor { Spoom::Context }
359
-
360
- # Run a command with `bundle` in this context directory
361
- #
362
- # source://spoom//lib/spoom/context/bundle.rb#27
363
- sig { params(command: ::String, version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) }
364
- def bundle(command, version: T.unsafe(nil), capture_err: T.unsafe(nil)); end
365
-
366
- # Run a command `bundle exec` in this context directory
367
- #
368
- # source://spoom//lib/spoom/context/bundle.rb#40
369
- sig { params(command: ::String, version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) }
370
- def bundle_exec(command, version: T.unsafe(nil), capture_err: T.unsafe(nil)); end
371
-
372
- # Run `bundle install` in this context directory
373
- #
374
- # source://spoom//lib/spoom/context/bundle.rb#34
375
- sig { params(version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) }
376
- def bundle_install!(version: T.unsafe(nil), capture_err: T.unsafe(nil)); end
377
-
378
- # Get `gem` version from the `Gemfile.lock` content
379
- #
380
- # Returns `nil` if `gem` cannot be found in the Gemfile.
381
- #
382
- # source://spoom//lib/spoom/context/bundle.rb#48
383
- sig { params(gem: ::String).returns(T.nilable(::String)) }
384
- def gem_version_from_gemfile_lock(gem); end
385
-
386
- # Read the `contents` of the Gemfile in this context directory
387
- #
388
- # source://spoom//lib/spoom/context/bundle.rb#15
389
- sig { returns(T.nilable(::String)) }
390
- def read_gemfile; end
391
-
392
- # Set the `contents` of the Gemfile in this context directory
393
- #
394
- # source://spoom//lib/spoom/context/bundle.rb#21
395
- sig { params(contents: ::String, append: T::Boolean).void }
396
- def write_gemfile!(contents, append: T.unsafe(nil)); end
397
- end
398
-
399
- # Execution features for a context
400
- #
401
- # source://spoom//lib/spoom/context/exec.rb#27
402
- module Spoom::Context::Exec
403
- requires_ancestor { Spoom::Context }
404
-
405
- # Run a command in this context directory
406
- #
407
- # source://spoom//lib/spoom/context/exec.rb#35
408
- sig { params(command: ::String, capture_err: T::Boolean).returns(::Spoom::ExecResult) }
409
- def exec(command, capture_err: T.unsafe(nil)); end
410
- end
411
-
412
- # File System features for a context
413
- #
414
- # source://spoom//lib/spoom/context/file_system.rb#7
415
- module Spoom::Context::FileSystem
416
- requires_ancestor { Spoom::Context }
417
-
418
- # Returns the absolute path to `relative_path` in the context's directory
419
- #
420
- # source://spoom//lib/spoom/context/file_system.rb#15
421
- sig { params(relative_path: ::String).returns(::String) }
422
- def absolute_path_to(relative_path); end
423
-
424
- # Delete this context and its content
425
- #
426
- # Warning: it will `rm -rf` the context directory on the file system.
427
- #
428
- # source://spoom//lib/spoom/context/file_system.rb#88
429
- sig { void }
430
- def destroy!; end
431
-
432
- # Does the context directory at `absolute_path` exist and is a directory?
433
- #
434
- # source://spoom//lib/spoom/context/file_system.rb#21
435
- sig { returns(T::Boolean) }
436
- def exist?; end
437
-
438
- # Does `relative_path` point to an existing file in this context directory?
439
- #
440
- # source://spoom//lib/spoom/context/file_system.rb#48
441
- sig { params(relative_path: ::String).returns(T::Boolean) }
442
- def file?(relative_path); end
443
-
444
- # List all files in this context matching `pattern`
445
- #
446
- # source://spoom//lib/spoom/context/file_system.rb#34
447
- sig { params(pattern: ::String).returns(T::Array[::String]) }
448
- def glob(pattern = T.unsafe(nil)); end
449
-
450
- # List all files at the top level of this context directory
451
- #
452
- # source://spoom//lib/spoom/context/file_system.rb#42
453
- sig { returns(T::Array[::String]) }
454
- def list; end
455
-
456
- # Create the context directory at `absolute_path`
457
- #
458
- # source://spoom//lib/spoom/context/file_system.rb#27
459
- sig { void }
460
- def mkdir!; end
461
-
462
- # Move the file or directory from `from_relative_path` to `to_relative_path`
463
- #
464
- # source://spoom//lib/spoom/context/file_system.rb#78
465
- sig { params(from_relative_path: ::String, to_relative_path: ::String).void }
466
- def move!(from_relative_path, to_relative_path); end
467
-
468
- # Return the contents of the file at `relative_path` in this context directory
469
- #
470
- # Will raise if the file doesn't exist.
471
- #
472
- # source://spoom//lib/spoom/context/file_system.rb#56
473
- sig { params(relative_path: ::String).returns(::String) }
474
- def read(relative_path); end
475
-
476
- # Remove the path at `relative_path` (recursive + force) in this context directory
477
- #
478
- # source://spoom//lib/spoom/context/file_system.rb#72
479
- sig { params(relative_path: ::String).void }
480
- def remove!(relative_path); end
481
-
482
- # Write `contents` in the file at `relative_path` in this context directory
483
- #
484
- # Append to the file if `append` is true.
485
- #
486
- # source://spoom//lib/spoom/context/file_system.rb#64
487
- sig { params(relative_path: ::String, contents: ::String, append: T::Boolean).void }
488
- def write!(relative_path, contents = T.unsafe(nil), append: T.unsafe(nil)); end
489
- end
490
-
491
- # Git features for a context
492
- #
493
- # source://spoom//lib/spoom/context/git.rb#35
494
- module Spoom::Context::Git
495
- requires_ancestor { Spoom::Context }
496
-
497
- # Run a command prefixed by `git` in this context directory
498
- #
499
- # source://spoom//lib/spoom/context/git.rb#43
500
- sig { params(command: ::String).returns(::Spoom::ExecResult) }
501
- def git(command); end
502
-
503
- # Run `git checkout` in this context directory
504
- #
505
- # source://spoom//lib/spoom/context/git.rb#62
506
- sig { params(ref: ::String).returns(::Spoom::ExecResult) }
507
- def git_checkout!(ref: T.unsafe(nil)); end
508
-
509
- # Run `git add . && git commit` in this context directory
510
- #
511
- # source://spoom//lib/spoom/context/git.rb#68
512
- sig { params(message: ::String, time: ::Time, allow_empty: T::Boolean).void }
513
- def git_commit!(message: T.unsafe(nil), time: T.unsafe(nil), allow_empty: T.unsafe(nil)); end
514
-
515
- # Get the current git branch in this context directory
516
- #
517
- # source://spoom//lib/spoom/context/git.rb#79
518
- sig { returns(T.nilable(::String)) }
519
- def git_current_branch; end
520
-
521
- # Run `git diff` in this context directory
522
- #
523
- # source://spoom//lib/spoom/context/git.rb#88
524
- sig { params(arg: ::String).returns(::Spoom::ExecResult) }
525
- def git_diff(*arg); end
526
-
527
- # Run `git init` in this context directory
528
- #
529
- # Warning: passing a branch will run `git init -b <branch>` which is only available in git 2.28+.
530
- # In older versions, use `git_init!` followed by `git("checkout -b <branch>")`.
531
- #
532
- # source://spoom//lib/spoom/context/git.rb#52
533
- sig { params(branch: T.nilable(::String)).returns(::Spoom::ExecResult) }
534
- def git_init!(branch: T.unsafe(nil)); end
535
-
536
- # Get the last commit in the currently checked out branch
537
- #
538
- # source://spoom//lib/spoom/context/git.rb#94
539
- sig { params(short_sha: T::Boolean).returns(T.nilable(::Spoom::Git::Commit)) }
540
- def git_last_commit(short_sha: T.unsafe(nil)); end
541
-
542
- # source://spoom//lib/spoom/context/git.rb#105
543
- sig { params(arg: ::String).returns(::Spoom::ExecResult) }
544
- def git_log(*arg); end
545
-
546
- # source://spoom//lib/spoom/context/git.rb#110
547
- sig { params(arg: ::String).returns(::Spoom::ExecResult) }
548
- def git_show(*arg); end
549
-
550
- # Is there uncommited changes in this context directory?
551
- #
552
- # source://spoom//lib/spoom/context/git.rb#116
553
- sig { params(path: ::String).returns(T::Boolean) }
554
- def git_workdir_clean?(path: T.unsafe(nil)); end
555
- end
556
-
557
- # Sorbet features for a context
558
- #
559
- # source://spoom//lib/spoom/context/sorbet.rb#7
560
- module Spoom::Context::Sorbet
561
- requires_ancestor { Spoom::Context }
562
-
563
- # Does this context has a `sorbet/config` file?
564
- #
565
- # source://spoom//lib/spoom/context/sorbet.rb#102
566
- sig { returns(T::Boolean) }
567
- def has_sorbet_config?; end
568
-
569
- # Read the strictness sigil from the file at `relative_path` (returns `nil` if no sigil)
570
- #
571
- # source://spoom//lib/spoom/context/sorbet.rb#125
572
- sig { params(relative_path: ::String).returns(T.nilable(::String)) }
573
- def read_file_strictness(relative_path); end
574
-
575
- # Read the contents of `sorbet/config` in this context directory
576
- #
577
- # source://spoom//lib/spoom/context/sorbet.rb#113
578
- sig { returns(::String) }
579
- def read_sorbet_config; end
580
-
581
- # source://spoom//lib/spoom/context/sorbet.rb#107
582
- sig { returns(::Spoom::Sorbet::Config) }
583
- def sorbet_config; end
584
-
585
- # Get the commit introducing the `sorbet/config` file
586
- #
587
- # source://spoom//lib/spoom/context/sorbet.rb#131
588
- sig { returns(T.nilable(::Spoom::Git::Commit)) }
589
- def sorbet_intro_commit; end
590
-
591
- # Get the commit removing the `sorbet/config` file
592
- #
593
- # source://spoom//lib/spoom/context/sorbet.rb#143
594
- sig { returns(T.nilable(::Spoom::Git::Commit)) }
595
- def sorbet_removal_commit; end
596
-
597
- # Run `bundle exec srb` in this context directory
598
- #
599
- # source://spoom//lib/spoom/context/sorbet.rb#15
600
- sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) }
601
- def srb(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end
602
-
603
- # List all files typechecked by Sorbet from its `config`
604
- #
605
- # source://spoom//lib/spoom/context/sorbet.rb#65
606
- sig { params(with_config: T.nilable(::Spoom::Sorbet::Config), include_rbis: T::Boolean).returns(T::Array[::String]) }
607
- def srb_files(with_config: T.unsafe(nil), include_rbis: T.unsafe(nil)); end
608
-
609
- # List all files typechecked by Sorbet from its `config` that matches `strictness`
610
- #
611
- # source://spoom//lib/spoom/context/sorbet.rb#87
612
- sig do
613
- params(
614
- strictness: ::String,
615
- with_config: T.nilable(::Spoom::Sorbet::Config),
616
- include_rbis: T::Boolean
617
- ).returns(T::Array[::String])
618
- end
619
- def srb_files_with_strictness(strictness, with_config: T.unsafe(nil), include_rbis: T.unsafe(nil)); end
620
-
621
- # source://spoom//lib/spoom/context/sorbet.rb#45
622
- sig do
623
- params(
624
- arg: ::String,
625
- sorbet_bin: T.nilable(::String),
626
- capture_err: T::Boolean
627
- ).returns(T.nilable(T::Hash[::String, ::Integer]))
628
- end
629
- def srb_metrics(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end
630
-
631
- # source://spoom//lib/spoom/context/sorbet.rb#33
632
- sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) }
633
- def srb_tc(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end
634
-
635
- # source://spoom//lib/spoom/context/sorbet.rb#93
636
- sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(T.nilable(::String)) }
637
- def srb_version(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end
638
-
639
- # Set the `contents` of `sorbet/config` in this context directory
640
- #
641
- # source://spoom//lib/spoom/context/sorbet.rb#119
642
- sig { params(contents: ::String, append: T::Boolean).void }
643
- def write_sorbet_config!(contents, append: T.unsafe(nil)); end
644
- end
645
-
646
- # source://spoom//lib/spoom/coverage/snapshot.rb#5
647
- module Spoom::Coverage
648
- class << self
649
- # source://spoom//lib/spoom/coverage.rb#103
650
- sig { params(context: ::Spoom::Context).returns(::Spoom::FileTree) }
651
- def file_tree(context); end
652
-
653
- # source://spoom//lib/spoom/coverage.rb#83
654
- sig do
655
- params(
656
- context: ::Spoom::Context,
657
- snapshots: T::Array[::Spoom::Coverage::Snapshot],
658
- palette: ::Spoom::Coverage::D3::ColorPalette
659
- ).returns(::Spoom::Coverage::Report)
660
- end
661
- def report(context, snapshots, palette:); end
662
-
663
- # source://spoom//lib/spoom/coverage.rb#16
664
- sig do
665
- params(
666
- context: ::Spoom::Context,
667
- rbi: T::Boolean,
668
- sorbet_bin: T.nilable(::String)
669
- ).returns(::Spoom::Coverage::Snapshot)
670
- end
671
- def snapshot(context, rbi: T.unsafe(nil), sorbet_bin: T.unsafe(nil)); end
672
- end
673
- end
674
-
675
- # source://spoom//lib/spoom/coverage/report.rb#88
676
- module Spoom::Coverage::Cards; end
677
-
678
- # source://spoom//lib/spoom/coverage/report.rb#89
679
- class Spoom::Coverage::Cards::Card < ::Spoom::Coverage::Template
680
- # source://spoom//lib/spoom/coverage/report.rb#98
681
- sig { params(template: ::String, title: T.nilable(::String), body: T.nilable(::String)).void }
682
- def initialize(template: T.unsafe(nil), title: T.unsafe(nil), body: T.unsafe(nil)); end
683
-
684
- # @return [String, nil]
685
- #
686
- # source://spoom//lib/spoom/coverage/report.rb#95
687
- def body; end
688
-
689
- # source://spoom//lib/spoom/coverage/report.rb#95
690
- sig { returns(T.nilable(::String)) }
691
- def title; end
692
- end
693
-
694
- # source://spoom//lib/spoom/coverage/report.rb#92
695
- Spoom::Coverage::Cards::Card::TEMPLATE = T.let(T.unsafe(nil), String)
696
-
697
- # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
698
- #
699
- # source://spoom//lib/spoom/coverage/report.rb#105
700
- class Spoom::Coverage::Cards::Erb < ::Spoom::Coverage::Cards::Card
701
- abstract!
702
-
703
- # source://spoom//lib/spoom/coverage/report.rb#112
704
- sig { void }
705
- def initialize; end
706
-
707
- # @abstract
708
- #
709
- # source://spoom//lib/spoom/coverage/report.rb#120
710
- sig { abstract.returns(::String) }
711
- def erb; end
712
-
713
- # source://spoom//lib/spoom/coverage/report.rb#115
714
- sig { override.returns(::String) }
715
- def html; end
716
- end
717
-
718
- # source://spoom//lib/spoom/coverage/report.rb#153
719
- class Spoom::Coverage::Cards::Map < ::Spoom::Coverage::Cards::Card
720
- # source://spoom//lib/spoom/coverage/report.rb#164
721
- sig do
722
- params(
723
- file_tree: ::Spoom::FileTree,
724
- nodes_strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)],
725
- nodes_strictness_scores: T::Hash[::Spoom::FileTree::Node, ::Float],
726
- title: ::String
727
- ).void
728
- end
729
- def initialize(file_tree:, nodes_strictnesses:, nodes_strictness_scores:, title: T.unsafe(nil)); end
730
- end
731
-
732
- # source://spoom//lib/spoom/coverage/report.rb#123
733
- class Spoom::Coverage::Cards::Snapshot < ::Spoom::Coverage::Cards::Card
734
- # source://spoom//lib/spoom/coverage/report.rb#132
735
- sig { params(snapshot: ::Spoom::Coverage::Snapshot, title: ::String).void }
736
- def initialize(snapshot:, title: T.unsafe(nil)); end
737
-
738
- # source://spoom//lib/spoom/coverage/report.rb#143
739
- sig { returns(::Spoom::Coverage::D3::Pie::Calls) }
740
- def pie_calls; end
741
-
742
- # source://spoom//lib/spoom/coverage/report.rb#138
743
- sig { returns(::Spoom::Coverage::D3::Pie::Sigils) }
744
- def pie_sigils; end
745
-
746
- # source://spoom//lib/spoom/coverage/report.rb#148
747
- sig { returns(::Spoom::Coverage::D3::Pie::Sigs) }
748
- def pie_sigs; end
749
-
750
- # source://spoom//lib/spoom/coverage/report.rb#129
751
- sig { returns(::Spoom::Coverage::Snapshot) }
752
- def snapshot; end
753
- end
754
-
755
- # source://spoom//lib/spoom/coverage/report.rb#126
756
- Spoom::Coverage::Cards::Snapshot::TEMPLATE = T.let(T.unsafe(nil), String)
757
-
758
- # source://spoom//lib/spoom/coverage/report.rb#240
759
- class Spoom::Coverage::Cards::SorbetIntro < ::Spoom::Coverage::Cards::Erb
760
- # source://spoom//lib/spoom/coverage/report.rb#244
761
- sig { params(sorbet_intro_commit: T.nilable(::String), sorbet_intro_date: T.nilable(::Time)).void }
762
- def initialize(sorbet_intro_commit: T.unsafe(nil), sorbet_intro_date: T.unsafe(nil)); end
763
-
764
- # source://spoom//lib/spoom/coverage/report.rb#250
765
- sig { override.returns(::String) }
766
- def erb; end
767
- end
768
-
769
- # source://spoom//lib/spoom/coverage/report.rb#177
770
- class Spoom::Coverage::Cards::Timeline < ::Spoom::Coverage::Cards::Card
771
- # source://spoom//lib/spoom/coverage/report.rb#181
772
- sig { params(title: ::String, timeline: ::Spoom::Coverage::D3::Timeline).void }
773
- def initialize(title:, timeline:); end
774
- end
775
-
776
- # source://spoom//lib/spoom/coverage/report.rb#194
777
- class Spoom::Coverage::Cards::Timeline::Calls < ::Spoom::Coverage::Cards::Timeline
778
- # source://spoom//lib/spoom/coverage/report.rb#198
779
- sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void }
780
- def initialize(snapshots:, title: T.unsafe(nil)); end
781
- end
782
-
783
- # source://spoom//lib/spoom/coverage/report.rb#212
784
- class Spoom::Coverage::Cards::Timeline::RBIs < ::Spoom::Coverage::Cards::Timeline
785
- # source://spoom//lib/spoom/coverage/report.rb#216
786
- sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void }
787
- def initialize(snapshots:, title: T.unsafe(nil)); end
788
- end
789
-
790
- # source://spoom//lib/spoom/coverage/report.rb#230
791
- class Spoom::Coverage::Cards::Timeline::Runtimes < ::Spoom::Coverage::Cards::Timeline
792
- # source://spoom//lib/spoom/coverage/report.rb#234
793
- sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void }
794
- def initialize(snapshots:, title: T.unsafe(nil)); end
795
- end
796
-
797
- # source://spoom//lib/spoom/coverage/report.rb#185
798
- class Spoom::Coverage::Cards::Timeline::Sigils < ::Spoom::Coverage::Cards::Timeline
799
- # source://spoom//lib/spoom/coverage/report.rb#189
800
- sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void }
801
- def initialize(snapshots:, title: T.unsafe(nil)); end
802
- end
803
-
804
- # source://spoom//lib/spoom/coverage/report.rb#203
805
- class Spoom::Coverage::Cards::Timeline::Sigs < ::Spoom::Coverage::Cards::Timeline
806
- # source://spoom//lib/spoom/coverage/report.rb#207
807
- sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void }
808
- def initialize(snapshots:, title: T.unsafe(nil)); end
809
- end
810
-
811
- # source://spoom//lib/spoom/coverage/report.rb#221
812
- class Spoom::Coverage::Cards::Timeline::Versions < ::Spoom::Coverage::Cards::Timeline
813
- # source://spoom//lib/spoom/coverage/report.rb#225
814
- sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void }
815
- def initialize(snapshots:, title: T.unsafe(nil)); end
816
- end
817
-
818
- # source://spoom//lib/spoom/coverage/d3/base.rb#6
819
- module Spoom::Coverage::D3
820
- class << self
821
- # source://spoom//lib/spoom/coverage/d3.rb#61
822
- sig { params(palette: ::Spoom::Coverage::D3::ColorPalette).returns(::String) }
823
- def header_script(palette); end
824
-
825
- # source://spoom//lib/spoom/coverage/d3.rb#21
826
- sig { returns(::String) }
827
- def header_style; end
828
- end
829
- end
830
-
831
- # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
832
- #
833
- # source://spoom//lib/spoom/coverage/d3/base.rb#7
834
- class Spoom::Coverage::D3::Base
835
- abstract!
836
-
837
- # source://spoom//lib/spoom/coverage/d3/base.rb#17
838
- sig { params(id: ::String, data: T.untyped).void }
839
- def initialize(id, data); end
840
-
841
- # source://spoom//lib/spoom/coverage/d3/base.rb#37
842
- sig { returns(::String) }
843
- def html; end
844
-
845
- # source://spoom//lib/spoom/coverage/d3/base.rb#14
846
- sig { returns(::String) }
847
- def id; end
848
-
849
- # @abstract
850
- #
851
- # source://spoom//lib/spoom/coverage/d3/base.rb#50
852
- sig { abstract.returns(::String) }
853
- def script; end
854
-
855
- # source://spoom//lib/spoom/coverage/d3/base.rb#45
856
- sig { returns(::String) }
857
- def tooltip; end
858
-
859
- class << self
860
- # source://spoom//lib/spoom/coverage/d3/base.rb#31
861
- sig { returns(::String) }
862
- def header_script; end
863
-
864
- # source://spoom//lib/spoom/coverage/d3/base.rb#26
865
- sig { returns(::String) }
866
- def header_style; end
867
- end
868
- end
869
-
870
- # source://spoom//lib/spoom/coverage/d3.rb#12
871
- Spoom::Coverage::D3::COLOR_FALSE = T.let(T.unsafe(nil), String)
872
-
873
- # source://spoom//lib/spoom/coverage/d3.rb#11
874
- Spoom::Coverage::D3::COLOR_IGNORE = T.let(T.unsafe(nil), String)
875
-
876
- # source://spoom//lib/spoom/coverage/d3.rb#14
877
- Spoom::Coverage::D3::COLOR_STRICT = T.let(T.unsafe(nil), String)
878
-
879
- # source://spoom//lib/spoom/coverage/d3.rb#15
880
- Spoom::Coverage::D3::COLOR_STRONG = T.let(T.unsafe(nil), String)
881
-
882
- # source://spoom//lib/spoom/coverage/d3.rb#13
883
- Spoom::Coverage::D3::COLOR_TRUE = T.let(T.unsafe(nil), String)
884
-
885
- # source://spoom//lib/spoom/coverage/d3/circle_map.rb#9
886
- class Spoom::Coverage::D3::CircleMap < ::Spoom::Coverage::D3::Base
887
- # source://spoom//lib/spoom/coverage/d3/circle_map.rb#59
888
- sig { override.returns(::String) }
889
- def script; end
890
-
891
- class << self
892
- # source://spoom//lib/spoom/coverage/d3/circle_map.rb#40
893
- sig { returns(::String) }
894
- def header_script; end
895
-
896
- # source://spoom//lib/spoom/coverage/d3/circle_map.rb#14
897
- sig { returns(::String) }
898
- def header_style; end
899
- end
900
- end
901
-
902
- # source://spoom//lib/spoom/coverage/d3/circle_map.rb#148
903
- class Spoom::Coverage::D3::CircleMap::Sigils < ::Spoom::Coverage::D3::CircleMap
904
- # source://spoom//lib/spoom/coverage/d3/circle_map.rb#159
905
- sig do
906
- params(
907
- id: ::String,
908
- file_tree: ::Spoom::FileTree,
909
- nodes_strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)],
910
- nodes_scores: T::Hash[::Spoom::FileTree::Node, ::Float]
911
- ).void
912
- end
913
- def initialize(id, file_tree, nodes_strictnesses, nodes_scores); end
914
-
915
- # source://spoom//lib/spoom/coverage/d3/circle_map.rb#166
916
- sig { params(node: ::Spoom::FileTree::Node).returns(T::Hash[::Symbol, T.untyped]) }
917
- def tree_node_to_json(node); end
918
- end
919
-
920
- # source://spoom//lib/spoom/coverage/d3.rb#103
921
- class Spoom::Coverage::D3::ColorPalette < ::T::Struct
922
- prop :ignore, ::String
923
- prop :false, ::String
924
- prop :true, ::String
925
- prop :strict, ::String
926
- prop :strong, ::String
927
-
928
- class << self
929
- # source://sorbet-runtime/0.5.10792/lib/types/struct.rb#13
930
- def inherited(s); end
931
- end
932
- end
933
-
934
- # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
935
- #
936
- # source://spoom//lib/spoom/coverage/d3/pie.rb#9
937
- class Spoom::Coverage::D3::Pie < ::Spoom::Coverage::D3::Base
938
- abstract!
939
-
940
- # source://spoom//lib/spoom/coverage/d3/pie.rb#16
941
- sig { params(id: ::String, title: ::String, data: T.untyped).void }
942
- def initialize(id, title, data); end
943
-
944
- # source://spoom//lib/spoom/coverage/d3/pie.rb#56
945
- sig { override.returns(::String) }
946
- def script; end
947
-
948
- class << self
949
- # source://spoom//lib/spoom/coverage/d3/pie.rb#43
950
- sig { returns(::String) }
951
- def header_script; end
952
-
953
- # source://spoom//lib/spoom/coverage/d3/pie.rb#25
954
- sig { returns(::String) }
955
- def header_style; end
956
- end
957
- end
958
-
959
- # source://spoom//lib/spoom/coverage/d3/pie.rb#141
960
- class Spoom::Coverage::D3::Pie::Calls < ::Spoom::Coverage::D3::Pie
961
- # source://spoom//lib/spoom/coverage/d3/pie.rb#145
962
- sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void }
963
- def initialize(id, title, snapshot); end
964
-
965
- # source://spoom//lib/spoom/coverage/d3/pie.rb#150
966
- sig { override.returns(::String) }
967
- def tooltip; end
968
- end
969
-
970
- # source://spoom//lib/spoom/coverage/d3/pie.rb#123
971
- class Spoom::Coverage::D3::Pie::Sigils < ::Spoom::Coverage::D3::Pie
972
- # source://spoom//lib/spoom/coverage/d3/pie.rb#127
973
- sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void }
974
- def initialize(id, title, snapshot); end
975
-
976
- # source://spoom//lib/spoom/coverage/d3/pie.rb#132
977
- sig { override.returns(::String) }
978
- def tooltip; end
979
- end
980
-
981
- # source://spoom//lib/spoom/coverage/d3/pie.rb#159
982
- class Spoom::Coverage::D3::Pie::Sigs < ::Spoom::Coverage::D3::Pie
983
- # source://spoom//lib/spoom/coverage/d3/pie.rb#163
984
- sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void }
985
- def initialize(id, title, snapshot); end
986
-
987
- # source://spoom//lib/spoom/coverage/d3/pie.rb#172
988
- sig { override.returns(::String) }
989
- def tooltip; end
990
- end
991
-
992
- # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
993
- #
994
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#9
995
- class Spoom::Coverage::D3::Timeline < ::Spoom::Coverage::D3::Base
996
- abstract!
997
-
998
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#16
999
- sig { params(id: ::String, data: T.untyped, keys: T::Array[::String]).void }
1000
- def initialize(id, data, keys); end
1001
-
1002
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#187
1003
- sig { params(y: ::String, color: ::String, curve: ::String).returns(::String) }
1004
- def area(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end
1005
-
1006
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#203
1007
- sig { params(y: ::String, color: ::String, curve: ::String).returns(::String) }
1008
- def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end
1009
-
1010
- # @abstract
1011
- #
1012
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#126
1013
- sig { abstract.returns(::String) }
1014
- def plot; end
1015
-
1016
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#217
1017
- sig { params(y: ::String).returns(::String) }
1018
- def points(y:); end
1019
-
1020
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#101
1021
- sig { override.returns(::String) }
1022
- def script; end
1023
-
1024
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#129
1025
- sig { returns(::String) }
1026
- def x_scale; end
1027
-
1028
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#145
1029
- sig { returns(::String) }
1030
- def x_ticks; end
1031
-
1032
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#158
1033
- sig { params(min: ::String, max: ::String, ticks: ::String).returns(::String) }
1034
- def y_scale(min:, max:, ticks:); end
1035
-
1036
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#174
1037
- sig { params(ticks: ::String, format: ::String, padding: ::Integer).returns(::String) }
1038
- def y_ticks(ticks:, format:, padding:); end
1039
-
1040
- class << self
1041
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#79
1042
- sig { returns(::String) }
1043
- def header_script; end
1044
-
1045
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#25
1046
- sig { returns(::String) }
1047
- def header_style; end
1048
- end
1049
- end
1050
-
1051
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#448
1052
- class Spoom::Coverage::D3::Timeline::Calls < ::Spoom::Coverage::D3::Timeline::Stacked
1053
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#452
1054
- sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void }
1055
- def initialize(id, snapshots); end
1056
-
1057
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#466
1058
- sig { override.returns(::String) }
1059
- def tooltip; end
1060
- end
1061
-
1062
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#505
1063
- class Spoom::Coverage::D3::Timeline::RBIs < ::Spoom::Coverage::D3::Timeline::Stacked
1064
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#509
1065
- sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void }
1066
- def initialize(id, snapshots); end
1067
-
1068
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#577
1069
- sig { override.params(y: ::String, color: ::String, curve: ::String).returns(::String) }
1070
- def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end
1071
-
1072
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#617
1073
- sig { override.returns(::String) }
1074
- def plot; end
1075
-
1076
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#537
1077
- sig { override.returns(::String) }
1078
- def script; end
1079
-
1080
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#523
1081
- sig { override.returns(::String) }
1082
- def tooltip; end
1083
- end
1084
-
1085
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#282
1086
- class Spoom::Coverage::D3::Timeline::Runtimes < ::Spoom::Coverage::D3::Timeline
1087
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#286
1088
- sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void }
1089
- def initialize(id, snapshots); end
1090
-
1091
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#311
1092
- sig { override.returns(::String) }
1093
- def plot; end
1094
-
1095
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#298
1096
- sig { override.returns(::String) }
1097
- def tooltip; end
1098
- end
1099
-
1100
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#421
1101
- class Spoom::Coverage::D3::Timeline::Sigils < ::Spoom::Coverage::D3::Timeline::Stacked
1102
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#425
1103
- sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void }
1104
- def initialize(id, snapshots); end
1105
-
1106
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#439
1107
- sig { override.returns(::String) }
1108
- def tooltip; end
1109
- end
1110
-
1111
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#475
1112
- class Spoom::Coverage::D3::Timeline::Sigs < ::Spoom::Coverage::D3::Timeline::Stacked
1113
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#479
1114
- sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void }
1115
- def initialize(id, snapshots); end
1116
-
1117
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#496
1118
- sig { override.returns(::String) }
1119
- def tooltip; end
1120
- end
1121
-
1122
- # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
1123
- #
1124
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#329
1125
- class Spoom::Coverage::D3::Timeline::Stacked < ::Spoom::Coverage::D3::Timeline
1126
- abstract!
1127
-
1128
- # source://sorbet-runtime/0.5.10792/lib/types/private/abstract/declare.rb#37
1129
- def initialize(*args, **_arg1, &blk); end
1130
-
1131
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#388
1132
- sig { override.params(y: ::String, color: ::String, curve: ::String).returns(::String) }
1133
- def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end
1134
-
1135
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#377
1136
- sig { override.returns(::String) }
1137
- def plot; end
1138
-
1139
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#336
1140
- sig { override.returns(::String) }
1141
- def script; end
1142
- end
1143
-
1144
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#232
1145
- class Spoom::Coverage::D3::Timeline::Versions < ::Spoom::Coverage::D3::Timeline
1146
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#236
1147
- sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void }
1148
- def initialize(id, snapshots); end
1149
-
1150
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#263
1151
- sig { override.returns(::String) }
1152
- def plot; end
1153
-
1154
- # source://spoom//lib/spoom/coverage/d3/timeline.rb#249
1155
- sig { override.returns(::String) }
1156
- def tooltip; end
1157
- end
1158
-
1159
- # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
1160
- #
1161
- # source://spoom//lib/spoom/coverage/report.rb#38
1162
- class Spoom::Coverage::Page < ::Spoom::Coverage::Template
1163
- abstract!
1164
-
1165
- # source://spoom//lib/spoom/coverage/report.rb#53
1166
- sig { params(title: ::String, palette: ::Spoom::Coverage::D3::ColorPalette, template: ::String).void }
1167
- def initialize(title:, palette:, template: T.unsafe(nil)); end
1168
-
1169
- # source://spoom//lib/spoom/coverage/report.rb#75
1170
- sig { returns(::String) }
1171
- def body_html; end
1172
-
1173
- # @abstract
1174
- #
1175
- # source://spoom//lib/spoom/coverage/report.rb#80
1176
- sig { abstract.returns(T::Array[::Spoom::Coverage::Cards::Card]) }
1177
- def cards; end
1178
-
1179
- # source://spoom//lib/spoom/coverage/report.rb#83
1180
- sig { returns(::String) }
1181
- def footer_html; end
1182
-
1183
- # source://spoom//lib/spoom/coverage/report.rb#70
1184
- sig { returns(::String) }
1185
- def header_html; end
1186
-
1187
- # source://spoom//lib/spoom/coverage/report.rb#65
1188
- sig { returns(::String) }
1189
- def header_script; end
1190
-
1191
- # source://spoom//lib/spoom/coverage/report.rb#60
1192
- sig { returns(::String) }
1193
- def header_style; end
1194
-
1195
- # source://spoom//lib/spoom/coverage/report.rb#50
1196
- sig { returns(::Spoom::Coverage::D3::ColorPalette) }
1197
- def palette; end
1198
-
1199
- # source://spoom//lib/spoom/coverage/report.rb#47
1200
- sig { returns(::String) }
1201
- def title; end
1202
- end
1203
-
1204
- # source://spoom//lib/spoom/coverage/report.rb#44
1205
- Spoom::Coverage::Page::TEMPLATE = T.let(T.unsafe(nil), String)
1206
-
1207
- # source://spoom//lib/spoom/coverage/report.rb#261
1208
- class Spoom::Coverage::Report < ::Spoom::Coverage::Page
1209
- # source://spoom//lib/spoom/coverage/report.rb#276
1210
- sig do
1211
- params(
1212
- project_name: ::String,
1213
- palette: ::Spoom::Coverage::D3::ColorPalette,
1214
- snapshots: T::Array[::Spoom::Coverage::Snapshot],
1215
- file_tree: ::Spoom::FileTree,
1216
- nodes_strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)],
1217
- nodes_strictness_scores: T::Hash[::Spoom::FileTree::Node, ::Float],
1218
- sorbet_intro_commit: T.nilable(::String),
1219
- sorbet_intro_date: T.nilable(::Time)
1220
- ).void
1221
- end
1222
- def initialize(project_name:, palette:, snapshots:, file_tree:, nodes_strictnesses:, nodes_strictness_scores:, sorbet_intro_commit: T.unsafe(nil), sorbet_intro_date: T.unsafe(nil)); end
1223
-
1224
- # source://spoom//lib/spoom/coverage/report.rb#308
1225
- sig { override.returns(T::Array[::Spoom::Coverage::Cards::Card]) }
1226
- def cards; end
1227
-
1228
- # source://spoom//lib/spoom/coverage/report.rb#297
1229
- sig { override.returns(::String) }
1230
- def header_html; end
1231
- end
1232
-
1233
- # source://spoom//lib/spoom/coverage/snapshot.rb#6
1234
- class Spoom::Coverage::Snapshot < ::T::Struct
1235
- prop :timestamp, ::Integer, default: T.unsafe(nil)
1236
- prop :version_static, T.nilable(::String), default: T.unsafe(nil)
1237
- prop :version_runtime, T.nilable(::String), default: T.unsafe(nil)
1238
- prop :duration, ::Integer, default: T.unsafe(nil)
1239
- prop :commit_sha, T.nilable(::String), default: T.unsafe(nil)
1240
- prop :commit_timestamp, T.nilable(::Integer), default: T.unsafe(nil)
1241
- prop :files, ::Integer, default: T.unsafe(nil)
1242
- prop :rbi_files, ::Integer, default: T.unsafe(nil)
1243
- prop :modules, ::Integer, default: T.unsafe(nil)
1244
- prop :classes, ::Integer, default: T.unsafe(nil)
1245
- prop :singleton_classes, ::Integer, default: T.unsafe(nil)
1246
- prop :methods_without_sig, ::Integer, default: T.unsafe(nil)
1247
- prop :methods_with_sig, ::Integer, default: T.unsafe(nil)
1248
- prop :calls_untyped, ::Integer, default: T.unsafe(nil)
1249
- prop :calls_typed, ::Integer, default: T.unsafe(nil)
1250
- prop :sigils, T::Hash[::String, ::Integer], default: T.unsafe(nil)
1251
- prop :methods_with_sig_excluding_rbis, ::Integer, default: T.unsafe(nil)
1252
- prop :methods_without_sig_excluding_rbis, ::Integer, default: T.unsafe(nil)
1253
- prop :sigils_excluding_rbis, T::Hash[::String, ::Integer], default: T.unsafe(nil)
1254
-
1255
- # source://spoom//lib/spoom/coverage/snapshot.rb#33
1256
- sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean, indent_level: ::Integer).void }
1257
- def print(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end
1258
-
1259
- # source://spoom//lib/spoom/coverage/snapshot.rb#39
1260
- sig { params(arg: T.untyped).returns(::String) }
1261
- def to_json(*arg); end
1262
-
1263
- class << self
1264
- # source://spoom//lib/spoom/coverage/snapshot.rb#47
1265
- sig { params(json: ::String).returns(::Spoom::Coverage::Snapshot) }
1266
- def from_json(json); end
1267
-
1268
- # source://spoom//lib/spoom/coverage/snapshot.rb#52
1269
- sig { params(obj: T::Hash[::String, T.untyped]).returns(::Spoom::Coverage::Snapshot) }
1270
- def from_obj(obj); end
1271
-
1272
- # source://sorbet-runtime/0.5.10792/lib/types/struct.rb#13
1273
- def inherited(s); end
1274
- end
1275
- end
1276
-
1277
- # The strictness name as found in the Sorbet metrics file
1278
- #
1279
- # source://spoom//lib/spoom/coverage/snapshot.rb#30
1280
- Spoom::Coverage::Snapshot::STRICTNESSES = T.let(T.unsafe(nil), Array)
1281
-
1282
- # source://spoom//lib/spoom/coverage/snapshot.rb#95
1283
- class Spoom::Coverage::SnapshotPrinter < ::Spoom::Printer
1284
- # source://spoom//lib/spoom/coverage/snapshot.rb#99
1285
- sig { params(snapshot: ::Spoom::Coverage::Snapshot).void }
1286
- def print_snapshot(snapshot); end
1287
-
1288
- private
1289
-
1290
- # source://spoom//lib/spoom/coverage/snapshot.rb#158
1291
- sig { params(value: T.nilable(::Integer), total: T.nilable(::Integer)).returns(::String) }
1292
- def percent(value, total); end
1293
-
1294
- # source://spoom//lib/spoom/coverage/snapshot.rb#147
1295
- sig { params(hash: T::Hash[::String, ::Integer], total: ::Integer).void }
1296
- def print_map(hash, total); end
1297
- end
1298
-
1299
- # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
1300
- #
1301
- # source://spoom//lib/spoom/coverage/report.rb#10
1302
- class Spoom::Coverage::Template
1303
- abstract!
1304
-
1305
- # Create a new template from an Erb file path
1306
- #
1307
- # source://spoom//lib/spoom/coverage/report.rb#18
1308
- sig { params(template: ::String).void }
1309
- def initialize(template:); end
1310
-
1311
- # source://spoom//lib/spoom/coverage/report.rb#23
1312
- sig { returns(::String) }
1313
- def erb; end
1314
-
1315
- # source://spoom//lib/spoom/coverage/report.rb#33
1316
- sig { returns(::Binding) }
1317
- def get_binding; end
1318
-
1319
- # source://spoom//lib/spoom/coverage/report.rb#28
1320
- sig { returns(::String) }
1321
- def html; end
1322
- end
1323
-
1324
- # source://spoom//lib/spoom.rb#12
1325
- class Spoom::Error < ::StandardError; end
1326
-
1327
- # source://spoom//lib/spoom/context/exec.rb#5
1328
- class Spoom::ExecResult < ::T::Struct
1329
- const :out, ::String
1330
- const :err, T.nilable(::String)
1331
- const :status, T::Boolean
1332
- const :exit_code, ::Integer
1333
-
1334
- # source://spoom//lib/spoom/context/exec.rb#14
1335
- sig { returns(::String) }
1336
- def to_s; end
1337
-
1338
- class << self
1339
- # source://sorbet-runtime/0.5.10792/lib/types/struct.rb#13
1340
- def inherited(s); end
1341
- end
1342
- end
1343
-
1344
- # source://spoom//lib/spoom/file_collector.rb#5
1345
- class Spoom::FileCollector
1346
- # Initialize a new file collector
1347
- #
1348
- # If `allow_extensions` is empty, all files are collected.
1349
- # If `allow_extensions` is an array of extensions, only files with one of these extensions are collected.
1350
- #
1351
- # source://spoom//lib/spoom/file_collector.rb#21
1352
- sig { params(allow_extensions: T::Array[::String], exclude_patterns: T::Array[::String]).void }
1353
- def initialize(allow_extensions: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end
1354
-
1355
- # source://spoom//lib/spoom/file_collector.rb#9
1356
- sig { returns(T::Array[::String]) }
1357
- def files; end
1358
-
1359
- # source://spoom//lib/spoom/file_collector.rb#33
1360
- sig { params(path: ::String).void }
1361
- def visit_path(path); end
1362
-
1363
- # source://spoom//lib/spoom/file_collector.rb#28
1364
- sig { params(paths: T::Array[::String]).void }
1365
- def visit_paths(paths); end
1366
-
1367
- private
1368
-
1369
- # source://spoom//lib/spoom/file_collector.rb#50
1370
- sig { params(path: ::String).returns(::String) }
1371
- def clean_path(path); end
1372
-
1373
- # source://spoom//lib/spoom/file_collector.rb#67
1374
- sig { params(path: ::String).returns(T::Boolean) }
1375
- def excluded_file?(path); end
1376
-
1377
- # source://spoom//lib/spoom/file_collector.rb#75
1378
- sig { params(path: ::String).returns(T::Boolean) }
1379
- def excluded_path?(path); end
1380
-
1381
- # source://spoom//lib/spoom/file_collector.rb#62
1382
- sig { params(path: ::String).void }
1383
- def visit_directory(path); end
1384
-
1385
- # source://spoom//lib/spoom/file_collector.rb#55
1386
- sig { params(path: ::String).void }
1387
- def visit_file(path); end
1388
- end
1389
-
1390
- # Build a file hierarchy from a set of file paths.
1391
- #
1392
- # source://spoom//lib/spoom/file_tree.rb#6
1393
- class Spoom::FileTree
1394
- # source://spoom//lib/spoom/file_tree.rb#10
1395
- sig { params(paths: T::Enumerable[::String]).void }
1396
- def initialize(paths = T.unsafe(nil)); end
1397
-
1398
- # Add a `path` to the tree
1399
- #
1400
- # This will create all nodes until the root of `path`.
1401
- #
1402
- # source://spoom//lib/spoom/file_tree.rb#25
1403
- sig { params(path: ::String).returns(::Spoom::FileTree::Node) }
1404
- def add_path(path); end
1405
-
1406
- # Add all `paths` to the tree
1407
- #
1408
- # source://spoom//lib/spoom/file_tree.rb#17
1409
- sig { params(paths: T::Enumerable[::String]).void }
1410
- def add_paths(paths); end
1411
-
1412
- # All the nodes in this tree
1413
- #
1414
- # source://spoom//lib/spoom/file_tree.rb#45
1415
- sig { returns(T::Array[::Spoom::FileTree::Node]) }
1416
- def nodes; end
1417
-
1418
- # Return a map of typing scores for each node in the tree
1419
- #
1420
- # source://spoom//lib/spoom/file_tree.rb#67
1421
- sig { params(context: ::Spoom::Context).returns(T::Hash[::Spoom::FileTree::Node, ::Float]) }
1422
- def nodes_strictness_scores(context); end
1423
-
1424
- # Return a map of strictnesses for each node in the tree
1425
- #
1426
- # source://spoom//lib/spoom/file_tree.rb#59
1427
- sig { params(context: ::Spoom::Context).returns(T::Hash[::Spoom::FileTree::Node, T.nilable(::String)]) }
1428
- def nodes_strictnesses(context); end
1429
-
1430
- # All the paths in this tree
1431
- #
1432
- # source://spoom//lib/spoom/file_tree.rb#53
1433
- sig { returns(T::Array[::String]) }
1434
- def paths; end
1435
-
1436
- # Return a map of typing scores for each path in the tree
1437
- #
1438
- # source://spoom//lib/spoom/file_tree.rb#75
1439
- sig { params(context: ::Spoom::Context).returns(T::Hash[::String, ::Float]) }
1440
- def paths_strictness_scores(context); end
1441
-
1442
- # source://spoom//lib/spoom/file_tree.rb#80
1443
- sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean).void }
1444
- def print(out: T.unsafe(nil), colors: T.unsafe(nil)); end
1445
-
1446
- # source://spoom//lib/spoom/file_tree.rb#86
1447
- sig { params(context: ::Spoom::Context, out: T.any(::IO, ::StringIO), colors: T::Boolean).void }
1448
- def print_with_strictnesses(context, out: T.unsafe(nil), colors: T.unsafe(nil)); end
1449
-
1450
- # All root nodes
1451
- #
1452
- # source://spoom//lib/spoom/file_tree.rb#39
1453
- sig { returns(T::Array[::Spoom::FileTree::Node]) }
1454
- def roots; end
1455
- end
1456
-
1457
- # A visitor that collects all the nodes in a tree
1458
- #
1459
- # source://spoom//lib/spoom/file_tree.rb#140
1460
- class Spoom::FileTree::CollectNodes < ::Spoom::FileTree::Visitor
1461
- # source://spoom//lib/spoom/file_tree.rb#147
1462
- sig { void }
1463
- def initialize; end
1464
-
1465
- # source://spoom//lib/spoom/file_tree.rb#144
1466
- sig { returns(T::Array[::Spoom::FileTree::Node]) }
1467
- def nodes; end
1468
-
1469
- # source://spoom//lib/spoom/file_tree.rb#153
1470
- sig { override.params(node: ::Spoom::FileTree::Node).void }
1471
- def visit_node(node); end
1472
- end
1473
-
1474
- # A visitor that collects the typing score of each node in a tree
1475
- #
1476
- # source://spoom//lib/spoom/file_tree.rb#183
1477
- class Spoom::FileTree::CollectScores < ::Spoom::FileTree::CollectStrictnesses
1478
- # source://spoom//lib/spoom/file_tree.rb#190
1479
- sig { params(context: ::Spoom::Context).void }
1480
- def initialize(context); end
1481
-
1482
- # source://spoom//lib/spoom/file_tree.rb#187
1483
- sig { returns(T::Hash[::Spoom::FileTree::Node, ::Float]) }
1484
- def scores; end
1485
-
1486
- # source://spoom//lib/spoom/file_tree.rb#197
1487
- sig { override.params(node: ::Spoom::FileTree::Node).void }
1488
- def visit_node(node); end
1489
-
1490
- private
1491
-
1492
- # source://spoom//lib/spoom/file_tree.rb#206
1493
- sig { params(node: ::Spoom::FileTree::Node).returns(::Float) }
1494
- def node_score(node); end
1495
-
1496
- # source://spoom//lib/spoom/file_tree.rb#215
1497
- sig { params(strictness: T.nilable(::String)).returns(::Float) }
1498
- def strictness_score(strictness); end
1499
- end
1500
-
1501
- # A visitor that collects the strictness of each node in a tree
1502
- #
1503
- # source://spoom//lib/spoom/file_tree.rb#160
1504
- class Spoom::FileTree::CollectStrictnesses < ::Spoom::FileTree::Visitor
1505
- # source://spoom//lib/spoom/file_tree.rb#167
1506
- sig { params(context: ::Spoom::Context).void }
1507
- def initialize(context); end
1508
-
1509
- # source://spoom//lib/spoom/file_tree.rb#164
1510
- sig { returns(T::Hash[::Spoom::FileTree::Node, T.nilable(::String)]) }
1511
- def strictnesses; end
1512
-
1513
- # source://spoom//lib/spoom/file_tree.rb#174
1514
- sig { override.params(node: ::Spoom::FileTree::Node).void }
1515
- def visit_node(node); end
1516
- end
1517
-
1518
- # A node representing either a file or a directory inside a FileTree
1519
- #
1520
- # source://spoom//lib/spoom/file_tree.rb#94
1521
- class Spoom::FileTree::Node < ::T::Struct
1522
- const :parent, T.nilable(::Spoom::FileTree::Node)
1523
- const :name, ::String
1524
- const :children, T::Hash[::String, ::Spoom::FileTree::Node], default: T.unsafe(nil)
1525
-
1526
- # Full path to this node from root
1527
- #
1528
- # source://spoom//lib/spoom/file_tree.rb#108
1529
- sig { returns(::String) }
1530
- def path; end
1531
-
1532
- class << self
1533
- # source://sorbet-runtime/0.5.10792/lib/types/struct.rb#13
1534
- def inherited(s); end
1535
- end
1536
- end
1537
-
1538
- # An internal class used to print a FileTree
1539
- #
1540
- # See `FileTree#print`
1541
- #
1542
- # source://spoom//lib/spoom/file_tree.rb#228
1543
- class Spoom::FileTree::Printer < ::Spoom::FileTree::Visitor
1544
- # source://spoom//lib/spoom/file_tree.rb#238
1545
- sig do
1546
- params(
1547
- strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)],
1548
- out: T.any(::IO, ::StringIO),
1549
- colors: T::Boolean
1550
- ).void
1551
- end
1552
- def initialize(strictnesses, out: T.unsafe(nil), colors: T.unsafe(nil)); end
1553
-
1554
- # source://spoom//lib/spoom/file_tree.rb#246
1555
- sig { override.params(node: ::Spoom::FileTree::Node).void }
1556
- def visit_node(node); end
1557
-
1558
- private
1559
-
1560
- # source://spoom//lib/spoom/file_tree.rb#271
1561
- sig { params(strictness: T.nilable(::String)).returns(::Spoom::Color) }
1562
- def strictness_color(strictness); end
1563
- end
1564
-
1565
- # An abstract visitor for FileTree
1566
- #
1567
- # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
1568
- #
1569
- # source://spoom//lib/spoom/file_tree.rb#117
1570
- class Spoom::FileTree::Visitor
1571
- abstract!
1572
-
1573
- # source://sorbet-runtime/0.5.10792/lib/types/private/abstract/declare.rb#37
1574
- def initialize(*args, **_arg1, &blk); end
1575
-
1576
- # source://spoom//lib/spoom/file_tree.rb#129
1577
- sig { params(node: ::Spoom::FileTree::Node).void }
1578
- def visit_node(node); end
1579
-
1580
- # source://spoom//lib/spoom/file_tree.rb#134
1581
- sig { params(nodes: T::Array[::Spoom::FileTree::Node]).void }
1582
- def visit_nodes(nodes); end
1583
-
1584
- # source://spoom//lib/spoom/file_tree.rb#124
1585
- sig { params(tree: ::Spoom::FileTree).void }
1586
- def visit_tree(tree); end
1587
- end
1588
-
1589
- # source://spoom//lib/spoom/context/git.rb#5
1590
- module Spoom::Git; end
1591
-
1592
- # source://spoom//lib/spoom/context/git.rb#6
1593
- class Spoom::Git::Commit < ::T::Struct
1594
- const :sha, ::String
1595
- const :time, ::Time
1596
-
1597
- # source://spoom//lib/spoom/context/git.rb#27
1598
- sig { returns(::Integer) }
1599
- def timestamp; end
1600
-
1601
- class << self
1602
- # source://sorbet-runtime/0.5.10792/lib/types/struct.rb#13
1603
- def inherited(s); end
1604
-
1605
- # Parse a line formated as `%h %at` into a `Commit`
1606
- #
1607
- # source://spoom//lib/spoom/context/git.rb#14
1608
- sig { params(string: ::String).returns(T.nilable(::Spoom::Git::Commit)) }
1609
- def parse_line(string); end
1610
- end
1611
- end
1612
-
1613
- # source://spoom//lib/spoom/sorbet/lsp/base.rb#5
1614
- module Spoom::LSP; end
1615
-
1616
- # source://spoom//lib/spoom/sorbet/lsp.rb#13
1617
- class Spoom::LSP::Client
1618
- # source://spoom//lib/spoom/sorbet/lsp.rb#17
1619
- sig { params(sorbet_bin: ::String, sorbet_args: ::String, path: ::String).void }
1620
- def initialize(sorbet_bin, *sorbet_args, path: T.unsafe(nil)); end
1621
-
1622
- # source://spoom//lib/spoom/sorbet/lsp.rb#229
1623
- sig { void }
1624
- def close; end
1625
-
1626
- # source://spoom//lib/spoom/sorbet/lsp.rb#131
1627
- sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::Location]) }
1628
- def definitions(uri, line, column); end
1629
-
1630
- # source://spoom//lib/spoom/sorbet/lsp.rb#212
1631
- sig { params(uri: ::String).returns(T::Array[::Spoom::LSP::DocumentSymbol]) }
1632
- def document_symbols(uri); end
1633
-
1634
- # source://spoom//lib/spoom/sorbet/lsp.rb#89
1635
- sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T.nilable(::Spoom::LSP::Hover)) }
1636
- def hover(uri, line, column); end
1637
-
1638
- # source://spoom//lib/spoom/sorbet/lsp.rb#27
1639
- sig { returns(::Integer) }
1640
- def next_id; end
1641
-
1642
- # LSP requests
1643
- #
1644
- # @raise [Error::AlreadyOpen]
1645
- #
1646
- # source://spoom//lib/spoom/sorbet/lsp.rb#72
1647
- sig { params(workspace_path: ::String).void }
1648
- def open(workspace_path); end
1649
-
1650
- # source://spoom//lib/spoom/sorbet/lsp.rb#54
1651
- sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
1652
- def read; end
1653
-
1654
- # @raise [Error::BadHeaders]
1655
- #
1656
- # source://spoom//lib/spoom/sorbet/lsp.rb#43
1657
- sig { returns(T.nilable(::String)) }
1658
- def read_raw; end
1659
-
1660
- # source://spoom//lib/spoom/sorbet/lsp.rb#173
1661
- sig do
1662
- params(
1663
- uri: ::String,
1664
- line: ::Integer,
1665
- column: ::Integer,
1666
- include_decl: T::Boolean
1667
- ).returns(T::Array[::Spoom::LSP::Location])
1668
- end
1669
- def references(uri, line, column, include_decl = T.unsafe(nil)); end
1670
-
1671
- # source://spoom//lib/spoom/sorbet/lsp.rb#37
1672
- sig { params(message: ::Spoom::LSP::Message).returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
1673
- def send(message); end
1674
-
1675
- # source://spoom//lib/spoom/sorbet/lsp.rb#32
1676
- sig { params(json_string: ::String).void }
1677
- def send_raw(json_string); end
1678
-
1679
- # source://spoom//lib/spoom/sorbet/lsp.rb#110
1680
- sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::SignatureHelp]) }
1681
- def signatures(uri, line, column); end
1682
-
1683
- # source://spoom//lib/spoom/sorbet/lsp.rb#197
1684
- sig { params(query: ::String).returns(T::Array[::Spoom::LSP::DocumentSymbol]) }
1685
- def symbols(query); end
1686
-
1687
- # source://spoom//lib/spoom/sorbet/lsp.rb#152
1688
- sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::Location]) }
1689
- def type_definitions(uri, line, column); end
1690
- end
1691
-
1692
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#178
1693
- class Spoom::LSP::Diagnostic < ::T::Struct
1694
- include ::Spoom::LSP::PrintableSymbol
1695
-
1696
- const :range, ::Spoom::LSP::Range
1697
- const :code, ::Integer
1698
- const :message, ::String
1699
- const :informations, ::Object
1700
-
1701
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#202
1702
- sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
1703
- def accept_printer(printer); end
1704
-
1705
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#207
1706
- sig { returns(::String) }
1707
- def to_s; end
1708
-
1709
- class << self
1710
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#191
1711
- sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Diagnostic) }
1712
- def from_json(json); end
1713
-
1714
- # source://sorbet-runtime/0.5.10792/lib/types/struct.rb#13
1715
- def inherited(s); end
1716
- end
1717
- end
1718
-
1719
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#212
1720
- class Spoom::LSP::DocumentSymbol < ::T::Struct
1721
- include ::Spoom::LSP::PrintableSymbol
1722
-
1723
- const :name, ::String
1724
- const :detail, T.nilable(::String)
1725
- const :kind, ::Integer
1726
- const :location, T.nilable(::Spoom::LSP::Location)
1727
- const :range, T.nilable(::Spoom::LSP::Range)
1728
- const :children, T::Array[::Spoom::LSP::DocumentSymbol]
1729
-
1730
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#240
1731
- sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
1732
- def accept_printer(printer); end
1733
-
1734
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#272
1735
- sig { returns(::String) }
1736
- def kind_string; end
1737
-
1738
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#267
1739
- sig { returns(::String) }
1740
- def to_s; end
1741
-
1742
- class << self
1743
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#227
1744
- sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::DocumentSymbol) }
1745
- def from_json(json); end
1746
-
1747
- # source://sorbet-runtime/0.5.10792/lib/types/struct.rb#13
1748
- def inherited(s); end
1749
- end
1750
- end
1751
-
1752
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#276
1753
- Spoom::LSP::DocumentSymbol::SYMBOL_KINDS = T.let(T.unsafe(nil), Hash)
1754
-
1755
- # source://spoom//lib/spoom/sorbet/lsp/errors.rb#6
1756
- class Spoom::LSP::Error < ::StandardError; end
1757
-
1758
- # source://spoom//lib/spoom/sorbet/lsp/errors.rb#7
1759
- class Spoom::LSP::Error::AlreadyOpen < ::Spoom::LSP::Error; end
1760
-
1761
- # source://spoom//lib/spoom/sorbet/lsp/errors.rb#8
1762
- class Spoom::LSP::Error::BadHeaders < ::Spoom::LSP::Error; end
1763
-
1764
- # source://spoom//lib/spoom/sorbet/lsp/errors.rb#10
1765
- class Spoom::LSP::Error::Diagnostics < ::Spoom::LSP::Error
1766
- # source://spoom//lib/spoom/sorbet/lsp/errors.rb#32
1767
- sig { params(uri: ::String, diagnostics: T::Array[::Spoom::LSP::Diagnostic]).void }
1768
- def initialize(uri, diagnostics); end
1769
-
1770
- # source://spoom//lib/spoom/sorbet/lsp/errors.rb#17
1771
- sig { returns(T::Array[::Spoom::LSP::Diagnostic]) }
1772
- def diagnostics; end
1773
-
1774
- # source://spoom//lib/spoom/sorbet/lsp/errors.rb#14
1775
- sig { returns(::String) }
1776
- def uri; end
1777
-
1778
- class << self
1779
- # source://spoom//lib/spoom/sorbet/lsp/errors.rb#23
1780
- sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Error::Diagnostics) }
1781
- def from_json(json); end
1782
- end
1783
- end
1784
-
1785
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#19
1786
- class Spoom::LSP::Hover < ::T::Struct
1787
- include ::Spoom::LSP::PrintableSymbol
1788
-
1789
- const :contents, ::String
1790
- const :range, T.nilable(T::Range[T.untyped])
1791
-
1792
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#39
1793
- sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
1794
- def accept_printer(printer); end
1795
-
1796
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#45
1797
- sig { returns(::String) }
1798
- def to_s; end
1799
-
1800
- class << self
1801
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#30
1802
- sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Hover) }
1803
- def from_json(json); end
1804
-
1805
- # source://sorbet-runtime/0.5.10792/lib/types/struct.rb#13
1806
- def inherited(s); end
1807
- end
1808
- end
1809
-
1810
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#112
1811
- class Spoom::LSP::Location < ::T::Struct
1812
- include ::Spoom::LSP::PrintableSymbol
1813
-
1814
- const :uri, ::String
1815
- const :range, ::Spoom::LSP::Range
1816
-
1817
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#132
1818
- sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
1819
- def accept_printer(printer); end
1820
-
1821
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#138
1822
- sig { returns(::String) }
1823
- def to_s; end
1824
-
1825
- class << self
1826
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#123
1827
- sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Location) }
1828
- def from_json(json); end
1829
-
1830
- # source://sorbet-runtime/0.5.10792/lib/types/struct.rb#13
1831
- def inherited(s); end
1832
- end
1833
- end
1834
-
1835
- # A general message as defined by JSON-RPC.
1836
- #
1837
- # The language server protocol always uses `"2.0"` as the `jsonrpc` version.
1838
- #
1839
- # source://spoom//lib/spoom/sorbet/lsp/base.rb#12
1840
- class Spoom::LSP::Message
1841
- # source://spoom//lib/spoom/sorbet/lsp/base.rb#19
1842
- sig { void }
1843
- def initialize; end
1844
-
1845
- # source://spoom//lib/spoom/sorbet/lsp/base.rb#24
1846
- sig { returns(T::Hash[T.untyped, T.untyped]) }
1847
- def as_json; end
1848
-
1849
- # source://spoom//lib/spoom/sorbet/lsp/base.rb#16
1850
- sig { returns(::String) }
1851
- def jsonrpc; end
1852
-
1853
- # source://spoom//lib/spoom/sorbet/lsp/base.rb#32
1854
- sig { params(args: T.untyped).returns(::String) }
1855
- def to_json(*args); end
1856
- end
1857
-
1858
- # A notification message.
1859
- #
1860
- # A processed notification message must not send a response back. They work like events.
1861
- #
1862
- # source://spoom//lib/spoom/sorbet/lsp/base.rb#64
1863
- class Spoom::LSP::Notification < ::Spoom::LSP::Message
1864
- # source://spoom//lib/spoom/sorbet/lsp/base.rb#74
1865
- sig { params(method: ::String, params: T::Hash[T.untyped, T.untyped]).void }
1866
- def initialize(method, params); end
1867
-
1868
- # source://spoom//lib/spoom/sorbet/lsp/base.rb#68
1869
- sig { returns(::String) }
1870
- def method; end
1871
-
1872
- # source://spoom//lib/spoom/sorbet/lsp/base.rb#71
1873
- sig { returns(T::Hash[T.untyped, T.untyped]) }
1874
- def params; end
1875
- end
1876
-
1877
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#50
1878
- class Spoom::LSP::Position < ::T::Struct
1879
- include ::Spoom::LSP::PrintableSymbol
1880
-
1881
- const :line, ::Integer
1882
- const :char, ::Integer
1883
-
1884
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#70
1885
- sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
1886
- def accept_printer(printer); end
1887
-
1888
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#75
1889
- sig { returns(::String) }
1890
- def to_s; end
1891
-
1892
- class << self
1893
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#61
1894
- sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Position) }
1895
- def from_json(json); end
1896
-
1897
- # source://sorbet-runtime/0.5.10792/lib/types/struct.rb#13
1898
- def inherited(s); end
1899
- end
1900
- end
1901
-
1902
- # @abstract Subclasses must implement the `abstract` methods below.
1903
- #
1904
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#9
1905
- module Spoom::LSP::PrintableSymbol
1906
- interface!
1907
-
1908
- # @abstract
1909
- #
1910
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#16
1911
- sig { abstract.params(printer: ::Spoom::LSP::SymbolPrinter).void }
1912
- def accept_printer(printer); end
1913
- end
1914
-
1915
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#80
1916
- class Spoom::LSP::Range < ::T::Struct
1917
- include ::Spoom::LSP::PrintableSymbol
1918
-
1919
- const :start, ::Spoom::LSP::Position
1920
- const :end, ::Spoom::LSP::Position
1921
-
1922
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#100
1923
- sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
1924
- def accept_printer(printer); end
1925
-
1926
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#107
1927
- sig { returns(::String) }
1928
- def to_s; end
1929
-
1930
- class << self
1931
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#91
1932
- sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Range) }
1933
- def from_json(json); end
1934
-
1935
- # source://sorbet-runtime/0.5.10792/lib/types/struct.rb#13
1936
- def inherited(s); end
1937
- end
1938
- end
1939
-
1940
- # A request message to describe a request between the client and the server.
1941
- #
1942
- # Every processed request must send a response back to the sender of the request.
1943
- #
1944
- # source://spoom//lib/spoom/sorbet/lsp/base.rb#40
1945
- class Spoom::LSP::Request < ::Spoom::LSP::Message
1946
- # source://spoom//lib/spoom/sorbet/lsp/base.rb#53
1947
- sig { params(id: ::Integer, method: ::String, params: T::Hash[T.untyped, T.untyped]).void }
1948
- def initialize(id, method, params); end
1949
-
1950
- # source://spoom//lib/spoom/sorbet/lsp/base.rb#44
1951
- sig { returns(::Integer) }
1952
- def id; end
1953
-
1954
- # source://spoom//lib/spoom/sorbet/lsp/base.rb#47
1955
- sig { returns(::String) }
1956
- def method; end
1957
-
1958
- # source://spoom//lib/spoom/sorbet/lsp/base.rb#50
1959
- sig { returns(T::Hash[T.untyped, T.untyped]) }
1960
- def params; end
1961
- end
1962
-
1963
- # source://spoom//lib/spoom/sorbet/lsp/errors.rb#40
1964
- class Spoom::LSP::ResponseError < ::Spoom::LSP::Error
1965
- # source://spoom//lib/spoom/sorbet/lsp/errors.rb#63
1966
- sig { params(code: ::Integer, message: ::String, data: T::Hash[T.untyped, T.untyped]).void }
1967
- def initialize(code, message, data); end
1968
-
1969
- # source://spoom//lib/spoom/sorbet/lsp/errors.rb#44
1970
- sig { returns(::Integer) }
1971
- def code; end
1972
-
1973
- # source://spoom//lib/spoom/sorbet/lsp/errors.rb#47
1974
- sig { returns(T::Hash[T.untyped, T.untyped]) }
1975
- def data; end
1976
-
1977
- class << self
1978
- # source://spoom//lib/spoom/sorbet/lsp/errors.rb#53
1979
- sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::ResponseError) }
1980
- def from_json(json); end
1981
- end
1982
- end
1983
-
1984
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#143
1985
- class Spoom::LSP::SignatureHelp < ::T::Struct
1986
- include ::Spoom::LSP::PrintableSymbol
1987
-
1988
- const :label, T.nilable(::String)
1989
- const :doc, ::Object
1990
- const :params, T::Array[T.untyped]
1991
-
1992
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#165
1993
- sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
1994
- def accept_printer(printer); end
1995
-
1996
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#173
1997
- sig { returns(::String) }
1998
- def to_s; end
1999
-
2000
- class << self
2001
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#155
2002
- sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::SignatureHelp) }
2003
- def from_json(json); end
2004
-
2005
- # source://sorbet-runtime/0.5.10792/lib/types/struct.rb#13
2006
- def inherited(s); end
2007
- end
2008
- end
2009
-
2010
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#309
2011
- class Spoom::LSP::SymbolPrinter < ::Spoom::Printer
2012
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#326
2013
- sig do
2014
- params(
2015
- out: T.any(::IO, ::StringIO),
2016
- colors: T::Boolean,
2017
- indent_level: ::Integer,
2018
- prefix: T.nilable(::String)
2019
- ).void
2020
- end
2021
- def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil), prefix: T.unsafe(nil)); end
2022
-
2023
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#348
2024
- sig { params(uri: ::String).returns(::String) }
2025
- def clean_uri(uri); end
2026
-
2027
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#316
2028
- sig { returns(T.nilable(::String)) }
2029
- def prefix; end
2030
-
2031
- # @return [String, nil]
2032
- #
2033
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#316
2034
- def prefix=(_arg0); end
2035
-
2036
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#356
2037
- sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void }
2038
- def print_list(objects); end
2039
-
2040
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#336
2041
- sig { params(object: T.nilable(::Spoom::LSP::PrintableSymbol)).void }
2042
- def print_object(object); end
2043
-
2044
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#343
2045
- sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void }
2046
- def print_objects(objects); end
2047
-
2048
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#313
2049
- sig { returns(T::Set[::Integer]) }
2050
- def seen; end
2051
-
2052
- # @return [Set<Integer>]
2053
- #
2054
- # source://spoom//lib/spoom/sorbet/lsp/structures.rb#313
2055
- def seen=(_arg0); end
2056
- end
2057
-
2058
- # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
2059
- #
2060
- # source://spoom//lib/spoom/printer.rb#7
2061
- class Spoom::Printer
2062
- include ::Spoom::Colorize
2063
-
2064
- abstract!
2065
-
2066
- # source://spoom//lib/spoom/printer.rb#19
2067
- sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean, indent_level: ::Integer).void }
2068
- def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end
2069
-
2070
- # Colorize `string` with color if `@colors`
2071
- #
2072
- # source://spoom//lib/spoom/printer.rb#80
2073
- sig { params(string: ::String, color: ::Spoom::Color).returns(::String) }
2074
- def colorize(string, *color); end
2075
-
2076
- # Decrease indent level
2077
- #
2078
- # source://spoom//lib/spoom/printer.rb#33
2079
- sig { void }
2080
- def dedent; end
2081
-
2082
- # Increase indent level
2083
- #
2084
- # source://spoom//lib/spoom/printer.rb#27
2085
- sig { void }
2086
- def indent; end
2087
-
2088
- # source://spoom//lib/spoom/printer.rb#16
2089
- sig { returns(T.any(::IO, ::StringIO)) }
2090
- def out; end
2091
-
2092
- # @return [IO, StringIO]
2093
- #
2094
- # source://spoom//lib/spoom/printer.rb#16
2095
- def out=(_arg0); end
2096
-
2097
- # Print `string` into `out`
2098
- #
2099
- # source://spoom//lib/spoom/printer.rb#39
2100
- sig { params(string: T.nilable(::String)).void }
2101
- def print(string); end
2102
-
2103
- # Print `string` colored with `color` into `out`
2104
- #
2105
- # Does not use colors unless `@colors`.
2106
- #
2107
- # source://spoom//lib/spoom/printer.rb#49
2108
- sig { params(string: T.nilable(::String), color: ::Spoom::Color).void }
2109
- def print_colored(string, *color); end
2110
-
2111
- # Print `string` with indent and newline
2112
- #
2113
- # source://spoom//lib/spoom/printer.rb#64
2114
- sig { params(string: T.nilable(::String)).void }
2115
- def printl(string); end
2116
-
2117
- # Print a new line into `out`
2118
- #
2119
- # source://spoom//lib/spoom/printer.rb#58
2120
- sig { void }
2121
- def printn; end
2122
-
2123
- # Print an indent space into `out`
2124
- #
2125
- # source://spoom//lib/spoom/printer.rb#74
2126
- sig { void }
2127
- def printt; end
2128
- end
2129
-
2130
- # source://spoom//lib/spoom.rb#10
2131
- Spoom::SPOOM_PATH = T.let(T.unsafe(nil), String)
2132
-
2133
- # source://spoom//lib/spoom/sorbet/config.rb#5
2134
- module Spoom::Sorbet; end
2135
-
2136
- # source://spoom//lib/spoom/sorbet.rb#38
2137
- Spoom::Sorbet::BIN_PATH = T.let(T.unsafe(nil), String)
2138
-
2139
- # source://spoom//lib/spoom/sorbet.rb#36
2140
- Spoom::Sorbet::CONFIG_PATH = T.let(T.unsafe(nil), String)
2141
-
2142
- # Parse Sorbet config files
2143
- #
2144
- # Parses a Sorbet config file:
2145
- #
2146
- # ```ruby
2147
- # config = Spoom::Sorbet::Config.parse_file("sorbet/config")
2148
- # puts config.paths # "."
2149
- # ```
2150
- #
2151
- # Parses a Sorbet config string:
2152
- #
2153
- # ```ruby
2154
- # config = Spoom::Sorbet::Config.parse_string(<<~CONFIG)
2155
- # a
2156
- # --file=b
2157
- # --ignore=c
2158
- # CONFIG
2159
- # puts config.paths # "a", "b"
2160
- # puts config.ignore # "c"
2161
- # ```
2162
- #
2163
- # source://spoom//lib/spoom/sorbet/config.rb#26
2164
- class Spoom::Sorbet::Config
2165
- # source://spoom//lib/spoom/sorbet/config.rb#38
2166
- sig { void }
2167
- def initialize; end
2168
-
2169
- # @return [Array<String>]
2170
- #
2171
- # source://spoom//lib/spoom/sorbet/config.rb#32
2172
- def allowed_extensions; end
2173
-
2174
- # @return [Array<String>]
2175
- #
2176
- # source://spoom//lib/spoom/sorbet/config.rb#32
2177
- def allowed_extensions=(_arg0); end
2178
-
2179
- # source://spoom//lib/spoom/sorbet/config.rb#46
2180
- sig { returns(::Spoom::Sorbet::Config) }
2181
- def copy; end
2182
-
2183
- # @return [Array<String>]
2184
- #
2185
- # source://spoom//lib/spoom/sorbet/config.rb#32
2186
- def ignore; end
2187
-
2188
- # @return [Array<String>]
2189
- #
2190
- # source://spoom//lib/spoom/sorbet/config.rb#32
2191
- def ignore=(_arg0); end
2192
-
2193
- # source://spoom//lib/spoom/sorbet/config.rb#35
2194
- sig { returns(T::Boolean) }
2195
- def no_stdlib; end
2196
-
2197
- # @return [Boolean]
2198
- #
2199
- # source://spoom//lib/spoom/sorbet/config.rb#35
2200
- def no_stdlib=(_arg0); end
2201
-
2202
- # Returns self as a string of options that can be passed to Sorbet
2203
- #
2204
- # Example:
2205
- # ~~~rb
2206
- # config = Sorbet::Config.new
2207
- # config.paths << "/foo"
2208
- # config.paths << "/bar"
2209
- # config.ignore << "/baz"
2210
- # config.allowed_extensions << ".rb"
2211
- #
2212
- # puts config.options_string # "/foo /bar --ignore /baz --allowed-extension .rb"
2213
- # ~~~
2214
- #
2215
- # source://spoom//lib/spoom/sorbet/config.rb#68
2216
- sig { returns(::String) }
2217
- def options_string; end
2218
-
2219
- # source://spoom//lib/spoom/sorbet/config.rb#32
2220
- sig { returns(T::Array[::String]) }
2221
- def paths; end
2222
-
2223
- # @return [Array<String>]
2224
- #
2225
- # source://spoom//lib/spoom/sorbet/config.rb#32
2226
- def paths=(_arg0); end
2227
-
2228
- class << self
2229
- # source://spoom//lib/spoom/sorbet/config.rb#81
2230
- sig { params(sorbet_config_path: ::String).returns(::Spoom::Sorbet::Config) }
2231
- def parse_file(sorbet_config_path); end
2232
-
2233
- # source://spoom//lib/spoom/sorbet/config.rb#86
2234
- sig { params(sorbet_config: ::String).returns(::Spoom::Sorbet::Config) }
2235
- def parse_string(sorbet_config); end
2236
-
2237
- private
2238
-
2239
- # source://spoom//lib/spoom/sorbet/config.rb#150
2240
- sig { params(line: ::String).returns(::String) }
2241
- def parse_option(line); end
2242
- end
2243
- end
2244
-
2245
- # source://spoom//lib/spoom/sorbet/config.rb#29
2246
- Spoom::Sorbet::Config::DEFAULT_ALLOWED_EXTENSIONS = T.let(T.unsafe(nil), Array)
2247
-
2248
- # source://spoom//lib/spoom/sorbet.rb#14
2249
- class Spoom::Sorbet::Error < ::StandardError
2250
- # source://spoom//lib/spoom/sorbet.rb#29
2251
- sig { params(message: ::String, result: ::Spoom::ExecResult).void }
2252
- def initialize(message, result); end
2253
-
2254
- # source://spoom//lib/spoom/sorbet.rb#21
2255
- sig { returns(::Spoom::ExecResult) }
2256
- def result; end
2257
- end
2258
-
2259
- # source://spoom//lib/spoom/sorbet.rb#17
2260
- class Spoom::Sorbet::Error::Killed < ::Spoom::Sorbet::Error; end
2261
-
2262
- # source://spoom//lib/spoom/sorbet.rb#18
2263
- class Spoom::Sorbet::Error::Segfault < ::Spoom::Sorbet::Error; end
2264
-
2265
- # source://spoom//lib/spoom/sorbet/errors.rb#6
2266
- module Spoom::Sorbet::Errors
2267
- class << self
2268
- # source://spoom//lib/spoom/sorbet/errors.rb#13
2269
- sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error]).returns(T::Array[::Spoom::Sorbet::Errors::Error]) }
2270
- def sort_errors_by_code(errors); end
2271
- end
2272
- end
2273
-
2274
- # source://spoom//lib/spoom/sorbet/errors.rb#7
2275
- Spoom::Sorbet::Errors::DEFAULT_ERROR_URL_BASE = T.let(T.unsafe(nil), String)
2276
-
2277
- # source://spoom//lib/spoom/sorbet/errors.rb#125
2278
- class Spoom::Sorbet::Errors::Error
2279
- include ::Comparable
2280
-
2281
- # source://spoom//lib/spoom/sorbet/errors.rb#151
2282
- sig do
2283
- params(
2284
- file: T.nilable(::String),
2285
- line: T.nilable(::Integer),
2286
- message: T.nilable(::String),
2287
- code: T.nilable(::Integer),
2288
- more: T::Array[::String]
2289
- ).void
2290
- end
2291
- def initialize(file, line, message, code, more = T.unsafe(nil)); end
2292
-
2293
- # By default errors are sorted by location
2294
- #
2295
- # source://spoom//lib/spoom/sorbet/errors.rb#162
2296
- sig { params(other: T.untyped).returns(::Integer) }
2297
- def <=>(other); end
2298
-
2299
- # @return [Integer, nil]
2300
- #
2301
- # source://spoom//lib/spoom/sorbet/errors.rb#133
2302
- def code; end
2303
-
2304
- # source://spoom//lib/spoom/sorbet/errors.rb#130
2305
- sig { returns(T.nilable(::String)) }
2306
- def file; end
2307
-
2308
- # Other files associated with the error
2309
- #
2310
- # source://spoom//lib/spoom/sorbet/errors.rb#140
2311
- sig { returns(T::Set[::String]) }
2312
- def files_from_error_sections; end
2313
-
2314
- # source://spoom//lib/spoom/sorbet/errors.rb#133
2315
- sig { returns(T.nilable(::Integer)) }
2316
- def line; end
2317
-
2318
- # @return [String, nil]
2319
- #
2320
- # source://spoom//lib/spoom/sorbet/errors.rb#130
2321
- def message; end
2322
-
2323
- # source://spoom//lib/spoom/sorbet/errors.rb#136
2324
- sig { returns(T::Array[::String]) }
2325
- def more; end
2326
-
2327
- # source://spoom//lib/spoom/sorbet/errors.rb#169
2328
- sig { returns(::String) }
2329
- def to_s; end
2330
- end
2331
-
2332
- # Parse errors from Sorbet output
2333
- #
2334
- # source://spoom//lib/spoom/sorbet/errors.rb#18
2335
- class Spoom::Sorbet::Errors::Parser
2336
- # source://spoom//lib/spoom/sorbet/errors.rb#43
2337
- sig { params(error_url_base: ::String).void }
2338
- def initialize(error_url_base: T.unsafe(nil)); end
2339
-
2340
- # source://spoom//lib/spoom/sorbet/errors.rb#50
2341
- sig { params(output: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) }
2342
- def parse(output); end
2343
-
2344
- private
2345
-
2346
- # source://spoom//lib/spoom/sorbet/errors.rb#114
2347
- sig { params(line: ::String).void }
2348
- def append_error(line); end
2349
-
2350
- # source://spoom//lib/spoom/sorbet/errors.rb#106
2351
- sig { void }
2352
- def close_error; end
2353
-
2354
- # source://spoom//lib/spoom/sorbet/errors.rb#73
2355
- sig { params(error_url_base: ::String).returns(::Regexp) }
2356
- def error_line_match_regexp(error_url_base); end
2357
-
2358
- # source://spoom//lib/spoom/sorbet/errors.rb#90
2359
- sig { params(line: ::String).returns(T.nilable(::Spoom::Sorbet::Errors::Error)) }
2360
- def match_error_line(line); end
2361
-
2362
- # source://spoom//lib/spoom/sorbet/errors.rb#99
2363
- sig { params(error: ::Spoom::Sorbet::Errors::Error).void }
2364
- def open_error(error); end
2365
-
2366
- class << self
2367
- # source://spoom//lib/spoom/sorbet/errors.rb#36
2368
- sig { params(output: ::String, error_url_base: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) }
2369
- def parse_string(output, error_url_base: T.unsafe(nil)); end
2370
- end
2371
- end
2372
-
2373
- # source://spoom//lib/spoom/sorbet/errors.rb#21
2374
- Spoom::Sorbet::Errors::Parser::HEADER = T.let(T.unsafe(nil), Array)
2375
-
2376
- # source://spoom//lib/spoom/sorbet.rb#37
2377
- Spoom::Sorbet::GEM_PATH = T.let(T.unsafe(nil), String)
2378
-
2379
- # source://spoom//lib/spoom/sorbet.rb#40
2380
- Spoom::Sorbet::KILLED_CODE = T.let(T.unsafe(nil), Integer)
2381
-
2382
- # source://spoom//lib/spoom/sorbet/metrics.rb#8
2383
- module Spoom::Sorbet::MetricsParser
2384
- class << self
2385
- # source://spoom//lib/spoom/sorbet/metrics.rb#15
2386
- sig { params(path: ::String, prefix: ::String).returns(T::Hash[::String, ::Integer]) }
2387
- def parse_file(path, prefix = T.unsafe(nil)); end
2388
-
2389
- # source://spoom//lib/spoom/sorbet/metrics.rb#25
2390
- sig { params(obj: T::Hash[::String, T.untyped], prefix: ::String).returns(T::Hash[::String, ::Integer]) }
2391
- def parse_hash(obj, prefix = T.unsafe(nil)); end
2392
-
2393
- # source://spoom//lib/spoom/sorbet/metrics.rb#20
2394
- sig { params(string: ::String, prefix: ::String).returns(T::Hash[::String, ::Integer]) }
2395
- def parse_string(string, prefix = T.unsafe(nil)); end
2396
- end
2397
- end
2398
-
2399
- # source://spoom//lib/spoom/sorbet/metrics.rb#9
2400
- Spoom::Sorbet::MetricsParser::DEFAULT_PREFIX = T.let(T.unsafe(nil), String)
2401
-
2402
- # source://spoom//lib/spoom/sorbet.rb#41
2403
- Spoom::Sorbet::SEGFAULT_CODE = T.let(T.unsafe(nil), Integer)
2404
-
2405
- # source://spoom//lib/spoom/sorbet/sigils.rb#9
2406
- module Spoom::Sorbet::Sigils
2407
- class << self
2408
- # changes the sigil in the file at the passed path to the specified new strictness
2409
- #
2410
- # source://spoom//lib/spoom/sorbet/sigils.rb#72
2411
- sig { params(path: T.any(::Pathname, ::String), new_strictness: ::String).returns(T::Boolean) }
2412
- def change_sigil_in_file(path, new_strictness); end
2413
-
2414
- # changes the sigil to have a new strictness in a list of files
2415
- #
2416
- # source://spoom//lib/spoom/sorbet/sigils.rb#83
2417
- sig { params(path_list: T::Array[::String], new_strictness: ::String).returns(T::Array[::String]) }
2418
- def change_sigil_in_files(path_list, new_strictness); end
2419
-
2420
- # returns a string containing the strictness of a sigil in a file at the passed path
2421
- # * returns nil if no sigil
2422
- #
2423
- # source://spoom//lib/spoom/sorbet/sigils.rb#63
2424
- sig { params(path: T.any(::Pathname, ::String)).returns(T.nilable(::String)) }
2425
- def file_strictness(path); end
2426
-
2427
- # returns the full sigil comment string for the passed strictness
2428
- #
2429
- # source://spoom//lib/spoom/sorbet/sigils.rb#38
2430
- sig { params(strictness: ::String).returns(::String) }
2431
- def sigil_string(strictness); end
2432
-
2433
- # returns the strictness of a sigil in the passed file content string (nil if no sigil)
2434
- #
2435
- # source://spoom//lib/spoom/sorbet/sigils.rb#50
2436
- sig { params(content: ::String).returns(T.nilable(::String)) }
2437
- def strictness_in_content(content); end
2438
-
2439
- # returns a string which is the passed content but with the sigil updated to a new strictness
2440
- #
2441
- # source://spoom//lib/spoom/sorbet/sigils.rb#56
2442
- sig { params(content: ::String, new_strictness: ::String).returns(::String) }
2443
- def update_sigil(content, new_strictness); end
2444
-
2445
- # returns true if the passed string is a valid strictness (else false)
2446
- #
2447
- # source://spoom//lib/spoom/sorbet/sigils.rb#44
2448
- sig { params(strictness: ::String).returns(T::Boolean) }
2449
- def valid_strictness?(strictness); end
2450
- end
2451
- end
2452
-
2453
- # source://spoom//lib/spoom/sorbet/sigils.rb#31
2454
- Spoom::Sorbet::Sigils::SIGIL_REGEXP = T.let(T.unsafe(nil), Regexp)
2455
-
2456
- # source://spoom//lib/spoom/sorbet/sigils.rb#13
2457
- Spoom::Sorbet::Sigils::STRICTNESS_FALSE = T.let(T.unsafe(nil), String)
2458
-
2459
- # source://spoom//lib/spoom/sorbet/sigils.rb#12
2460
- Spoom::Sorbet::Sigils::STRICTNESS_IGNORE = T.let(T.unsafe(nil), String)
2461
-
2462
- # source://spoom//lib/spoom/sorbet/sigils.rb#17
2463
- Spoom::Sorbet::Sigils::STRICTNESS_INTERNAL = T.let(T.unsafe(nil), String)
2464
-
2465
- # source://spoom//lib/spoom/sorbet/sigils.rb#15
2466
- Spoom::Sorbet::Sigils::STRICTNESS_STRICT = T.let(T.unsafe(nil), String)
2467
-
2468
- # source://spoom//lib/spoom/sorbet/sigils.rb#16
2469
- Spoom::Sorbet::Sigils::STRICTNESS_STRONG = T.let(T.unsafe(nil), String)
2470
-
2471
- # source://spoom//lib/spoom/sorbet/sigils.rb#14
2472
- Spoom::Sorbet::Sigils::STRICTNESS_TRUE = T.let(T.unsafe(nil), String)
2473
-
2474
- # source://spoom//lib/spoom/sorbet/sigils.rb#19
2475
- Spoom::Sorbet::Sigils::VALID_STRICTNESS = T.let(T.unsafe(nil), Array)
2476
-
2477
- # source://spoom//lib/spoom/timeline.rb#5
2478
- class Spoom::Timeline
2479
- # source://spoom//lib/spoom/timeline.rb#9
2480
- sig { params(context: ::Spoom::Context, from: ::Time, to: ::Time).void }
2481
- def initialize(context, from, to); end
2482
-
2483
- # Return one commit for each date in `dates`
2484
- #
2485
- # source://spoom//lib/spoom/timeline.rb#36
2486
- sig { params(dates: T::Array[::Time]).returns(T::Array[::Spoom::Git::Commit]) }
2487
- def commits_for_dates(dates); end
2488
-
2489
- # Return all months between `from` and `to`
2490
- #
2491
- # source://spoom//lib/spoom/timeline.rb#23
2492
- sig { returns(T::Array[::Time]) }
2493
- def months; end
2494
-
2495
- # Return one commit for each month between `from` and `to`
2496
- #
2497
- # source://spoom//lib/spoom/timeline.rb#17
2498
- sig { returns(T::Array[::Spoom::Git::Commit]) }
2499
- def ticks; end
2500
- end
2501
-
2502
- # source://spoom//lib/spoom/version.rb#5
2503
- Spoom::VERSION = T.let(T.unsafe(nil), String)