categoria 0.1.0.pre.beta0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +7 -0
  2. data/.rubocop.yml +34 -0
  3. data/.ruby-version +1 -0
  4. data/CHANGELOG.md +5 -0
  5. data/LICENSE.txt +21 -0
  6. data/README.md +33 -0
  7. data/Rakefile +12 -0
  8. data/categoria.gemspec +48 -0
  9. data/lib/categoria/version.rb +6 -0
  10. data/lib/categoria.rb +9 -0
  11. data/lib/generators/categoria/command_generator.rb +8 -0
  12. data/lib/generators/categoria/domain_generator.rb +35 -0
  13. data/lib/generators/categoria/model_generator.rb +8 -0
  14. data/lib/generators/categoria/templates/domain_module.rb.erb +6 -0
  15. data/sig/categoria.rbs +4 -0
  16. data/sorbet/config +4 -0
  17. data/sorbet/rbi/annotations/.gitattributes +1 -0
  18. data/sorbet/rbi/annotations/actionmailer.rbi +10 -0
  19. data/sorbet/rbi/annotations/actionpack.rbi +429 -0
  20. data/sorbet/rbi/annotations/actionview.rbi +75 -0
  21. data/sorbet/rbi/annotations/activejob.rbi +44 -0
  22. data/sorbet/rbi/annotations/activemodel.rbi +89 -0
  23. data/sorbet/rbi/annotations/activerecord.rbi +92 -0
  24. data/sorbet/rbi/annotations/activesupport.rbi +421 -0
  25. data/sorbet/rbi/annotations/globalid.rbi +30 -0
  26. data/sorbet/rbi/annotations/railties.rbi +61 -0
  27. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  28. data/sorbet/rbi/gems/.gitattributes +1 -0
  29. data/sorbet/rbi/gems/actioncable@7.1.3.3.rbi +9 -0
  30. data/sorbet/rbi/gems/actionmailbox@7.1.3.3.rbi +9 -0
  31. data/sorbet/rbi/gems/actionmailer@7.1.3.3.rbi +9 -0
  32. data/sorbet/rbi/gems/actionpack@7.1.3.3.rbi +9 -0
  33. data/sorbet/rbi/gems/actiontext@7.1.3.3.rbi +9 -0
  34. data/sorbet/rbi/gems/actionview@7.1.3.3.rbi +9 -0
  35. data/sorbet/rbi/gems/activejob@7.1.3.3.rbi +9 -0
  36. data/sorbet/rbi/gems/activemodel@7.1.3.3.rbi +9 -0
  37. data/sorbet/rbi/gems/activerecord@7.1.3.3.rbi +9 -0
  38. data/sorbet/rbi/gems/activestorage@7.1.3.3.rbi +9 -0
  39. data/sorbet/rbi/gems/activesupport@7.1.3.3.rbi +11 -0
  40. data/sorbet/rbi/gems/ast@2.4.2.rbi +585 -0
  41. data/sorbet/rbi/gems/base64@0.2.0.rbi +9 -0
  42. data/sorbet/rbi/gems/bigdecimal@3.1.8.rbi +9 -0
  43. data/sorbet/rbi/gems/builder@3.2.4.rbi +9 -0
  44. data/sorbet/rbi/gems/concurrent-ruby@1.3.1.rbi +9 -0
  45. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +9 -0
  46. data/sorbet/rbi/gems/crass@1.0.6.rbi +9 -0
  47. data/sorbet/rbi/gems/date@3.3.4.rbi +73 -0
  48. data/sorbet/rbi/gems/drb@2.2.1.rbi +9 -0
  49. data/sorbet/rbi/gems/erubi@1.12.0.rbi +146 -0
  50. data/sorbet/rbi/gems/globalid@1.2.1.rbi +9 -0
  51. data/sorbet/rbi/gems/i18n@1.14.5.rbi +9 -0
  52. data/sorbet/rbi/gems/io-console@0.7.2.rbi +9 -0
  53. data/sorbet/rbi/gems/json@2.7.2.rbi +1562 -0
  54. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14238 -0
  55. data/sorbet/rbi/gems/loofah@2.22.0.rbi +9 -0
  56. data/sorbet/rbi/gems/mail@2.8.1.rbi +9 -0
  57. data/sorbet/rbi/gems/marcel@1.0.4.rbi +9 -0
  58. data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +9 -0
  59. data/sorbet/rbi/gems/minitest@5.23.1.rbi +1555 -0
  60. data/sorbet/rbi/gems/mutex_m@0.2.0.rbi +9 -0
  61. data/sorbet/rbi/gems/net-imap@0.4.11.rbi +9 -0
  62. data/sorbet/rbi/gems/net-pop@0.1.2.rbi +9 -0
  63. data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +282 -0
  64. data/sorbet/rbi/gems/net-smtp@0.5.0.rbi +9 -0
  65. data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
  66. data/sorbet/rbi/gems/nio4r@2.7.3.rbi +9 -0
  67. data/sorbet/rbi/gems/nokogiri@1.16.5.rbi +9 -0
  68. data/sorbet/rbi/gems/parallel@1.24.0.rbi +281 -0
  69. data/sorbet/rbi/gems/parser@3.3.2.0.rbi +5519 -0
  70. data/sorbet/rbi/gems/prism@0.29.0.rbi +37987 -0
  71. data/sorbet/rbi/gems/psych@5.1.2.rbi +1732 -0
  72. data/sorbet/rbi/gems/racc@1.8.0.rbi +162 -0
  73. data/sorbet/rbi/gems/rack-session@2.0.0.rbi +9 -0
  74. data/sorbet/rbi/gems/rack-test@2.1.0.rbi +9 -0
  75. data/sorbet/rbi/gems/rack@3.0.11.rbi +2910 -0
  76. data/sorbet/rbi/gems/rackup@2.1.0.rbi +390 -0
  77. data/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi +9 -0
  78. data/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi +9 -0
  79. data/sorbet/rbi/gems/rails@7.1.3.3.rbi +9 -0
  80. data/sorbet/rbi/gems/railties@7.1.3.3.rbi +9 -0
  81. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  82. data/sorbet/rbi/gems/rake@13.2.1.rbi +3028 -0
  83. data/sorbet/rbi/gems/rbi@0.1.13.rbi +3078 -0
  84. data/sorbet/rbi/gems/rdoc@6.7.0.rbi +12719 -0
  85. data/sorbet/rbi/gems/regexp_parser@2.9.2.rbi +3772 -0
  86. data/sorbet/rbi/gems/reline@0.5.8.rbi +9 -0
  87. data/sorbet/rbi/gems/rexml@3.2.8.rbi +4794 -0
  88. data/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi +7045 -0
  89. data/sorbet/rbi/gems/rubocop-minitest@0.35.0.rbi +2611 -0
  90. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +329 -0
  91. data/sorbet/rbi/gems/rubocop-sorbet@0.8.3.rbi +1607 -0
  92. data/sorbet/rbi/gems/rubocop@1.64.1.rbi +58104 -0
  93. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  94. data/sorbet/rbi/gems/spoom@1.3.2.rbi +4421 -0
  95. data/sorbet/rbi/gems/stringio@3.1.0.rbi +9 -0
  96. data/sorbet/rbi/gems/strscan@3.1.0.rbi +9 -0
  97. data/sorbet/rbi/gems/tapioca@0.14.3.rbi +3534 -0
  98. data/sorbet/rbi/gems/thor@1.3.1.rbi +4352 -0
  99. data/sorbet/rbi/gems/timeout@0.4.1.rbi +143 -0
  100. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +9 -0
  101. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +66 -0
  102. data/sorbet/rbi/gems/webrick@1.8.1.rbi +2607 -0
  103. data/sorbet/rbi/gems/websocket-driver@0.7.6.rbi +9 -0
  104. data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +9 -0
  105. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +429 -0
  106. data/sorbet/rbi/gems/yard@0.9.36.rbi +18412 -0
  107. data/sorbet/rbi/gems/zeitwerk@2.6.15.rbi +9 -0
  108. data/sorbet/rbi/todo.rbi +46 -0
  109. data/sorbet/tapioca/config.yml +13 -0
  110. data/sorbet/tapioca/require.rb +4 -0
  111. metadata +339 -0
@@ -0,0 +1,4421 @@
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
+
8
+ # source://spoom//lib/spoom.rb#7
9
+ module Spoom; end
10
+
11
+ # source://spoom//lib/spoom/cli/helper.rb#9
12
+ module Spoom::Cli; end
13
+
14
+ # source://spoom//lib/spoom/cli/deadcode.rb#8
15
+ class Spoom::Cli::Deadcode < ::Thor
16
+ include ::Spoom::Colorize
17
+ include ::Spoom::Cli::Helper
18
+
19
+ # source://spoom//lib/spoom/cli/deadcode.rb#52
20
+ sig { params(paths: ::String).void }
21
+ def deadcode(*paths); end
22
+
23
+ def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
24
+
25
+ # source://spoom//lib/spoom/cli/deadcode.rb#150
26
+ def remove(location_string); end
27
+ end
28
+
29
+ # source://spoom//lib/spoom/cli/helper.rb#10
30
+ module Spoom::Cli::Helper
31
+ include ::Spoom::Colorize
32
+
33
+ requires_ancestor { Thor }
34
+
35
+ # source://spoom//lib/spoom/cli/helper.rb#139
36
+ sig { params(string: ::String).returns(::String) }
37
+ def blue(string); end
38
+
39
+ # Is the `--color` option true?
40
+ #
41
+ # source://spoom//lib/spoom/cli/helper.rb#103
42
+ sig { returns(T::Boolean) }
43
+ def color?; end
44
+
45
+ # Colorize a string if `color?`
46
+ #
47
+ # source://spoom//lib/spoom/cli/helper.rb#132
48
+ sig { params(string: ::String, color: ::Spoom::Color).returns(::String) }
49
+ def colorize(string, *color); end
50
+
51
+ # Returns the context at `--path` (by default the current working directory)
52
+ #
53
+ # source://spoom//lib/spoom/cli/helper.rb#71
54
+ sig { returns(::Spoom::Context) }
55
+ def context; end
56
+
57
+ # Raise if `spoom` is not ran inside a context with a `sorbet/config` file
58
+ #
59
+ # source://spoom//lib/spoom/cli/helper.rb#77
60
+ sig { returns(::Spoom::Context) }
61
+ def context_requiring_sorbet!; end
62
+
63
+ # source://spoom//lib/spoom/cli/helper.rb#144
64
+ sig { params(string: ::String).returns(::String) }
65
+ def cyan(string); end
66
+
67
+ # Return the path specified through `--path`
68
+ #
69
+ # source://spoom//lib/spoom/cli/helper.rb#92
70
+ sig { returns(::String) }
71
+ def exec_path; end
72
+
73
+ # source://spoom//lib/spoom/cli/helper.rb#149
74
+ sig { params(string: ::String).returns(::String) }
75
+ def gray(string); end
76
+
77
+ # source://spoom//lib/spoom/cli/helper.rb#154
78
+ sig { params(string: ::String).returns(::String) }
79
+ def green(string); end
80
+
81
+ # source://spoom//lib/spoom/cli/helper.rb#108
82
+ sig { params(string: ::String).returns(::String) }
83
+ def highlight(string); end
84
+
85
+ # source://spoom//lib/spoom/cli/helper.rb#159
86
+ sig { params(string: ::String).returns(::String) }
87
+ def red(string); end
88
+
89
+ # Print `message` on `$stdout`
90
+ #
91
+ # source://spoom//lib/spoom/cli/helper.rb#20
92
+ sig { params(message: ::String).void }
93
+ def say(message); end
94
+
95
+ # Print `message` on `$stderr`
96
+ #
97
+ # The message is prefixed by a status (default: `Error`).
98
+ #
99
+ # source://spoom//lib/spoom/cli/helper.rb#39
100
+ sig { params(message: ::String, status: T.nilable(::String), nl: T::Boolean).void }
101
+ def say_error(message, status: T.unsafe(nil), nl: T.unsafe(nil)); end
102
+
103
+ # Print `message` on `$stderr`
104
+ #
105
+ # The message is prefixed by a status (default: `Warning`).
106
+ #
107
+ # source://spoom//lib/spoom/cli/helper.rb#59
108
+ sig { params(message: ::String, status: T.nilable(::String), nl: T::Boolean).void }
109
+ def say_warning(message, status: T.unsafe(nil), nl: T.unsafe(nil)); end
110
+
111
+ # source://spoom//lib/spoom/cli/helper.rb#164
112
+ sig { params(string: ::String).returns(::String) }
113
+ def yellow(string); end
114
+ end
115
+
116
+ # source://spoom//lib/spoom/cli.rb#12
117
+ class Spoom::Cli::Main < ::Thor
118
+ include ::Spoom::Colorize
119
+ include ::Spoom::Cli::Helper
120
+
121
+ # source://spoom//lib/spoom/cli.rb#101
122
+ def __print_version; end
123
+
124
+ # source://spoom//lib/spoom/cli.rb#58
125
+ sig { params(directory: ::String).void }
126
+ def bump(directory = T.unsafe(nil)); end
127
+
128
+ # source://spoom//lib/spoom/cli.rb#65
129
+ def coverage(*args); end
130
+
131
+ # source://thor/1.3.1/lib/thor.rb#334
132
+ def deadcode(*args); end
133
+
134
+ # source://spoom//lib/spoom/cli.rb#75
135
+ def lsp(*args); end
136
+
137
+ # source://thor/1.3.1/lib/thor.rb#334
138
+ def srb(*args); end
139
+
140
+ # source://spoom//lib/spoom/cli.rb#94
141
+ def tc(*paths_to_select); end
142
+
143
+ class << self
144
+ # @return [Boolean]
145
+ #
146
+ # source://spoom//lib/spoom/cli.rb#108
147
+ def exit_on_failure?; end
148
+ end
149
+ end
150
+
151
+ # source://spoom//lib/spoom/cli.rb#81
152
+ Spoom::Cli::Main::SORT_CODE = T.let(T.unsafe(nil), String)
153
+
154
+ # source://spoom//lib/spoom/cli.rb#83
155
+ Spoom::Cli::Main::SORT_ENUM = T.let(T.unsafe(nil), Array)
156
+
157
+ # source://spoom//lib/spoom/cli.rb#82
158
+ Spoom::Cli::Main::SORT_LOC = T.let(T.unsafe(nil), String)
159
+
160
+ # source://spoom//lib/spoom/cli/srb/bump.rb#9
161
+ module Spoom::Cli::Srb; end
162
+
163
+ # source://spoom//lib/spoom/cli/srb/bump.rb#10
164
+ class Spoom::Cli::Srb::Bump < ::Thor
165
+ include ::Spoom::Colorize
166
+ include ::Spoom::Cli::Helper
167
+
168
+ # source://spoom//lib/spoom/cli/srb/bump.rb#50
169
+ sig { params(directory: ::String).void }
170
+ def bump(directory = T.unsafe(nil)); end
171
+
172
+ def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
173
+
174
+ # source://spoom//lib/spoom/cli/srb/bump.rb#171
175
+ def print_changes(files, command:, from: T.unsafe(nil), to: T.unsafe(nil), dry: T.unsafe(nil), path: T.unsafe(nil)); end
176
+
177
+ # source://spoom//lib/spoom/cli/srb/bump.rb#193
178
+ def undo_changes(files, from_strictness); end
179
+ end
180
+
181
+ # source://spoom//lib/spoom/cli/srb/coverage.rb#10
182
+ class Spoom::Cli::Srb::Coverage < ::Thor
183
+ include ::Spoom::Colorize
184
+ include ::Spoom::Cli::Helper
185
+
186
+ # source://spoom//lib/spoom/cli/srb/coverage.rb#199
187
+ def bundle_install(path, sha); end
188
+
189
+ def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
190
+
191
+ # source://spoom//lib/spoom/cli/srb/coverage.rb#211
192
+ def message_no_data(file); end
193
+
194
+ # source://spoom//lib/spoom/cli/srb/coverage.rb#174
195
+ def open(file = T.unsafe(nil)); end
196
+
197
+ # source://spoom//lib/spoom/cli/srb/coverage.rb#190
198
+ def parse_time(string, option); end
199
+
200
+ # source://spoom//lib/spoom/cli/srb/coverage.rb#143
201
+ def report; end
202
+
203
+ # source://spoom//lib/spoom/cli/srb/coverage.rb#21
204
+ def snapshot; end
205
+
206
+ # source://spoom//lib/spoom/cli/srb/coverage.rb#43
207
+ def timeline; end
208
+ end
209
+
210
+ # source://spoom//lib/spoom/cli/srb/coverage.rb#13
211
+ Spoom::Cli::Srb::Coverage::DATA_DIR = T.let(T.unsafe(nil), String)
212
+
213
+ # source://spoom//lib/spoom/cli/srb/lsp.rb#11
214
+ class Spoom::Cli::Srb::LSP < ::Thor
215
+ include ::Spoom::Colorize
216
+ include ::Spoom::Cli::Helper
217
+
218
+ # TODO: options, filter, limit, kind etc.. filter rbi
219
+ #
220
+ # source://spoom//lib/spoom/cli/srb/lsp.rb#45
221
+ def defs(file, line, col); end
222
+
223
+ # TODO: options, filter, limit, kind etc.. filter rbi
224
+ #
225
+ # source://spoom//lib/spoom/cli/srb/lsp.rb#55
226
+ def find(query); end
227
+
228
+ def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
229
+
230
+ # TODO: options, filter, limit, kind etc.. filter rbi
231
+ #
232
+ # source://spoom//lib/spoom/cli/srb/lsp.rb#31
233
+ def hover(file, line, col); end
234
+
235
+ # TODO: options, filter, limit, kind etc.. filter rbi
236
+ #
237
+ # source://spoom//lib/spoom/cli/srb/lsp.rb#16
238
+ def list; end
239
+
240
+ # source://spoom//lib/spoom/cli/srb/lsp.rb#104
241
+ def lsp_client; end
242
+
243
+ # TODO: options, filter, limit, kind etc.. filter rbi
244
+ #
245
+ # source://spoom//lib/spoom/cli/srb/lsp.rb#75
246
+ def refs(file, line, col); end
247
+
248
+ # source://spoom//lib/spoom/cli/srb/lsp.rb#127
249
+ def run(&block); end
250
+
251
+ # TODO: options, filter, limit, kind etc.. filter rbi
252
+ #
253
+ # source://spoom//lib/spoom/cli/srb/lsp.rb#85
254
+ def sigs(file, line, col); end
255
+
256
+ # source://spoom//lib/spoom/cli/srb/lsp.rb#119
257
+ def symbol_printer; end
258
+
259
+ # TODO: options, filter, limit, kind etc.. filter rbi
260
+ #
261
+ # source://spoom//lib/spoom/cli/srb/lsp.rb#65
262
+ def symbols(file); end
263
+
264
+ # source://spoom//lib/spoom/cli/srb/lsp.rb#152
265
+ def to_uri(path); end
266
+
267
+ # TODO: options, filter, limit, kind etc.. filter rbi
268
+ #
269
+ # source://spoom//lib/spoom/cli/srb/lsp.rb#95
270
+ def types(file, line, col); end
271
+ end
272
+
273
+ # source://spoom//lib/spoom/cli/srb.rb#12
274
+ class Spoom::Cli::Srb::Main < ::Thor
275
+ # source://thor/1.3.1/lib/thor.rb#334
276
+ def bump(*args); end
277
+
278
+ # source://thor/1.3.1/lib/thor.rb#334
279
+ def coverage(*args); end
280
+
281
+ def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
282
+
283
+ # source://thor/1.3.1/lib/thor.rb#334
284
+ def lsp(*args); end
285
+
286
+ # source://thor/1.3.1/lib/thor.rb#334
287
+ def tc(*args); end
288
+ end
289
+
290
+ # source://spoom//lib/spoom/cli/srb/tc.rb#7
291
+ class Spoom::Cli::Srb::Tc < ::Thor
292
+ include ::Spoom::Colorize
293
+ include ::Spoom::Cli::Helper
294
+
295
+ # source://spoom//lib/spoom/cli/srb/tc.rb#132
296
+ def colorize_message(message); end
297
+
298
+ # source://spoom//lib/spoom/cli/srb/tc.rb#123
299
+ def format_error(error, format); end
300
+
301
+ def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
302
+
303
+ # source://spoom//lib/spoom/cli/srb/tc.rb#27
304
+ def tc(*paths_to_select); end
305
+ end
306
+
307
+ # source://spoom//lib/spoom/cli/srb/tc.rb#16
308
+ Spoom::Cli::Srb::Tc::DEFAULT_FORMAT = T.let(T.unsafe(nil), String)
309
+
310
+ # source://spoom//lib/spoom/cli/srb/tc.rb#12
311
+ Spoom::Cli::Srb::Tc::SORT_CODE = T.let(T.unsafe(nil), String)
312
+
313
+ # source://spoom//lib/spoom/cli/srb/tc.rb#14
314
+ Spoom::Cli::Srb::Tc::SORT_ENUM = T.let(T.unsafe(nil), Array)
315
+
316
+ # source://spoom//lib/spoom/cli/srb/tc.rb#13
317
+ Spoom::Cli::Srb::Tc::SORT_LOC = T.let(T.unsafe(nil), String)
318
+
319
+ # source://spoom//lib/spoom/colors.rb#5
320
+ class Spoom::Color < ::T::Enum
321
+ enums do
322
+ CLEAR = new
323
+ BOLD = new
324
+ BLACK = new
325
+ RED = new
326
+ GREEN = new
327
+ YELLOW = new
328
+ BLUE = new
329
+ MAGENTA = new
330
+ CYAN = new
331
+ WHITE = new
332
+ LIGHT_BLACK = new
333
+ LIGHT_RED = new
334
+ LIGHT_GREEN = new
335
+ LIGHT_YELLOW = new
336
+ LIGHT_BLUE = new
337
+ LIGHT_MAGENTA = new
338
+ LIGHT_CYAN = new
339
+ LIGHT_WHITE = new
340
+ end
341
+
342
+ # source://spoom//lib/spoom/colors.rb#32
343
+ sig { returns(::String) }
344
+ def ansi_code; end
345
+ end
346
+
347
+ # source://spoom//lib/spoom/colors.rb#37
348
+ module Spoom::Colorize
349
+ # source://spoom//lib/spoom/colors.rb#41
350
+ sig { params(string: ::String, color: ::Spoom::Color).returns(::String) }
351
+ def set_color(string, *color); end
352
+ end
353
+
354
+ # An abstraction to a Ruby project context
355
+ #
356
+ # A context maps to a directory in the file system.
357
+ # It is used to manipulate files and run commands in the context of this directory.
358
+ #
359
+ # source://spoom//lib/spoom/context/bundle.rb#5
360
+ class Spoom::Context
361
+ include ::Spoom::Context::Bundle
362
+ include ::Spoom::Context::Exec
363
+ include ::Spoom::Context::FileSystem
364
+ include ::Spoom::Context::Git
365
+ include ::Spoom::Context::Sorbet
366
+
367
+ # Create a new context about `absolute_path`
368
+ #
369
+ # The directory will not be created if it doesn't exist.
370
+ # Call `#make!` to create it.
371
+ #
372
+ # source://spoom//lib/spoom/context.rb#51
373
+ sig { params(absolute_path: ::String).void }
374
+ def initialize(absolute_path); end
375
+
376
+ # The absolute path to the directory this context is about
377
+ #
378
+ # source://spoom//lib/spoom/context.rb#44
379
+ sig { returns(::String) }
380
+ def absolute_path; end
381
+
382
+ class << self
383
+ # Create a new context in the system's temporary directory
384
+ #
385
+ # `name` is used as prefix to the temporary directory name.
386
+ # The directory will be created if it doesn't exist.
387
+ #
388
+ # source://spoom//lib/spoom/context.rb#37
389
+ sig { params(name: T.nilable(::String)).returns(T.attached_class) }
390
+ def mktmp!(name = T.unsafe(nil)); end
391
+ end
392
+ end
393
+
394
+ # Bundle features for a context
395
+ #
396
+ # source://spoom//lib/spoom/context/bundle.rb#7
397
+ module Spoom::Context::Bundle
398
+ requires_ancestor { Spoom::Context }
399
+
400
+ # Run a command with `bundle` in this context directory
401
+ #
402
+ # source://spoom//lib/spoom/context/bundle.rb#33
403
+ sig { params(command: ::String, version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) }
404
+ def bundle(command, version: T.unsafe(nil), capture_err: T.unsafe(nil)); end
405
+
406
+ # Run a command `bundle exec` in this context directory
407
+ #
408
+ # source://spoom//lib/spoom/context/bundle.rb#46
409
+ sig { params(command: ::String, version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) }
410
+ def bundle_exec(command, version: T.unsafe(nil), capture_err: T.unsafe(nil)); end
411
+
412
+ # Run `bundle install` in this context directory
413
+ #
414
+ # source://spoom//lib/spoom/context/bundle.rb#40
415
+ sig { params(version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) }
416
+ def bundle_install!(version: T.unsafe(nil), capture_err: T.unsafe(nil)); end
417
+
418
+ # Get `gem` version from the `Gemfile.lock` content
419
+ #
420
+ # Returns `nil` if `gem` cannot be found in the Gemfile.
421
+ #
422
+ # source://spoom//lib/spoom/context/bundle.rb#62
423
+ sig { params(gem: ::String).returns(T.nilable(::String)) }
424
+ def gem_version_from_gemfile_lock(gem); end
425
+
426
+ # source://spoom//lib/spoom/context/bundle.rb#51
427
+ sig { returns(T::Hash[::String, ::Bundler::LazySpecification]) }
428
+ def gemfile_lock_specs; end
429
+
430
+ # Read the contents of the Gemfile in this context directory
431
+ #
432
+ # source://spoom//lib/spoom/context/bundle.rb#15
433
+ sig { returns(T.nilable(::String)) }
434
+ def read_gemfile; end
435
+
436
+ # Read the contents of the Gemfile.lock in this context directory
437
+ #
438
+ # source://spoom//lib/spoom/context/bundle.rb#21
439
+ sig { returns(T.nilable(::String)) }
440
+ def read_gemfile_lock; end
441
+
442
+ # Set the `contents` of the Gemfile in this context directory
443
+ #
444
+ # source://spoom//lib/spoom/context/bundle.rb#27
445
+ sig { params(contents: ::String, append: T::Boolean).void }
446
+ def write_gemfile!(contents, append: T.unsafe(nil)); end
447
+ end
448
+
449
+ # Execution features for a context
450
+ #
451
+ # source://spoom//lib/spoom/context/exec.rb#27
452
+ module Spoom::Context::Exec
453
+ requires_ancestor { Spoom::Context }
454
+
455
+ # Run a command in this context directory
456
+ #
457
+ # source://spoom//lib/spoom/context/exec.rb#35
458
+ sig { params(command: ::String, capture_err: T::Boolean).returns(::Spoom::ExecResult) }
459
+ def exec(command, capture_err: T.unsafe(nil)); end
460
+ end
461
+
462
+ # File System features for a context
463
+ #
464
+ # source://spoom//lib/spoom/context/file_system.rb#7
465
+ module Spoom::Context::FileSystem
466
+ requires_ancestor { Spoom::Context }
467
+
468
+ # Returns the absolute path to `relative_path` in the context's directory
469
+ #
470
+ # source://spoom//lib/spoom/context/file_system.rb#15
471
+ sig { params(relative_path: ::String).returns(::String) }
472
+ def absolute_path_to(relative_path); end
473
+
474
+ # source://spoom//lib/spoom/context/file_system.rb#53
475
+ sig do
476
+ params(
477
+ allow_extensions: T::Array[::String],
478
+ allow_mime_types: T::Array[::String],
479
+ exclude_patterns: T::Array[::String]
480
+ ).returns(T::Array[::String])
481
+ end
482
+ def collect_files(allow_extensions: T.unsafe(nil), allow_mime_types: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end
483
+
484
+ # Delete this context and its content
485
+ #
486
+ # Warning: it will `rm -rf` the context directory on the file system.
487
+ #
488
+ # source://spoom//lib/spoom/context/file_system.rb#105
489
+ sig { void }
490
+ def destroy!; end
491
+
492
+ # Does the context directory at `absolute_path` exist and is a directory?
493
+ #
494
+ # source://spoom//lib/spoom/context/file_system.rb#21
495
+ sig { returns(T::Boolean) }
496
+ def exist?; end
497
+
498
+ # Does `relative_path` point to an existing file in this context directory?
499
+ #
500
+ # source://spoom//lib/spoom/context/file_system.rb#65
501
+ sig { params(relative_path: ::String).returns(T::Boolean) }
502
+ def file?(relative_path); end
503
+
504
+ # List all files in this context matching `pattern`
505
+ #
506
+ # source://spoom//lib/spoom/context/file_system.rb#34
507
+ sig { params(pattern: ::String).returns(T::Array[::String]) }
508
+ def glob(pattern = T.unsafe(nil)); end
509
+
510
+ # List all files at the top level of this context directory
511
+ #
512
+ # source://spoom//lib/spoom/context/file_system.rb#42
513
+ sig { returns(T::Array[::String]) }
514
+ def list; end
515
+
516
+ # Create the context directory at `absolute_path`
517
+ #
518
+ # source://spoom//lib/spoom/context/file_system.rb#27
519
+ sig { void }
520
+ def mkdir!; end
521
+
522
+ # Move the file or directory from `from_relative_path` to `to_relative_path`
523
+ #
524
+ # source://spoom//lib/spoom/context/file_system.rb#95
525
+ sig { params(from_relative_path: ::String, to_relative_path: ::String).void }
526
+ def move!(from_relative_path, to_relative_path); end
527
+
528
+ # Return the contents of the file at `relative_path` in this context directory
529
+ #
530
+ # Will raise if the file doesn't exist.
531
+ #
532
+ # source://spoom//lib/spoom/context/file_system.rb#73
533
+ sig { params(relative_path: ::String).returns(::String) }
534
+ def read(relative_path); end
535
+
536
+ # Remove the path at `relative_path` (recursive + force) in this context directory
537
+ #
538
+ # source://spoom//lib/spoom/context/file_system.rb#89
539
+ sig { params(relative_path: ::String).void }
540
+ def remove!(relative_path); end
541
+
542
+ # Write `contents` in the file at `relative_path` in this context directory
543
+ #
544
+ # Append to the file if `append` is true.
545
+ #
546
+ # source://spoom//lib/spoom/context/file_system.rb#81
547
+ sig { params(relative_path: ::String, contents: ::String, append: T::Boolean).void }
548
+ def write!(relative_path, contents = T.unsafe(nil), append: T.unsafe(nil)); end
549
+ end
550
+
551
+ # Git features for a context
552
+ #
553
+ # source://spoom//lib/spoom/context/git.rb#35
554
+ module Spoom::Context::Git
555
+ requires_ancestor { Spoom::Context }
556
+
557
+ # Run a command prefixed by `git` in this context directory
558
+ #
559
+ # source://spoom//lib/spoom/context/git.rb#43
560
+ sig { params(command: ::String).returns(::Spoom::ExecResult) }
561
+ def git(command); end
562
+
563
+ # Run `git checkout` in this context directory
564
+ #
565
+ # source://spoom//lib/spoom/context/git.rb#62
566
+ sig { params(ref: ::String).returns(::Spoom::ExecResult) }
567
+ def git_checkout!(ref: T.unsafe(nil)); end
568
+
569
+ # Run `git checkout -b <branch-name> <ref>` in this context directory
570
+ #
571
+ # source://spoom//lib/spoom/context/git.rb#68
572
+ sig { params(branch_name: ::String, ref: T.nilable(::String)).returns(::Spoom::ExecResult) }
573
+ def git_checkout_new_branch!(branch_name, ref: T.unsafe(nil)); end
574
+
575
+ # Run `git add . && git commit` in this context directory
576
+ #
577
+ # source://spoom//lib/spoom/context/git.rb#78
578
+ sig { params(message: ::String, time: ::Time, allow_empty: T::Boolean).returns(::Spoom::ExecResult) }
579
+ def git_commit!(message: T.unsafe(nil), time: T.unsafe(nil), allow_empty: T.unsafe(nil)); end
580
+
581
+ # Get the current git branch in this context directory
582
+ #
583
+ # source://spoom//lib/spoom/context/git.rb#89
584
+ sig { returns(T.nilable(::String)) }
585
+ def git_current_branch; end
586
+
587
+ # Run `git diff` in this context directory
588
+ #
589
+ # source://spoom//lib/spoom/context/git.rb#98
590
+ sig { params(arg: ::String).returns(::Spoom::ExecResult) }
591
+ def git_diff(*arg); end
592
+
593
+ # Run `git init` in this context directory
594
+ #
595
+ # Warning: passing a branch will run `git init -b <branch>` which is only available in git 2.28+.
596
+ # In older versions, use `git_init!` followed by `git("checkout -b <branch>")`.
597
+ #
598
+ # source://spoom//lib/spoom/context/git.rb#52
599
+ sig { params(branch: T.nilable(::String)).returns(::Spoom::ExecResult) }
600
+ def git_init!(branch: T.unsafe(nil)); end
601
+
602
+ # Get the last commit in the currently checked out branch
603
+ #
604
+ # source://spoom//lib/spoom/context/git.rb#104
605
+ sig { params(short_sha: T::Boolean).returns(T.nilable(::Spoom::Git::Commit)) }
606
+ def git_last_commit(short_sha: T.unsafe(nil)); end
607
+
608
+ # source://spoom//lib/spoom/context/git.rb#115
609
+ sig { params(arg: ::String).returns(::Spoom::ExecResult) }
610
+ def git_log(*arg); end
611
+
612
+ # Run `git push <remote> <ref>` in this context directory
613
+ #
614
+ # source://spoom//lib/spoom/context/git.rb#121
615
+ sig { params(remote: ::String, ref: ::String, force: T::Boolean).returns(::Spoom::ExecResult) }
616
+ def git_push!(remote, ref, force: T.unsafe(nil)); end
617
+
618
+ # source://spoom//lib/spoom/context/git.rb#126
619
+ sig { params(arg: ::String).returns(::Spoom::ExecResult) }
620
+ def git_show(*arg); end
621
+
622
+ # Is there uncommitted changes in this context directory?
623
+ #
624
+ # source://spoom//lib/spoom/context/git.rb#132
625
+ sig { params(path: ::String).returns(T::Boolean) }
626
+ def git_workdir_clean?(path: T.unsafe(nil)); end
627
+ end
628
+
629
+ # Sorbet features for a context
630
+ #
631
+ # source://spoom//lib/spoom/context/sorbet.rb#7
632
+ module Spoom::Context::Sorbet
633
+ requires_ancestor { Spoom::Context }
634
+
635
+ # Does this context has a `sorbet/config` file?
636
+ #
637
+ # source://spoom//lib/spoom/context/sorbet.rb#119
638
+ sig { returns(T::Boolean) }
639
+ def has_sorbet_config?; end
640
+
641
+ # Read the strictness sigil from the file at `relative_path` (returns `nil` if no sigil)
642
+ #
643
+ # source://spoom//lib/spoom/context/sorbet.rb#142
644
+ sig { params(relative_path: ::String).returns(T.nilable(::String)) }
645
+ def read_file_strictness(relative_path); end
646
+
647
+ # Read the contents of `sorbet/config` in this context directory
648
+ #
649
+ # source://spoom//lib/spoom/context/sorbet.rb#130
650
+ sig { returns(::String) }
651
+ def read_sorbet_config; end
652
+
653
+ # source://spoom//lib/spoom/context/sorbet.rb#124
654
+ sig { returns(::Spoom::Sorbet::Config) }
655
+ def sorbet_config; end
656
+
657
+ # Get the commit introducing the `sorbet/config` file
658
+ #
659
+ # source://spoom//lib/spoom/context/sorbet.rb#148
660
+ sig { returns(T.nilable(::Spoom::Git::Commit)) }
661
+ def sorbet_intro_commit; end
662
+
663
+ # Get the commit removing the `sorbet/config` file
664
+ #
665
+ # source://spoom//lib/spoom/context/sorbet.rb#160
666
+ sig { returns(T.nilable(::Spoom::Git::Commit)) }
667
+ def sorbet_removal_commit; end
668
+
669
+ # Run `bundle exec srb` in this context directory
670
+ #
671
+ # source://spoom//lib/spoom/context/sorbet.rb#15
672
+ sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) }
673
+ def srb(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end
674
+
675
+ # List all files typechecked by Sorbet from its `config`
676
+ #
677
+ # source://spoom//lib/spoom/context/sorbet.rb#65
678
+ sig { params(with_config: T.nilable(::Spoom::Sorbet::Config), include_rbis: T::Boolean).returns(T::Array[::String]) }
679
+ def srb_files(with_config: T.unsafe(nil), include_rbis: T.unsafe(nil)); end
680
+
681
+ # List all files typechecked by Sorbet from its `config` that matches `strictness`
682
+ #
683
+ # source://spoom//lib/spoom/context/sorbet.rb#104
684
+ sig do
685
+ params(
686
+ strictness: ::String,
687
+ with_config: T.nilable(::Spoom::Sorbet::Config),
688
+ include_rbis: T::Boolean
689
+ ).returns(T::Array[::String])
690
+ end
691
+ def srb_files_with_strictness(strictness, with_config: T.unsafe(nil), include_rbis: T.unsafe(nil)); end
692
+
693
+ # source://spoom//lib/spoom/context/sorbet.rb#45
694
+ sig do
695
+ params(
696
+ arg: ::String,
697
+ sorbet_bin: T.nilable(::String),
698
+ capture_err: T::Boolean
699
+ ).returns(T.nilable(T::Hash[::String, ::Integer]))
700
+ end
701
+ def srb_metrics(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end
702
+
703
+ # source://spoom//lib/spoom/context/sorbet.rb#33
704
+ sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) }
705
+ def srb_tc(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end
706
+
707
+ # source://spoom//lib/spoom/context/sorbet.rb#110
708
+ sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(T.nilable(::String)) }
709
+ def srb_version(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end
710
+
711
+ # Set the `contents` of `sorbet/config` in this context directory
712
+ #
713
+ # source://spoom//lib/spoom/context/sorbet.rb#136
714
+ sig { params(contents: ::String, append: T::Boolean).void }
715
+ def write_sorbet_config!(contents, append: T.unsafe(nil)); end
716
+ end
717
+
718
+ # source://spoom//lib/spoom/coverage/snapshot.rb#5
719
+ module Spoom::Coverage
720
+ class << self
721
+ # source://spoom//lib/spoom/coverage.rb#103
722
+ sig { params(context: ::Spoom::Context).returns(::Spoom::FileTree) }
723
+ def file_tree(context); end
724
+
725
+ # source://spoom//lib/spoom/coverage.rb#83
726
+ sig do
727
+ params(
728
+ context: ::Spoom::Context,
729
+ snapshots: T::Array[::Spoom::Coverage::Snapshot],
730
+ palette: ::Spoom::Coverage::D3::ColorPalette
731
+ ).returns(::Spoom::Coverage::Report)
732
+ end
733
+ def report(context, snapshots, palette:); end
734
+
735
+ # source://spoom//lib/spoom/coverage.rb#16
736
+ sig do
737
+ params(
738
+ context: ::Spoom::Context,
739
+ rbi: T::Boolean,
740
+ sorbet_bin: T.nilable(::String)
741
+ ).returns(::Spoom::Coverage::Snapshot)
742
+ end
743
+ def snapshot(context, rbi: T.unsafe(nil), sorbet_bin: T.unsafe(nil)); end
744
+ end
745
+ end
746
+
747
+ # source://spoom//lib/spoom/coverage/report.rb#88
748
+ module Spoom::Coverage::Cards; end
749
+
750
+ # source://spoom//lib/spoom/coverage/report.rb#89
751
+ class Spoom::Coverage::Cards::Card < ::Spoom::Coverage::Template
752
+ # source://spoom//lib/spoom/coverage/report.rb#98
753
+ sig { params(template: ::String, title: T.nilable(::String), body: T.nilable(::String)).void }
754
+ def initialize(template: T.unsafe(nil), title: T.unsafe(nil), body: T.unsafe(nil)); end
755
+
756
+ # @return [String, nil]
757
+ #
758
+ # source://spoom//lib/spoom/coverage/report.rb#95
759
+ def body; end
760
+
761
+ # source://spoom//lib/spoom/coverage/report.rb#95
762
+ sig { returns(T.nilable(::String)) }
763
+ def title; end
764
+ end
765
+
766
+ # source://spoom//lib/spoom/coverage/report.rb#92
767
+ Spoom::Coverage::Cards::Card::TEMPLATE = T.let(T.unsafe(nil), String)
768
+
769
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
770
+ #
771
+ # source://spoom//lib/spoom/coverage/report.rb#105
772
+ class Spoom::Coverage::Cards::Erb < ::Spoom::Coverage::Cards::Card
773
+ abstract!
774
+
775
+ # source://spoom//lib/spoom/coverage/report.rb#112
776
+ sig { void }
777
+ def initialize; end
778
+
779
+ # @abstract
780
+ #
781
+ # source://spoom//lib/spoom/coverage/report.rb#120
782
+ sig { abstract.returns(::String) }
783
+ def erb; end
784
+
785
+ # source://spoom//lib/spoom/coverage/report.rb#115
786
+ sig { override.returns(::String) }
787
+ def html; end
788
+ end
789
+
790
+ # source://spoom//lib/spoom/coverage/report.rb#153
791
+ class Spoom::Coverage::Cards::Map < ::Spoom::Coverage::Cards::Card
792
+ # source://spoom//lib/spoom/coverage/report.rb#164
793
+ sig do
794
+ params(
795
+ file_tree: ::Spoom::FileTree,
796
+ nodes_strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)],
797
+ nodes_strictness_scores: T::Hash[::Spoom::FileTree::Node, ::Float],
798
+ title: ::String
799
+ ).void
800
+ end
801
+ def initialize(file_tree:, nodes_strictnesses:, nodes_strictness_scores:, title: T.unsafe(nil)); end
802
+ end
803
+
804
+ # source://spoom//lib/spoom/coverage/report.rb#123
805
+ class Spoom::Coverage::Cards::Snapshot < ::Spoom::Coverage::Cards::Card
806
+ # source://spoom//lib/spoom/coverage/report.rb#132
807
+ sig { params(snapshot: ::Spoom::Coverage::Snapshot, title: ::String).void }
808
+ def initialize(snapshot:, title: T.unsafe(nil)); end
809
+
810
+ # source://spoom//lib/spoom/coverage/report.rb#143
811
+ sig { returns(::Spoom::Coverage::D3::Pie::Calls) }
812
+ def pie_calls; end
813
+
814
+ # source://spoom//lib/spoom/coverage/report.rb#138
815
+ sig { returns(::Spoom::Coverage::D3::Pie::Sigils) }
816
+ def pie_sigils; end
817
+
818
+ # source://spoom//lib/spoom/coverage/report.rb#148
819
+ sig { returns(::Spoom::Coverage::D3::Pie::Sigs) }
820
+ def pie_sigs; end
821
+
822
+ # source://spoom//lib/spoom/coverage/report.rb#129
823
+ sig { returns(::Spoom::Coverage::Snapshot) }
824
+ def snapshot; end
825
+ end
826
+
827
+ # source://spoom//lib/spoom/coverage/report.rb#126
828
+ Spoom::Coverage::Cards::Snapshot::TEMPLATE = T.let(T.unsafe(nil), String)
829
+
830
+ # source://spoom//lib/spoom/coverage/report.rb#240
831
+ class Spoom::Coverage::Cards::SorbetIntro < ::Spoom::Coverage::Cards::Erb
832
+ # source://spoom//lib/spoom/coverage/report.rb#244
833
+ sig { params(sorbet_intro_commit: T.nilable(::String), sorbet_intro_date: T.nilable(::Time)).void }
834
+ def initialize(sorbet_intro_commit: T.unsafe(nil), sorbet_intro_date: T.unsafe(nil)); end
835
+
836
+ # source://spoom//lib/spoom/coverage/report.rb#250
837
+ sig { override.returns(::String) }
838
+ def erb; end
839
+ end
840
+
841
+ # source://spoom//lib/spoom/coverage/report.rb#177
842
+ class Spoom::Coverage::Cards::Timeline < ::Spoom::Coverage::Cards::Card
843
+ # source://spoom//lib/spoom/coverage/report.rb#181
844
+ sig { params(title: ::String, timeline: ::Spoom::Coverage::D3::Timeline).void }
845
+ def initialize(title:, timeline:); end
846
+ end
847
+
848
+ # source://spoom//lib/spoom/coverage/report.rb#194
849
+ class Spoom::Coverage::Cards::Timeline::Calls < ::Spoom::Coverage::Cards::Timeline
850
+ # source://spoom//lib/spoom/coverage/report.rb#198
851
+ sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void }
852
+ def initialize(snapshots:, title: T.unsafe(nil)); end
853
+ end
854
+
855
+ # source://spoom//lib/spoom/coverage/report.rb#212
856
+ class Spoom::Coverage::Cards::Timeline::RBIs < ::Spoom::Coverage::Cards::Timeline
857
+ # source://spoom//lib/spoom/coverage/report.rb#216
858
+ sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void }
859
+ def initialize(snapshots:, title: T.unsafe(nil)); end
860
+ end
861
+
862
+ # source://spoom//lib/spoom/coverage/report.rb#230
863
+ class Spoom::Coverage::Cards::Timeline::Runtimes < ::Spoom::Coverage::Cards::Timeline
864
+ # source://spoom//lib/spoom/coverage/report.rb#234
865
+ sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void }
866
+ def initialize(snapshots:, title: T.unsafe(nil)); end
867
+ end
868
+
869
+ # source://spoom//lib/spoom/coverage/report.rb#185
870
+ class Spoom::Coverage::Cards::Timeline::Sigils < ::Spoom::Coverage::Cards::Timeline
871
+ # source://spoom//lib/spoom/coverage/report.rb#189
872
+ sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void }
873
+ def initialize(snapshots:, title: T.unsafe(nil)); end
874
+ end
875
+
876
+ # source://spoom//lib/spoom/coverage/report.rb#203
877
+ class Spoom::Coverage::Cards::Timeline::Sigs < ::Spoom::Coverage::Cards::Timeline
878
+ # source://spoom//lib/spoom/coverage/report.rb#207
879
+ sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void }
880
+ def initialize(snapshots:, title: T.unsafe(nil)); end
881
+ end
882
+
883
+ # source://spoom//lib/spoom/coverage/report.rb#221
884
+ class Spoom::Coverage::Cards::Timeline::Versions < ::Spoom::Coverage::Cards::Timeline
885
+ # source://spoom//lib/spoom/coverage/report.rb#225
886
+ sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void }
887
+ def initialize(snapshots:, title: T.unsafe(nil)); end
888
+ end
889
+
890
+ # source://spoom//lib/spoom/coverage/d3/base.rb#6
891
+ module Spoom::Coverage::D3
892
+ class << self
893
+ # source://spoom//lib/spoom/coverage/d3.rb#61
894
+ sig { params(palette: ::Spoom::Coverage::D3::ColorPalette).returns(::String) }
895
+ def header_script(palette); end
896
+
897
+ # source://spoom//lib/spoom/coverage/d3.rb#21
898
+ sig { returns(::String) }
899
+ def header_style; end
900
+ end
901
+ end
902
+
903
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
904
+ #
905
+ # source://spoom//lib/spoom/coverage/d3/base.rb#7
906
+ class Spoom::Coverage::D3::Base
907
+ abstract!
908
+
909
+ # source://spoom//lib/spoom/coverage/d3/base.rb#17
910
+ sig { params(id: ::String, data: T.untyped).void }
911
+ def initialize(id, data); end
912
+
913
+ # source://spoom//lib/spoom/coverage/d3/base.rb#37
914
+ sig { returns(::String) }
915
+ def html; end
916
+
917
+ # source://spoom//lib/spoom/coverage/d3/base.rb#14
918
+ sig { returns(::String) }
919
+ def id; end
920
+
921
+ # @abstract
922
+ #
923
+ # source://spoom//lib/spoom/coverage/d3/base.rb#50
924
+ sig { abstract.returns(::String) }
925
+ def script; end
926
+
927
+ # source://spoom//lib/spoom/coverage/d3/base.rb#45
928
+ sig { returns(::String) }
929
+ def tooltip; end
930
+
931
+ class << self
932
+ # source://spoom//lib/spoom/coverage/d3/base.rb#31
933
+ sig { returns(::String) }
934
+ def header_script; end
935
+
936
+ # source://spoom//lib/spoom/coverage/d3/base.rb#26
937
+ sig { returns(::String) }
938
+ def header_style; end
939
+ end
940
+ end
941
+
942
+ # source://spoom//lib/spoom/coverage/d3.rb#12
943
+ Spoom::Coverage::D3::COLOR_FALSE = T.let(T.unsafe(nil), String)
944
+
945
+ # source://spoom//lib/spoom/coverage/d3.rb#11
946
+ Spoom::Coverage::D3::COLOR_IGNORE = T.let(T.unsafe(nil), String)
947
+
948
+ # source://spoom//lib/spoom/coverage/d3.rb#14
949
+ Spoom::Coverage::D3::COLOR_STRICT = T.let(T.unsafe(nil), String)
950
+
951
+ # source://spoom//lib/spoom/coverage/d3.rb#15
952
+ Spoom::Coverage::D3::COLOR_STRONG = T.let(T.unsafe(nil), String)
953
+
954
+ # source://spoom//lib/spoom/coverage/d3.rb#13
955
+ Spoom::Coverage::D3::COLOR_TRUE = T.let(T.unsafe(nil), String)
956
+
957
+ # source://spoom//lib/spoom/coverage/d3/circle_map.rb#9
958
+ class Spoom::Coverage::D3::CircleMap < ::Spoom::Coverage::D3::Base
959
+ # source://spoom//lib/spoom/coverage/d3/circle_map.rb#59
960
+ sig { override.returns(::String) }
961
+ def script; end
962
+
963
+ class << self
964
+ # source://spoom//lib/spoom/coverage/d3/circle_map.rb#40
965
+ sig { returns(::String) }
966
+ def header_script; end
967
+
968
+ # source://spoom//lib/spoom/coverage/d3/circle_map.rb#14
969
+ sig { returns(::String) }
970
+ def header_style; end
971
+ end
972
+ end
973
+
974
+ # source://spoom//lib/spoom/coverage/d3/circle_map.rb#148
975
+ class Spoom::Coverage::D3::CircleMap::Sigils < ::Spoom::Coverage::D3::CircleMap
976
+ # source://spoom//lib/spoom/coverage/d3/circle_map.rb#159
977
+ sig do
978
+ params(
979
+ id: ::String,
980
+ file_tree: ::Spoom::FileTree,
981
+ nodes_strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)],
982
+ nodes_scores: T::Hash[::Spoom::FileTree::Node, ::Float]
983
+ ).void
984
+ end
985
+ def initialize(id, file_tree, nodes_strictnesses, nodes_scores); end
986
+
987
+ # source://spoom//lib/spoom/coverage/d3/circle_map.rb#166
988
+ sig { params(node: ::Spoom::FileTree::Node).returns(T::Hash[::Symbol, T.untyped]) }
989
+ def tree_node_to_json(node); end
990
+ end
991
+
992
+ # source://spoom//lib/spoom/coverage/d3.rb#103
993
+ class Spoom::Coverage::D3::ColorPalette < ::T::Struct
994
+ prop :ignore, ::String
995
+ prop :false, ::String
996
+ prop :true, ::String
997
+ prop :strict, ::String
998
+ prop :strong, ::String
999
+
1000
+ class << self
1001
+ # source://sorbet-runtime/0.5.11406/lib/types/struct.rb#13
1002
+ def inherited(s); end
1003
+ end
1004
+ end
1005
+
1006
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
1007
+ #
1008
+ # source://spoom//lib/spoom/coverage/d3/pie.rb#9
1009
+ class Spoom::Coverage::D3::Pie < ::Spoom::Coverage::D3::Base
1010
+ abstract!
1011
+
1012
+ # source://spoom//lib/spoom/coverage/d3/pie.rb#16
1013
+ sig { params(id: ::String, title: ::String, data: T.untyped).void }
1014
+ def initialize(id, title, data); end
1015
+
1016
+ # source://spoom//lib/spoom/coverage/d3/pie.rb#56
1017
+ sig { override.returns(::String) }
1018
+ def script; end
1019
+
1020
+ class << self
1021
+ # source://spoom//lib/spoom/coverage/d3/pie.rb#43
1022
+ sig { returns(::String) }
1023
+ def header_script; end
1024
+
1025
+ # source://spoom//lib/spoom/coverage/d3/pie.rb#25
1026
+ sig { returns(::String) }
1027
+ def header_style; end
1028
+ end
1029
+ end
1030
+
1031
+ # source://spoom//lib/spoom/coverage/d3/pie.rb#141
1032
+ class Spoom::Coverage::D3::Pie::Calls < ::Spoom::Coverage::D3::Pie
1033
+ # source://spoom//lib/spoom/coverage/d3/pie.rb#145
1034
+ sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void }
1035
+ def initialize(id, title, snapshot); end
1036
+
1037
+ # source://spoom//lib/spoom/coverage/d3/pie.rb#150
1038
+ sig { override.returns(::String) }
1039
+ def tooltip; end
1040
+ end
1041
+
1042
+ # source://spoom//lib/spoom/coverage/d3/pie.rb#123
1043
+ class Spoom::Coverage::D3::Pie::Sigils < ::Spoom::Coverage::D3::Pie
1044
+ # source://spoom//lib/spoom/coverage/d3/pie.rb#127
1045
+ sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void }
1046
+ def initialize(id, title, snapshot); end
1047
+
1048
+ # source://spoom//lib/spoom/coverage/d3/pie.rb#132
1049
+ sig { override.returns(::String) }
1050
+ def tooltip; end
1051
+ end
1052
+
1053
+ # source://spoom//lib/spoom/coverage/d3/pie.rb#159
1054
+ class Spoom::Coverage::D3::Pie::Sigs < ::Spoom::Coverage::D3::Pie
1055
+ # source://spoom//lib/spoom/coverage/d3/pie.rb#163
1056
+ sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void }
1057
+ def initialize(id, title, snapshot); end
1058
+
1059
+ # source://spoom//lib/spoom/coverage/d3/pie.rb#172
1060
+ sig { override.returns(::String) }
1061
+ def tooltip; end
1062
+ end
1063
+
1064
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
1065
+ #
1066
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#9
1067
+ class Spoom::Coverage::D3::Timeline < ::Spoom::Coverage::D3::Base
1068
+ abstract!
1069
+
1070
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#16
1071
+ sig { params(id: ::String, data: T.untyped, keys: T::Array[::String]).void }
1072
+ def initialize(id, data, keys); end
1073
+
1074
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#187
1075
+ sig { params(y: ::String, color: ::String, curve: ::String).returns(::String) }
1076
+ def area(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end
1077
+
1078
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#203
1079
+ sig { params(y: ::String, color: ::String, curve: ::String).returns(::String) }
1080
+ def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end
1081
+
1082
+ # @abstract
1083
+ #
1084
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#126
1085
+ sig { abstract.returns(::String) }
1086
+ def plot; end
1087
+
1088
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#217
1089
+ sig { params(y: ::String).returns(::String) }
1090
+ def points(y:); end
1091
+
1092
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#101
1093
+ sig { override.returns(::String) }
1094
+ def script; end
1095
+
1096
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#129
1097
+ sig { returns(::String) }
1098
+ def x_scale; end
1099
+
1100
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#145
1101
+ sig { returns(::String) }
1102
+ def x_ticks; end
1103
+
1104
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#158
1105
+ sig { params(min: ::String, max: ::String, ticks: ::String).returns(::String) }
1106
+ def y_scale(min:, max:, ticks:); end
1107
+
1108
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#174
1109
+ sig { params(ticks: ::String, format: ::String, padding: ::Integer).returns(::String) }
1110
+ def y_ticks(ticks:, format:, padding:); end
1111
+
1112
+ class << self
1113
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#79
1114
+ sig { returns(::String) }
1115
+ def header_script; end
1116
+
1117
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#25
1118
+ sig { returns(::String) }
1119
+ def header_style; end
1120
+ end
1121
+ end
1122
+
1123
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#448
1124
+ class Spoom::Coverage::D3::Timeline::Calls < ::Spoom::Coverage::D3::Timeline::Stacked
1125
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#452
1126
+ sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void }
1127
+ def initialize(id, snapshots); end
1128
+
1129
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#466
1130
+ sig { override.returns(::String) }
1131
+ def tooltip; end
1132
+ end
1133
+
1134
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#505
1135
+ class Spoom::Coverage::D3::Timeline::RBIs < ::Spoom::Coverage::D3::Timeline::Stacked
1136
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#509
1137
+ sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void }
1138
+ def initialize(id, snapshots); end
1139
+
1140
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#577
1141
+ sig { override.params(y: ::String, color: ::String, curve: ::String).returns(::String) }
1142
+ def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end
1143
+
1144
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#617
1145
+ sig { override.returns(::String) }
1146
+ def plot; end
1147
+
1148
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#537
1149
+ sig { override.returns(::String) }
1150
+ def script; end
1151
+
1152
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#523
1153
+ sig { override.returns(::String) }
1154
+ def tooltip; end
1155
+ end
1156
+
1157
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#282
1158
+ class Spoom::Coverage::D3::Timeline::Runtimes < ::Spoom::Coverage::D3::Timeline
1159
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#286
1160
+ sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void }
1161
+ def initialize(id, snapshots); end
1162
+
1163
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#311
1164
+ sig { override.returns(::String) }
1165
+ def plot; end
1166
+
1167
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#298
1168
+ sig { override.returns(::String) }
1169
+ def tooltip; end
1170
+ end
1171
+
1172
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#421
1173
+ class Spoom::Coverage::D3::Timeline::Sigils < ::Spoom::Coverage::D3::Timeline::Stacked
1174
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#425
1175
+ sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void }
1176
+ def initialize(id, snapshots); end
1177
+
1178
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#439
1179
+ sig { override.returns(::String) }
1180
+ def tooltip; end
1181
+ end
1182
+
1183
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#475
1184
+ class Spoom::Coverage::D3::Timeline::Sigs < ::Spoom::Coverage::D3::Timeline::Stacked
1185
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#479
1186
+ sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void }
1187
+ def initialize(id, snapshots); end
1188
+
1189
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#496
1190
+ sig { override.returns(::String) }
1191
+ def tooltip; end
1192
+ end
1193
+
1194
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
1195
+ #
1196
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#329
1197
+ class Spoom::Coverage::D3::Timeline::Stacked < ::Spoom::Coverage::D3::Timeline
1198
+ abstract!
1199
+
1200
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#388
1201
+ sig { override.params(y: ::String, color: ::String, curve: ::String).returns(::String) }
1202
+ def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end
1203
+
1204
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#377
1205
+ sig { override.returns(::String) }
1206
+ def plot; end
1207
+
1208
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#336
1209
+ sig { override.returns(::String) }
1210
+ def script; end
1211
+ end
1212
+
1213
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#232
1214
+ class Spoom::Coverage::D3::Timeline::Versions < ::Spoom::Coverage::D3::Timeline
1215
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#236
1216
+ sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void }
1217
+ def initialize(id, snapshots); end
1218
+
1219
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#263
1220
+ sig { override.returns(::String) }
1221
+ def plot; end
1222
+
1223
+ # source://spoom//lib/spoom/coverage/d3/timeline.rb#249
1224
+ sig { override.returns(::String) }
1225
+ def tooltip; end
1226
+ end
1227
+
1228
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
1229
+ #
1230
+ # source://spoom//lib/spoom/coverage/report.rb#38
1231
+ class Spoom::Coverage::Page < ::Spoom::Coverage::Template
1232
+ abstract!
1233
+
1234
+ # source://spoom//lib/spoom/coverage/report.rb#53
1235
+ sig { params(title: ::String, palette: ::Spoom::Coverage::D3::ColorPalette, template: ::String).void }
1236
+ def initialize(title:, palette:, template: T.unsafe(nil)); end
1237
+
1238
+ # source://spoom//lib/spoom/coverage/report.rb#75
1239
+ sig { returns(::String) }
1240
+ def body_html; end
1241
+
1242
+ # @abstract
1243
+ #
1244
+ # source://spoom//lib/spoom/coverage/report.rb#80
1245
+ sig { abstract.returns(T::Array[::Spoom::Coverage::Cards::Card]) }
1246
+ def cards; end
1247
+
1248
+ # source://spoom//lib/spoom/coverage/report.rb#83
1249
+ sig { returns(::String) }
1250
+ def footer_html; end
1251
+
1252
+ # source://spoom//lib/spoom/coverage/report.rb#70
1253
+ sig { returns(::String) }
1254
+ def header_html; end
1255
+
1256
+ # source://spoom//lib/spoom/coverage/report.rb#65
1257
+ sig { returns(::String) }
1258
+ def header_script; end
1259
+
1260
+ # source://spoom//lib/spoom/coverage/report.rb#60
1261
+ sig { returns(::String) }
1262
+ def header_style; end
1263
+
1264
+ # source://spoom//lib/spoom/coverage/report.rb#50
1265
+ sig { returns(::Spoom::Coverage::D3::ColorPalette) }
1266
+ def palette; end
1267
+
1268
+ # source://spoom//lib/spoom/coverage/report.rb#47
1269
+ sig { returns(::String) }
1270
+ def title; end
1271
+ end
1272
+
1273
+ # source://spoom//lib/spoom/coverage/report.rb#44
1274
+ Spoom::Coverage::Page::TEMPLATE = T.let(T.unsafe(nil), String)
1275
+
1276
+ # source://spoom//lib/spoom/coverage/report.rb#261
1277
+ class Spoom::Coverage::Report < ::Spoom::Coverage::Page
1278
+ # source://spoom//lib/spoom/coverage/report.rb#276
1279
+ sig do
1280
+ params(
1281
+ project_name: ::String,
1282
+ palette: ::Spoom::Coverage::D3::ColorPalette,
1283
+ snapshots: T::Array[::Spoom::Coverage::Snapshot],
1284
+ file_tree: ::Spoom::FileTree,
1285
+ nodes_strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)],
1286
+ nodes_strictness_scores: T::Hash[::Spoom::FileTree::Node, ::Float],
1287
+ sorbet_intro_commit: T.nilable(::String),
1288
+ sorbet_intro_date: T.nilable(::Time)
1289
+ ).void
1290
+ end
1291
+ 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
1292
+
1293
+ # source://spoom//lib/spoom/coverage/report.rb#308
1294
+ sig { override.returns(T::Array[::Spoom::Coverage::Cards::Card]) }
1295
+ def cards; end
1296
+
1297
+ # source://spoom//lib/spoom/coverage/report.rb#297
1298
+ sig { override.returns(::String) }
1299
+ def header_html; end
1300
+ end
1301
+
1302
+ # source://spoom//lib/spoom/coverage/snapshot.rb#6
1303
+ class Spoom::Coverage::Snapshot < ::T::Struct
1304
+ prop :timestamp, ::Integer, default: T.unsafe(nil)
1305
+ prop :version_static, T.nilable(::String), default: T.unsafe(nil)
1306
+ prop :version_runtime, T.nilable(::String), default: T.unsafe(nil)
1307
+ prop :duration, ::Integer, default: T.unsafe(nil)
1308
+ prop :commit_sha, T.nilable(::String), default: T.unsafe(nil)
1309
+ prop :commit_timestamp, T.nilable(::Integer), default: T.unsafe(nil)
1310
+ prop :files, ::Integer, default: T.unsafe(nil)
1311
+ prop :rbi_files, ::Integer, default: T.unsafe(nil)
1312
+ prop :modules, ::Integer, default: T.unsafe(nil)
1313
+ prop :classes, ::Integer, default: T.unsafe(nil)
1314
+ prop :singleton_classes, ::Integer, default: T.unsafe(nil)
1315
+ prop :methods_without_sig, ::Integer, default: T.unsafe(nil)
1316
+ prop :methods_with_sig, ::Integer, default: T.unsafe(nil)
1317
+ prop :calls_untyped, ::Integer, default: T.unsafe(nil)
1318
+ prop :calls_typed, ::Integer, default: T.unsafe(nil)
1319
+ prop :sigils, T::Hash[::String, ::Integer], default: T.unsafe(nil)
1320
+ prop :methods_with_sig_excluding_rbis, ::Integer, default: T.unsafe(nil)
1321
+ prop :methods_without_sig_excluding_rbis, ::Integer, default: T.unsafe(nil)
1322
+ prop :sigils_excluding_rbis, T::Hash[::String, ::Integer], default: T.unsafe(nil)
1323
+
1324
+ # source://spoom//lib/spoom/coverage/snapshot.rb#33
1325
+ sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean, indent_level: ::Integer).void }
1326
+ def print(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end
1327
+
1328
+ # source://spoom//lib/spoom/coverage/snapshot.rb#39
1329
+ sig { params(arg: T.untyped).returns(::String) }
1330
+ def to_json(*arg); end
1331
+
1332
+ class << self
1333
+ # source://spoom//lib/spoom/coverage/snapshot.rb#47
1334
+ sig { params(json: ::String).returns(::Spoom::Coverage::Snapshot) }
1335
+ def from_json(json); end
1336
+
1337
+ # source://spoom//lib/spoom/coverage/snapshot.rb#52
1338
+ sig { params(obj: T::Hash[::String, T.untyped]).returns(::Spoom::Coverage::Snapshot) }
1339
+ def from_obj(obj); end
1340
+
1341
+ # source://sorbet-runtime/0.5.11406/lib/types/struct.rb#13
1342
+ def inherited(s); end
1343
+ end
1344
+ end
1345
+
1346
+ # The strictness name as found in the Sorbet metrics file
1347
+ #
1348
+ # source://spoom//lib/spoom/coverage/snapshot.rb#30
1349
+ Spoom::Coverage::Snapshot::STRICTNESSES = T.let(T.unsafe(nil), Array)
1350
+
1351
+ # source://spoom//lib/spoom/coverage/snapshot.rb#95
1352
+ class Spoom::Coverage::SnapshotPrinter < ::Spoom::Printer
1353
+ # source://spoom//lib/spoom/coverage/snapshot.rb#99
1354
+ sig { params(snapshot: ::Spoom::Coverage::Snapshot).void }
1355
+ def print_snapshot(snapshot); end
1356
+
1357
+ private
1358
+
1359
+ # source://spoom//lib/spoom/coverage/snapshot.rb#158
1360
+ sig { params(value: T.nilable(::Integer), total: T.nilable(::Integer)).returns(::String) }
1361
+ def percent(value, total); end
1362
+
1363
+ # source://spoom//lib/spoom/coverage/snapshot.rb#147
1364
+ sig { params(hash: T::Hash[::String, ::Integer], total: ::Integer).void }
1365
+ def print_map(hash, total); end
1366
+ end
1367
+
1368
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
1369
+ #
1370
+ # source://spoom//lib/spoom/coverage/report.rb#10
1371
+ class Spoom::Coverage::Template
1372
+ abstract!
1373
+
1374
+ # Create a new template from an Erb file path
1375
+ #
1376
+ # source://spoom//lib/spoom/coverage/report.rb#18
1377
+ sig { params(template: ::String).void }
1378
+ def initialize(template:); end
1379
+
1380
+ # source://spoom//lib/spoom/coverage/report.rb#23
1381
+ sig { returns(::String) }
1382
+ def erb; end
1383
+
1384
+ # source://spoom//lib/spoom/coverage/report.rb#33
1385
+ sig { returns(::Binding) }
1386
+ def get_binding; end
1387
+
1388
+ # source://spoom//lib/spoom/coverage/report.rb#28
1389
+ sig { returns(::String) }
1390
+ def html; end
1391
+ end
1392
+
1393
+ # source://spoom//lib/spoom/deadcode/visitor.rb#5
1394
+ module Spoom::Deadcode
1395
+ class << self
1396
+ # source://spoom//lib/spoom/deadcode.rb#81
1397
+ sig do
1398
+ params(
1399
+ index: ::Spoom::Deadcode::Index,
1400
+ erb: ::String,
1401
+ file: ::String,
1402
+ plugins: T::Array[::Spoom::Deadcode::Plugins::Base]
1403
+ ).void
1404
+ end
1405
+ def index_erb(index, erb, file:, plugins: T.unsafe(nil)); end
1406
+
1407
+ # source://spoom//lib/spoom/deadcode.rb#67
1408
+ sig do
1409
+ params(
1410
+ index: ::Spoom::Deadcode::Index,
1411
+ node: ::Prism::Node,
1412
+ ruby: ::String,
1413
+ file: ::String,
1414
+ plugins: T::Array[::Spoom::Deadcode::Plugins::Base]
1415
+ ).void
1416
+ end
1417
+ def index_node(index, node, ruby, file:, plugins: T.unsafe(nil)); end
1418
+
1419
+ # source://spoom//lib/spoom/deadcode.rb#75
1420
+ sig do
1421
+ params(
1422
+ index: ::Spoom::Deadcode::Index,
1423
+ ruby: ::String,
1424
+ file: ::String,
1425
+ plugins: T::Array[::Spoom::Deadcode::Plugins::Base]
1426
+ ).void
1427
+ end
1428
+ def index_ruby(index, ruby, file:, plugins: T.unsafe(nil)); end
1429
+
1430
+ # source://spoom//lib/spoom/deadcode/plugins.rb#75
1431
+ sig { params(context: ::Spoom::Context).returns(T::Array[::Spoom::Deadcode::Plugins::Base]) }
1432
+ def load_custom_plugins(context); end
1433
+
1434
+ # source://spoom//lib/spoom/deadcode.rb#43
1435
+ sig { params(ruby: ::String, file: ::String).returns(::Prism::Node) }
1436
+ def parse_ruby(ruby, file:); end
1437
+
1438
+ # source://spoom//lib/spoom/deadcode/plugins.rb#61
1439
+ sig { params(context: ::Spoom::Context).returns(T::Array[::Spoom::Deadcode::Plugins::Base]) }
1440
+ def plugins_from_gemfile_lock(context); end
1441
+ end
1442
+ end
1443
+
1444
+ # source://spoom//lib/spoom/deadcode/plugins.rb#26
1445
+ Spoom::Deadcode::DEFAULT_CUSTOM_PLUGINS_PATH = T.let(T.unsafe(nil), String)
1446
+
1447
+ # source://spoom//lib/spoom/deadcode/plugins.rb#28
1448
+ Spoom::Deadcode::DEFAULT_PLUGINS = T.let(T.unsafe(nil), Set)
1449
+
1450
+ # A definition is a class, module, method, constant, etc. being defined in the code
1451
+ #
1452
+ # source://spoom//lib/spoom/deadcode/definition.rb#7
1453
+ class Spoom::Deadcode::Definition < ::T::Struct
1454
+ const :kind, ::Spoom::Deadcode::Definition::Kind
1455
+ const :name, ::String
1456
+ const :full_name, ::String
1457
+ const :location, ::Spoom::Deadcode::Location
1458
+ const :status, ::Spoom::Deadcode::Definition::Status, default: T.unsafe(nil)
1459
+
1460
+ # source://spoom//lib/spoom/deadcode/definition.rb#78
1461
+ sig { void }
1462
+ def alive!; end
1463
+
1464
+ # Status
1465
+ #
1466
+ # source://spoom//lib/spoom/deadcode/definition.rb#73
1467
+ sig { returns(T::Boolean) }
1468
+ def alive?; end
1469
+
1470
+ # Kind
1471
+ #
1472
+ # source://spoom//lib/spoom/deadcode/definition.rb#41
1473
+ sig { returns(T::Boolean) }
1474
+ def attr_reader?; end
1475
+
1476
+ # source://spoom//lib/spoom/deadcode/definition.rb#46
1477
+ sig { returns(T::Boolean) }
1478
+ def attr_writer?; end
1479
+
1480
+ # source://spoom//lib/spoom/deadcode/definition.rb#51
1481
+ sig { returns(T::Boolean) }
1482
+ def class?; end
1483
+
1484
+ # source://spoom//lib/spoom/deadcode/definition.rb#56
1485
+ sig { returns(T::Boolean) }
1486
+ def constant?; end
1487
+
1488
+ # source://spoom//lib/spoom/deadcode/definition.rb#83
1489
+ sig { returns(T::Boolean) }
1490
+ def dead?; end
1491
+
1492
+ # source://spoom//lib/spoom/deadcode/definition.rb#93
1493
+ sig { void }
1494
+ def ignored!; end
1495
+
1496
+ # source://spoom//lib/spoom/deadcode/definition.rb#88
1497
+ sig { returns(T::Boolean) }
1498
+ def ignored?; end
1499
+
1500
+ # source://spoom//lib/spoom/deadcode/definition.rb#61
1501
+ sig { returns(T::Boolean) }
1502
+ def method?; end
1503
+
1504
+ # source://spoom//lib/spoom/deadcode/definition.rb#66
1505
+ sig { returns(T::Boolean) }
1506
+ def module?; end
1507
+
1508
+ # Utils
1509
+ #
1510
+ # source://spoom//lib/spoom/deadcode/definition.rb#100
1511
+ sig { params(args: T.untyped).returns(::String) }
1512
+ def to_json(*args); end
1513
+
1514
+ class << self
1515
+ # source://sorbet-runtime/0.5.11406/lib/types/struct.rb#13
1516
+ def inherited(s); end
1517
+ end
1518
+ end
1519
+
1520
+ # source://spoom//lib/spoom/deadcode/definition.rb#10
1521
+ class Spoom::Deadcode::Definition::Kind < ::T::Enum
1522
+ enums do
1523
+ AttrReader = new
1524
+ AttrWriter = new
1525
+ Class = new
1526
+ Constant = new
1527
+ Method = new
1528
+ Module = new
1529
+ end
1530
+ end
1531
+
1532
+ # source://spoom//lib/spoom/deadcode/definition.rb#21
1533
+ class Spoom::Deadcode::Definition::Status < ::T::Enum
1534
+ enums do
1535
+ ALIVE = new
1536
+ DEAD = new
1537
+ IGNORED = new
1538
+ end
1539
+ end
1540
+
1541
+ # Custom engine to handle ERB templates as used by Rails
1542
+ #
1543
+ # source://spoom//lib/spoom/deadcode/erb.rb#29
1544
+ class Spoom::Deadcode::ERB < ::Erubi::Engine
1545
+ # source://spoom//lib/spoom/deadcode/erb.rb#33
1546
+ sig { params(input: T.untyped, properties: T.untyped).void }
1547
+ def initialize(input, properties = T.unsafe(nil)); end
1548
+
1549
+ private
1550
+
1551
+ # source://spoom//lib/spoom/deadcode/erb.rb#83
1552
+ sig { override.params(code: T.untyped).void }
1553
+ def add_code(code); end
1554
+
1555
+ # source://spoom//lib/spoom/deadcode/erb.rb#66
1556
+ sig { override.params(indicator: T.untyped, code: T.untyped).void }
1557
+ def add_expression(indicator, code); end
1558
+
1559
+ # source://spoom//lib/spoom/deadcode/erb.rb#89
1560
+ sig { override.params(_: T.untyped).void }
1561
+ def add_postamble(_); end
1562
+
1563
+ # source://spoom//lib/spoom/deadcode/erb.rb#48
1564
+ sig { override.params(text: T.untyped).void }
1565
+ def add_text(text); end
1566
+
1567
+ # source://spoom//lib/spoom/deadcode/erb.rb#95
1568
+ sig { params(src: T.untyped).void }
1569
+ def flush_newline_if_pending(src); end
1570
+ end
1571
+
1572
+ # source://spoom//lib/spoom/deadcode/erb.rb#63
1573
+ Spoom::Deadcode::ERB::BLOCK_EXPR = T.let(T.unsafe(nil), Regexp)
1574
+
1575
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
1576
+ #
1577
+ # source://spoom//lib/spoom/deadcode.rb#21
1578
+ class Spoom::Deadcode::Error < ::Spoom::Error
1579
+ abstract!
1580
+ end
1581
+
1582
+ # source://spoom//lib/spoom/deadcode/index.rb#6
1583
+ class Spoom::Deadcode::Index
1584
+ # source://spoom//lib/spoom/deadcode/index.rb#16
1585
+ sig { void }
1586
+ def initialize; end
1587
+
1588
+ # source://spoom//lib/spoom/deadcode/index.rb#51
1589
+ sig { returns(T::Array[::Spoom::Deadcode::Definition]) }
1590
+ def all_definitions; end
1591
+
1592
+ # source://spoom//lib/spoom/deadcode/index.rb#56
1593
+ sig { returns(T::Array[::Spoom::Deadcode::Reference]) }
1594
+ def all_references; end
1595
+
1596
+ # Indexing
1597
+ #
1598
+ # source://spoom//lib/spoom/deadcode/index.rb#24
1599
+ sig { params(definition: ::Spoom::Deadcode::Definition).void }
1600
+ def define(definition); end
1601
+
1602
+ # source://spoom//lib/spoom/deadcode/index.rb#10
1603
+ sig { returns(T::Hash[::String, T::Array[::Spoom::Deadcode::Definition]]) }
1604
+ def definitions; end
1605
+
1606
+ # Utils
1607
+ #
1608
+ # source://spoom//lib/spoom/deadcode/index.rb#46
1609
+ sig { params(name: ::String).returns(T::Array[::Spoom::Deadcode::Definition]) }
1610
+ def definitions_for_name(name); end
1611
+
1612
+ # Mark all definitions having a reference of the same name as `alive`
1613
+ #
1614
+ # To be called once all the files have been indexed and all the definitions and references discovered.
1615
+ #
1616
+ # source://spoom//lib/spoom/deadcode/index.rb#37
1617
+ sig { void }
1618
+ def finalize!; end
1619
+
1620
+ # source://spoom//lib/spoom/deadcode/index.rb#29
1621
+ sig { params(reference: ::Spoom::Deadcode::Reference).void }
1622
+ def reference(reference); end
1623
+
1624
+ # source://spoom//lib/spoom/deadcode/index.rb#13
1625
+ sig { returns(T::Hash[::String, T::Array[::Spoom::Deadcode::Reference]]) }
1626
+ def references; end
1627
+ end
1628
+
1629
+ # source://spoom//lib/spoom/deadcode/indexer.rb#6
1630
+ class Spoom::Deadcode::Indexer < ::Spoom::Deadcode::Visitor
1631
+ # source://spoom//lib/spoom/deadcode/indexer.rb#16
1632
+ sig do
1633
+ params(
1634
+ path: ::String,
1635
+ source: ::String,
1636
+ index: ::Spoom::Deadcode::Index,
1637
+ plugins: T::Array[::Spoom::Deadcode::Plugins::Base]
1638
+ ).void
1639
+ end
1640
+ def initialize(path, source, index, plugins: T.unsafe(nil)); end
1641
+
1642
+ # Context
1643
+ #
1644
+ # source://spoom//lib/spoom/deadcode/indexer.rb#408
1645
+ sig { returns(::Prism::Node) }
1646
+ def current_node; end
1647
+
1648
+ # Definition indexing
1649
+ #
1650
+ # source://spoom//lib/spoom/deadcode/indexer.rb#322
1651
+ sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void }
1652
+ def define_attr_reader(name, full_name, node); end
1653
+
1654
+ # source://spoom//lib/spoom/deadcode/indexer.rb#334
1655
+ sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void }
1656
+ def define_attr_writer(name, full_name, node); end
1657
+
1658
+ # source://spoom//lib/spoom/deadcode/indexer.rb#346
1659
+ sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void }
1660
+ def define_class(name, full_name, node); end
1661
+
1662
+ # source://spoom//lib/spoom/deadcode/indexer.rb#358
1663
+ sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void }
1664
+ def define_constant(name, full_name, node); end
1665
+
1666
+ # source://spoom//lib/spoom/deadcode/indexer.rb#370
1667
+ sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void }
1668
+ def define_method(name, full_name, node); end
1669
+
1670
+ # source://spoom//lib/spoom/deadcode/indexer.rb#382
1671
+ sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void }
1672
+ def define_module(name, full_name, node); end
1673
+
1674
+ # source://spoom//lib/spoom/deadcode/indexer.rb#13
1675
+ sig { returns(::Spoom::Deadcode::Index) }
1676
+ def index; end
1677
+
1678
+ # source://spoom//lib/spoom/deadcode/indexer.rb#453
1679
+ sig { returns(T.nilable(::String)) }
1680
+ def last_sig; end
1681
+
1682
+ # source://spoom//lib/spoom/deadcode/indexer.rb#427
1683
+ sig { returns(T.nilable(::Prism::BlockNode)) }
1684
+ def nesting_block; end
1685
+
1686
+ # source://spoom//lib/spoom/deadcode/indexer.rb#432
1687
+ sig { returns(T.nilable(::Prism::CallNode)) }
1688
+ def nesting_call; end
1689
+
1690
+ # source://spoom//lib/spoom/deadcode/indexer.rb#422
1691
+ sig { returns(T.nilable(::Prism::ClassNode)) }
1692
+ def nesting_class; end
1693
+
1694
+ # source://spoom//lib/spoom/deadcode/indexer.rb#437
1695
+ sig { returns(T.nilable(::String)) }
1696
+ def nesting_class_name; end
1697
+
1698
+ # source://spoom//lib/spoom/deadcode/indexer.rb#445
1699
+ sig { returns(T.nilable(::String)) }
1700
+ def nesting_class_superclass_name; end
1701
+
1702
+ # source://spoom//lib/spoom/deadcode/indexer.rb#413
1703
+ sig { type_parameters(:N).params(type: T::Class[T.type_parameter(:N)]).returns(T.nilable(T.type_parameter(:N))) }
1704
+ def nesting_node(type); end
1705
+
1706
+ # Node utils
1707
+ #
1708
+ # source://spoom//lib/spoom/deadcode/indexer.rb#464
1709
+ sig { params(node: ::Prism::Node).returns(::Spoom::Deadcode::Location) }
1710
+ def node_location(node); end
1711
+
1712
+ # source://spoom//lib/spoom/deadcode/indexer.rb#10
1713
+ sig { returns(::String) }
1714
+ def path; end
1715
+
1716
+ # Reference indexing
1717
+ #
1718
+ # source://spoom//lib/spoom/deadcode/indexer.rb#396
1719
+ sig { params(name: ::String, node: ::Prism::Node).void }
1720
+ def reference_constant(name, node); end
1721
+
1722
+ # source://spoom//lib/spoom/deadcode/indexer.rb#401
1723
+ sig { params(name: ::String, node: ::Prism::Node).void }
1724
+ def reference_method(name, node); end
1725
+
1726
+ # Visit
1727
+ #
1728
+ # source://spoom//lib/spoom/deadcode/indexer.rb#35
1729
+ sig { override.params(node: T.nilable(::Prism::Node)).void }
1730
+ def visit(node); end
1731
+
1732
+ # source://spoom//lib/spoom/deadcode/indexer.rb#45
1733
+ sig { override.params(node: ::Prism::AliasMethodNode).void }
1734
+ def visit_alias_method_node(node); end
1735
+
1736
+ # source://spoom//lib/spoom/deadcode/indexer.rb#50
1737
+ sig { override.params(node: ::Prism::AndNode).void }
1738
+ def visit_and_node(node); end
1739
+
1740
+ # source://spoom//lib/spoom/deadcode/indexer.rb#56
1741
+ sig { override.params(node: ::Prism::BlockArgumentNode).void }
1742
+ def visit_block_argument_node(node); end
1743
+
1744
+ # source://spoom//lib/spoom/deadcode/indexer.rb#67
1745
+ sig { override.params(node: ::Prism::CallAndWriteNode).void }
1746
+ def visit_call_and_write_node(node); end
1747
+
1748
+ # source://spoom//lib/spoom/deadcode/indexer.rb#91
1749
+ sig { override.params(node: ::Prism::CallNode).void }
1750
+ def visit_call_node(node); end
1751
+
1752
+ # source://spoom//lib/spoom/deadcode/indexer.rb#75
1753
+ sig { override.params(node: ::Prism::CallOperatorWriteNode).void }
1754
+ def visit_call_operator_write_node(node); end
1755
+
1756
+ # source://spoom//lib/spoom/deadcode/indexer.rb#83
1757
+ sig { override.params(node: ::Prism::CallOrWriteNode).void }
1758
+ def visit_call_or_write_node(node); end
1759
+
1760
+ # source://spoom//lib/spoom/deadcode/indexer.rb#104
1761
+ sig { override.params(node: ::Prism::ClassNode).void }
1762
+ def visit_class_node(node); end
1763
+
1764
+ # source://spoom//lib/spoom/deadcode/indexer.rb#137
1765
+ sig { override.params(node: ::Prism::ConstantAndWriteNode).void }
1766
+ def visit_constant_and_write_node(node); end
1767
+
1768
+ # source://spoom//lib/spoom/deadcode/indexer.rb#143
1769
+ sig { override.params(node: ::Prism::ConstantOperatorWriteNode).void }
1770
+ def visit_constant_operator_write_node(node); end
1771
+
1772
+ # source://spoom//lib/spoom/deadcode/indexer.rb#149
1773
+ sig { override.params(node: ::Prism::ConstantOrWriteNode).void }
1774
+ def visit_constant_or_write_node(node); end
1775
+
1776
+ # source://spoom//lib/spoom/deadcode/indexer.rb#155
1777
+ sig { override.params(node: ::Prism::ConstantPathWriteNode).void }
1778
+ def visit_constant_path_write_node(node); end
1779
+
1780
+ # source://spoom//lib/spoom/deadcode/indexer.rb#173
1781
+ sig { override.params(node: ::Prism::ConstantReadNode).void }
1782
+ def visit_constant_read_node(node); end
1783
+
1784
+ # source://spoom//lib/spoom/deadcode/indexer.rb#178
1785
+ sig { override.params(node: ::Prism::ConstantWriteNode).void }
1786
+ def visit_constant_write_node(node); end
1787
+
1788
+ # source://spoom//lib/spoom/deadcode/indexer.rb#186
1789
+ sig { override.params(node: ::Prism::DefNode).void }
1790
+ def visit_def_node(node); end
1791
+
1792
+ # source://spoom//lib/spoom/deadcode/indexer.rb#194
1793
+ sig { override.params(node: ::Prism::LocalVariableAndWriteNode).void }
1794
+ def visit_local_variable_and_write_node(node); end
1795
+
1796
+ # source://spoom//lib/spoom/deadcode/indexer.rb#202
1797
+ sig { override.params(node: ::Prism::LocalVariableOperatorWriteNode).void }
1798
+ def visit_local_variable_operator_write_node(node); end
1799
+
1800
+ # source://spoom//lib/spoom/deadcode/indexer.rb#210
1801
+ sig { override.params(node: ::Prism::LocalVariableOrWriteNode).void }
1802
+ def visit_local_variable_or_write_node(node); end
1803
+
1804
+ # source://spoom//lib/spoom/deadcode/indexer.rb#218
1805
+ sig { override.params(node: ::Prism::LocalVariableWriteNode).void }
1806
+ def visit_local_variable_write_node(node); end
1807
+
1808
+ # source://spoom//lib/spoom/deadcode/indexer.rb#224
1809
+ sig { override.params(node: ::Prism::ModuleNode).void }
1810
+ def visit_module_node(node); end
1811
+
1812
+ # source://spoom//lib/spoom/deadcode/indexer.rb#254
1813
+ sig { override.params(node: ::Prism::MultiWriteNode).void }
1814
+ def visit_multi_write_node(node); end
1815
+
1816
+ # source://spoom//lib/spoom/deadcode/indexer.rb#268
1817
+ sig { override.params(node: ::Prism::OrNode).void }
1818
+ def visit_or_node(node); end
1819
+
1820
+ # source://spoom//lib/spoom/deadcode/indexer.rb#274
1821
+ sig { params(send: ::Spoom::Deadcode::Send).void }
1822
+ def visit_send(send); end
1823
+ end
1824
+
1825
+ # source://spoom//lib/spoom/deadcode.rb#29
1826
+ class Spoom::Deadcode::IndexerError < ::Spoom::Deadcode::Error
1827
+ # source://spoom//lib/spoom/deadcode.rb#33
1828
+ sig { params(message: ::String, parent: ::Exception).void }
1829
+ def initialize(message, parent:); end
1830
+ end
1831
+
1832
+ # source://spoom//lib/spoom/deadcode/location.rb#6
1833
+ class Spoom::Deadcode::Location
1834
+ include ::Comparable
1835
+
1836
+ # source://spoom//lib/spoom/deadcode/location.rb#54
1837
+ sig do
1838
+ params(
1839
+ file: ::String,
1840
+ start_line: ::Integer,
1841
+ start_column: ::Integer,
1842
+ end_line: ::Integer,
1843
+ end_column: ::Integer
1844
+ ).void
1845
+ end
1846
+ def initialize(file, start_line, start_column, end_line, end_column); end
1847
+
1848
+ # source://spoom//lib/spoom/deadcode/location.rb#74
1849
+ sig { override.params(other: ::BasicObject).returns(T.nilable(::Integer)) }
1850
+ def <=>(other); end
1851
+
1852
+ # @return [Integer]
1853
+ #
1854
+ # source://spoom//lib/spoom/deadcode/location.rb#43
1855
+ def end_column; end
1856
+
1857
+ # @return [Integer]
1858
+ #
1859
+ # source://spoom//lib/spoom/deadcode/location.rb#43
1860
+ def end_line; end
1861
+
1862
+ # source://spoom//lib/spoom/deadcode/location.rb#40
1863
+ sig { returns(::String) }
1864
+ def file; end
1865
+
1866
+ # source://spoom//lib/spoom/deadcode/location.rb#63
1867
+ sig { params(other: ::Spoom::Deadcode::Location).returns(T::Boolean) }
1868
+ def include?(other); end
1869
+
1870
+ # @return [Integer]
1871
+ #
1872
+ # source://spoom//lib/spoom/deadcode/location.rb#43
1873
+ def start_column; end
1874
+
1875
+ # source://spoom//lib/spoom/deadcode/location.rb#43
1876
+ sig { returns(::Integer) }
1877
+ def start_line; end
1878
+
1879
+ # source://spoom//lib/spoom/deadcode/location.rb#81
1880
+ sig { returns(::String) }
1881
+ def to_s; end
1882
+
1883
+ class << self
1884
+ # source://spoom//lib/spoom/deadcode/location.rb#34
1885
+ sig { params(file: ::String, location: ::Prism::Location).returns(::Spoom::Deadcode::Location) }
1886
+ def from_prism(file, location); end
1887
+
1888
+ # @raise [LocationError]
1889
+ #
1890
+ # source://spoom//lib/spoom/deadcode/location.rb#17
1891
+ sig { params(location_string: ::String).returns(::Spoom::Deadcode::Location) }
1892
+ def from_string(location_string); end
1893
+ end
1894
+ end
1895
+
1896
+ # source://spoom//lib/spoom/deadcode/location.rb#11
1897
+ class Spoom::Deadcode::Location::LocationError < ::Spoom::Error; end
1898
+
1899
+ # source://spoom//lib/spoom/deadcode/plugins.rb#36
1900
+ Spoom::Deadcode::PLUGINS_FOR_GEM = T.let(T.unsafe(nil), Hash)
1901
+
1902
+ # source://spoom//lib/spoom/deadcode.rb#27
1903
+ class Spoom::Deadcode::ParserError < ::Spoom::Deadcode::Error; end
1904
+
1905
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#8
1906
+ module Spoom::Deadcode::Plugins; end
1907
+
1908
+ # source://spoom//lib/spoom/deadcode/plugins/action_mailer.rb#7
1909
+ class Spoom::Deadcode::Plugins::ActionMailer < ::Spoom::Deadcode::Plugins::Base
1910
+ # source://spoom//lib/spoom/deadcode/plugins/action_mailer.rb#11
1911
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void }
1912
+ def on_send(indexer, send); end
1913
+ end
1914
+
1915
+ # source://spoom//lib/spoom/deadcode/plugins/action_mailer_preview.rb#7
1916
+ class Spoom::Deadcode::Plugins::ActionMailerPreview < ::Spoom::Deadcode::Plugins::Base
1917
+ # source://spoom//lib/spoom/deadcode/plugins/action_mailer_preview.rb#13
1918
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
1919
+ def on_define_method(indexer, definition); end
1920
+ end
1921
+
1922
+ # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#7
1923
+ class Spoom::Deadcode::Plugins::ActionPack < ::Spoom::Deadcode::Plugins::Base
1924
+ # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#31
1925
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
1926
+ def on_define_method(indexer, definition); end
1927
+
1928
+ # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#36
1929
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void }
1930
+ def on_send(indexer, send); end
1931
+ end
1932
+
1933
+ # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#10
1934
+ Spoom::Deadcode::Plugins::ActionPack::CALLBACKS = T.let(T.unsafe(nil), Array)
1935
+
1936
+ # source://spoom//lib/spoom/deadcode/plugins/active_job.rb#7
1937
+ class Spoom::Deadcode::Plugins::ActiveJob < ::Spoom::Deadcode::Plugins::Base; end
1938
+
1939
+ # source://spoom//lib/spoom/deadcode/plugins/active_model.rb#7
1940
+ class Spoom::Deadcode::Plugins::ActiveModel < ::Spoom::Deadcode::Plugins::Base
1941
+ # source://spoom//lib/spoom/deadcode/plugins/active_model.rb#14
1942
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void }
1943
+ def on_send(indexer, send); end
1944
+ end
1945
+
1946
+ # source://spoom//lib/spoom/deadcode/plugins/active_record.rb#7
1947
+ class Spoom::Deadcode::Plugins::ActiveRecord < ::Spoom::Deadcode::Plugins::Base
1948
+ # source://spoom//lib/spoom/deadcode/plugins/active_record.rb#74
1949
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void }
1950
+ def on_send(indexer, send); end
1951
+ end
1952
+
1953
+ # source://spoom//lib/spoom/deadcode/plugins/active_record.rb#64
1954
+ Spoom::Deadcode::Plugins::ActiveRecord::ARRAY_METHODS = T.let(T.unsafe(nil), Array)
1955
+
1956
+ # source://spoom//lib/spoom/deadcode/plugins/active_record.rb#20
1957
+ Spoom::Deadcode::Plugins::ActiveRecord::CALLBACKS = T.let(T.unsafe(nil), Array)
1958
+
1959
+ # source://spoom//lib/spoom/deadcode/plugins/active_record.rb#49
1960
+ Spoom::Deadcode::Plugins::ActiveRecord::CRUD_METHODS = T.let(T.unsafe(nil), Array)
1961
+
1962
+ # source://spoom//lib/spoom/deadcode/plugins/active_support.rb#7
1963
+ class Spoom::Deadcode::Plugins::ActiveSupport < ::Spoom::Deadcode::Plugins::Base
1964
+ # source://spoom//lib/spoom/deadcode/plugins/active_support.rb#22
1965
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void }
1966
+ def on_send(indexer, send); end
1967
+ end
1968
+
1969
+ # source://spoom//lib/spoom/deadcode/plugins/active_support.rb#19
1970
+ Spoom::Deadcode::Plugins::ActiveSupport::SETUP_AND_TEARDOWN_METHODS = T.let(T.unsafe(nil), Array)
1971
+
1972
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
1973
+ #
1974
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#9
1975
+ class Spoom::Deadcode::Plugins::Base
1976
+ abstract!
1977
+
1978
+ # Do not override this method, use `on_define_accessor` instead.
1979
+ #
1980
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#150
1981
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
1982
+ def internal_on_define_accessor(indexer, definition); end
1983
+
1984
+ # Do not override this method, use `on_define_class` instead.
1985
+ #
1986
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#174
1987
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
1988
+ def internal_on_define_class(indexer, definition); end
1989
+
1990
+ # Do not override this method, use `on_define_constant` instead.
1991
+ #
1992
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#204
1993
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
1994
+ def internal_on_define_constant(indexer, definition); end
1995
+
1996
+ # Do not override this method, use `on_define_method` instead.
1997
+ #
1998
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#232
1999
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2000
+ def internal_on_define_method(indexer, definition); end
2001
+
2002
+ # Do not override this method, use `on_define_module` instead.
2003
+ #
2004
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#258
2005
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2006
+ def internal_on_define_module(indexer, definition); end
2007
+
2008
+ # Do not override this method, use `on_send` instead.
2009
+ #
2010
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#284
2011
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void }
2012
+ def internal_on_send(indexer, send); end
2013
+
2014
+ # Called when an accessor is defined.
2015
+ #
2016
+ # Will be called when the indexer processes a `attr_reader`, `attr_writer` or `attr_accessor` node.
2017
+ # Note that when this method is called, the definition for the node has already been added to the index.
2018
+ # It is still possible to ignore it from the plugin:
2019
+ #
2020
+ # ~~~rb
2021
+ # class MyPlugin < Spoom::Deadcode::Plugins::Base
2022
+ # def on_define_accessor(indexer, definition)
2023
+ # definition.ignored! if definition.name == "foo"
2024
+ # end
2025
+ # end
2026
+ # ~~~
2027
+ #
2028
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#144
2029
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2030
+ def on_define_accessor(indexer, definition); end
2031
+
2032
+ # Called when a class is defined.
2033
+ #
2034
+ # Will be called when the indexer processes a `class` node.
2035
+ # Note that when this method is called, the definition for the node has already been added to the index.
2036
+ # It is still possible to ignore it from the plugin:
2037
+ #
2038
+ # ~~~rb
2039
+ # class MyPlugin < Spoom::Deadcode::Plugins::Base
2040
+ # def on_define_class(indexer, definition)
2041
+ # definition.ignored! if definition.name == "Foo"
2042
+ # end
2043
+ # end
2044
+ # ~~~
2045
+ #
2046
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#168
2047
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2048
+ def on_define_class(indexer, definition); end
2049
+
2050
+ # Called when a constant is defined.
2051
+ #
2052
+ # Will be called when the indexer processes a `CONST =` node.
2053
+ # Note that when this method is called, the definition for the node has already been added to the index.
2054
+ # It is still possible to ignore it from the plugin:
2055
+ #
2056
+ # ~~~rb
2057
+ # class MyPlugin < Spoom::Deadcode::Plugins::Base
2058
+ # def on_define_constant(indexer, definition)
2059
+ # definition.ignored! if definition.name == "FOO"
2060
+ # end
2061
+ # end
2062
+ # ~~~
2063
+ #
2064
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#198
2065
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2066
+ def on_define_constant(indexer, definition); end
2067
+
2068
+ # Called when a method is defined.
2069
+ #
2070
+ # Will be called when the indexer processes a `def` or `defs` node.
2071
+ # Note that when this method is called, the definition for the node has already been added to the index.
2072
+ # It is still possible to ignore it from the plugin:
2073
+ #
2074
+ # ~~~rb
2075
+ # class MyPlugin < Spoom::Deadcode::Plugins::Base
2076
+ # def on_define_method(indexer, definition)
2077
+ # super # So the `ignore_method_names` DSL is still applied
2078
+ #
2079
+ # definition.ignored! if definition.name == "foo"
2080
+ # end
2081
+ # end
2082
+ # ~~~
2083
+ #
2084
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#226
2085
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2086
+ def on_define_method(indexer, definition); end
2087
+
2088
+ # Called when a module is defined.
2089
+ #
2090
+ # Will be called when the indexer processes a `module` node.
2091
+ # Note that when this method is called, the definition for the node has already been added to the index.
2092
+ # It is still possible to ignore it from the plugin:
2093
+ #
2094
+ # ~~~rb
2095
+ # class MyPlugin < Spoom::Deadcode::Plugins::Base
2096
+ # def on_define_module(indexer, definition)
2097
+ # definition.ignored! if definition.name == "Foo"
2098
+ # end
2099
+ # end
2100
+ # ~~~
2101
+ #
2102
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#252
2103
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2104
+ def on_define_module(indexer, definition); end
2105
+
2106
+ # Called when a send is being processed
2107
+ #
2108
+ # ~~~rb
2109
+ # class MyPlugin < Spoom::Deadcode::Plugins::Base
2110
+ # def on_send(indexer, send)
2111
+ # return unless send.name == "dsl_method"
2112
+ # return if send.args.empty?
2113
+ #
2114
+ # method_name = send.args.first.slice.delete_prefix(":")
2115
+ # indexer.reference_method(method_name, send.node)
2116
+ # end
2117
+ # end
2118
+ # ~~~
2119
+ #
2120
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#278
2121
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void }
2122
+ def on_send(indexer, send); end
2123
+
2124
+ private
2125
+
2126
+ # Plugin utils
2127
+ #
2128
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#339
2129
+ sig { params(name: ::String).returns(::String) }
2130
+ def camelize(name); end
2131
+
2132
+ # DSL support
2133
+ #
2134
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#293
2135
+ sig { params(name: T.nilable(::String)).returns(T::Boolean) }
2136
+ def ignored_class_name?(name); end
2137
+
2138
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#307
2139
+ sig { params(name: ::String).returns(T::Boolean) }
2140
+ def ignored_constant_name?(name); end
2141
+
2142
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#312
2143
+ sig { params(name: ::String).returns(T::Boolean) }
2144
+ def ignored_method_name?(name); end
2145
+
2146
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#317
2147
+ sig { params(name: ::String).returns(T::Boolean) }
2148
+ def ignored_module_name?(name); end
2149
+
2150
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#322
2151
+ sig { params(name: ::String, names_variable: ::Symbol, patterns_variable: ::Symbol).returns(T::Boolean) }
2152
+ def ignored_name?(name, names_variable, patterns_variable); end
2153
+
2154
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#300
2155
+ sig { params(superclass_name: T.nilable(::String)).returns(T::Boolean) }
2156
+ def ignored_subclass?(superclass_name); end
2157
+
2158
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#327
2159
+ sig { params(const: ::Symbol).returns(T::Set[::String]) }
2160
+ def names(const); end
2161
+
2162
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#332
2163
+ sig { params(const: ::Symbol).returns(T::Array[::Regexp]) }
2164
+ def patterns(const); end
2165
+
2166
+ class << self
2167
+ # Mark classes directly subclassing a class matching `names` as ignored.
2168
+ #
2169
+ # Names can be either strings or regexps:
2170
+ #
2171
+ # ~~~rb
2172
+ # class MyPlugin < Spoom::Deadcode::Plugins::Base
2173
+ # ignore_classes_inheriting_from(
2174
+ # "Foo",
2175
+ # "Bar",
2176
+ # /Baz.*/,
2177
+ # )
2178
+ # end
2179
+ # ~~~
2180
+ #
2181
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#52
2182
+ sig { params(names: T.any(::Regexp, ::String)).void }
2183
+ def ignore_classes_inheriting_from(*names); end
2184
+
2185
+ # Mark classes matching `names` as ignored.
2186
+ #
2187
+ # Names can be either strings or regexps:
2188
+ #
2189
+ # ~~~rb
2190
+ # class MyPlugin < Spoom::Deadcode::Plugins::Base
2191
+ # ignore_class_names(
2192
+ # "Foo",
2193
+ # "Bar",
2194
+ # /Baz.*/,
2195
+ # )
2196
+ # end
2197
+ # ~~~
2198
+ #
2199
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#34
2200
+ sig { params(names: T.any(::Regexp, ::String)).void }
2201
+ def ignore_classes_named(*names); end
2202
+
2203
+ # Mark constants matching `names` as ignored.
2204
+ #
2205
+ # Names can be either strings or regexps:
2206
+ #
2207
+ # ~~~rb
2208
+ # class MyPlugin < Spoom::Deadcode::Plugins::Base
2209
+ # ignore_class_names(
2210
+ # "FOO",
2211
+ # "BAR",
2212
+ # /BAZ.*/,
2213
+ # )
2214
+ # end
2215
+ # ~~~
2216
+ #
2217
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#70
2218
+ sig { params(names: T.any(::Regexp, ::String)).void }
2219
+ def ignore_constants_named(*names); end
2220
+
2221
+ # Mark methods matching `names` as ignored.
2222
+ #
2223
+ # Names can be either strings or regexps:
2224
+ #
2225
+ # ~~~rb
2226
+ # class MyPlugin < Spoom::Deadcode::Plugins::Base
2227
+ # ignore_method_names(
2228
+ # "foo",
2229
+ # "bar",
2230
+ # /baz.*/,
2231
+ # )
2232
+ # end
2233
+ # ~~~
2234
+ #
2235
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#88
2236
+ sig { params(names: T.any(::Regexp, ::String)).void }
2237
+ def ignore_methods_named(*names); end
2238
+
2239
+ # Mark modules matching `names` as ignored.
2240
+ #
2241
+ # Names can be either strings or regexps:
2242
+ #
2243
+ # ~~~rb
2244
+ # class MyPlugin < Spoom::Deadcode::Plugins::Base
2245
+ # ignore_class_names(
2246
+ # "Foo",
2247
+ # "Bar",
2248
+ # /Baz.*/,
2249
+ # )
2250
+ # end
2251
+ # ~~~
2252
+ #
2253
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#106
2254
+ sig { params(names: T.any(::Regexp, ::String)).void }
2255
+ def ignore_modules_named(*names); end
2256
+
2257
+ private
2258
+
2259
+ # source://spoom//lib/spoom/deadcode/plugins/base.rb#113
2260
+ sig do
2261
+ params(
2262
+ names: T::Array[T.any(::Regexp, ::String)],
2263
+ names_variable: ::Symbol,
2264
+ patterns_variable: ::Symbol
2265
+ ).void
2266
+ end
2267
+ def save_names_and_patterns(names, names_variable, patterns_variable); end
2268
+ end
2269
+ end
2270
+
2271
+ # source://spoom//lib/spoom/deadcode/plugins/graphql.rb#7
2272
+ class Spoom::Deadcode::Plugins::GraphQL < ::Spoom::Deadcode::Plugins::Base
2273
+ # source://spoom//lib/spoom/deadcode/plugins/graphql.rb#28
2274
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void }
2275
+ def on_send(indexer, send); end
2276
+ end
2277
+
2278
+ # source://spoom//lib/spoom/deadcode/plugins/minitest.rb#7
2279
+ class Spoom::Deadcode::Plugins::Minitest < ::Spoom::Deadcode::Plugins::Base
2280
+ # source://spoom//lib/spoom/deadcode/plugins/minitest.rb#22
2281
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2282
+ def on_define_method(indexer, definition); end
2283
+ end
2284
+
2285
+ # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#7
2286
+ class Spoom::Deadcode::Plugins::Namespaces < ::Spoom::Deadcode::Plugins::Base
2287
+ # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#11
2288
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2289
+ def on_define_class(indexer, definition); end
2290
+
2291
+ # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#16
2292
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2293
+ def on_define_module(indexer, definition); end
2294
+
2295
+ private
2296
+
2297
+ # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#23
2298
+ sig { params(indexer: ::Spoom::Deadcode::Indexer).returns(T::Boolean) }
2299
+ def used_as_namespace?(indexer); end
2300
+ end
2301
+
2302
+ # source://spoom//lib/spoom/deadcode/plugins/rspec.rb#7
2303
+ class Spoom::Deadcode::Plugins::RSpec < ::Spoom::Deadcode::Plugins::Base; end
2304
+
2305
+ # source://spoom//lib/spoom/deadcode/plugins/rails.rb#7
2306
+ class Spoom::Deadcode::Plugins::Rails < ::Spoom::Deadcode::Plugins::Base
2307
+ # source://spoom//lib/spoom/deadcode/plugins/rails.rb#13
2308
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2309
+ def on_define_class(indexer, definition); end
2310
+
2311
+ # source://spoom//lib/spoom/deadcode/plugins/rails.rb#18
2312
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2313
+ def on_define_module(indexer, definition); end
2314
+
2315
+ private
2316
+
2317
+ # source://spoom//lib/spoom/deadcode/plugins/rails.rb#25
2318
+ sig { params(indexer: ::Spoom::Deadcode::Indexer).returns(T::Boolean) }
2319
+ def file_is_helper?(indexer); end
2320
+ end
2321
+
2322
+ # source://spoom//lib/spoom/deadcode/plugins/rake.rb#7
2323
+ class Spoom::Deadcode::Plugins::Rake < ::Spoom::Deadcode::Plugins::Base; end
2324
+
2325
+ # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#7
2326
+ class Spoom::Deadcode::Plugins::Rubocop < ::Spoom::Deadcode::Plugins::Base
2327
+ # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#18
2328
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2329
+ def on_define_constant(indexer, definition); end
2330
+
2331
+ # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#23
2332
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2333
+ def on_define_method(indexer, definition); end
2334
+
2335
+ private
2336
+
2337
+ # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#30
2338
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) }
2339
+ def rubocop_constant?(indexer, definition); end
2340
+
2341
+ # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#35
2342
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) }
2343
+ def rubocop_method?(indexer, definition); end
2344
+ end
2345
+
2346
+ # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#10
2347
+ Spoom::Deadcode::Plugins::Rubocop::RUBOCOP_CONSTANTS = T.let(T.unsafe(nil), Set)
2348
+
2349
+ # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#7
2350
+ class Spoom::Deadcode::Plugins::Ruby < ::Spoom::Deadcode::Plugins::Base
2351
+ # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#24
2352
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void }
2353
+ def on_send(indexer, send); end
2354
+
2355
+ private
2356
+
2357
+ # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#43
2358
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send, node: ::Prism::Node).void }
2359
+ def reference_symbol_as_constant(indexer, send, node); end
2360
+ end
2361
+
2362
+ # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#7
2363
+ class Spoom::Deadcode::Plugins::Sorbet < ::Spoom::Deadcode::Plugins::Base
2364
+ # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#11
2365
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2366
+ def on_define_constant(indexer, definition); end
2367
+
2368
+ # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#16
2369
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2370
+ def on_define_method(indexer, definition); end
2371
+
2372
+ private
2373
+
2374
+ # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#34
2375
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) }
2376
+ def sorbet_enum_constant?(indexer, definition); end
2377
+
2378
+ # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#23
2379
+ sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) }
2380
+ def sorbet_type_member?(indexer, definition); end
2381
+ end
2382
+
2383
+ # source://spoom//lib/spoom/deadcode/plugins/thor.rb#7
2384
+ class Spoom::Deadcode::Plugins::Thor < ::Spoom::Deadcode::Plugins::Base
2385
+ # source://spoom//lib/spoom/deadcode/plugins/thor.rb#13
2386
+ sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
2387
+ def on_define_method(indexer, definition); end
2388
+ end
2389
+
2390
+ # A reference is a call to a method or a constant
2391
+ #
2392
+ # source://spoom//lib/spoom/deadcode/reference.rb#7
2393
+ class Spoom::Deadcode::Reference < ::T::Struct
2394
+ const :kind, ::Spoom::Deadcode::Reference::Kind
2395
+ const :name, ::String
2396
+ const :location, ::Spoom::Deadcode::Location
2397
+
2398
+ # Kind
2399
+ #
2400
+ # source://spoom//lib/spoom/deadcode/reference.rb#24
2401
+ sig { returns(T::Boolean) }
2402
+ def constant?; end
2403
+
2404
+ # source://spoom//lib/spoom/deadcode/reference.rb#29
2405
+ sig { returns(T::Boolean) }
2406
+ def method?; end
2407
+
2408
+ class << self
2409
+ # source://sorbet-runtime/0.5.11406/lib/types/struct.rb#13
2410
+ def inherited(s); end
2411
+ end
2412
+ end
2413
+
2414
+ # source://spoom//lib/spoom/deadcode/reference.rb#10
2415
+ class Spoom::Deadcode::Reference::Kind < ::T::Enum
2416
+ enums do
2417
+ Constant = new
2418
+ Method = new
2419
+ end
2420
+ end
2421
+
2422
+ # source://spoom//lib/spoom/deadcode/remover.rb#6
2423
+ class Spoom::Deadcode::Remover
2424
+ # source://spoom//lib/spoom/deadcode/remover.rb#12
2425
+ sig { params(context: ::Spoom::Context).void }
2426
+ def initialize(context); end
2427
+
2428
+ # source://spoom//lib/spoom/deadcode/remover.rb#17
2429
+ sig do
2430
+ params(
2431
+ kind: T.nilable(::Spoom::Deadcode::Definition::Kind),
2432
+ location: ::Spoom::Deadcode::Location
2433
+ ).returns(::String)
2434
+ end
2435
+ def remove_location(kind, location); end
2436
+ end
2437
+
2438
+ # source://spoom//lib/spoom/deadcode/remover.rb#9
2439
+ class Spoom::Deadcode::Remover::Error < ::Spoom::Error; end
2440
+
2441
+ # source://spoom//lib/spoom/deadcode/remover.rb#372
2442
+ class Spoom::Deadcode::Remover::NodeContext
2443
+ # source://spoom//lib/spoom/deadcode/remover.rb#392
2444
+ sig do
2445
+ params(
2446
+ source: ::String,
2447
+ comments: T::Hash[::Integer, ::Prism::Comment],
2448
+ node: ::Prism::Node,
2449
+ nesting: T::Array[::Prism::Node]
2450
+ ).void
2451
+ end
2452
+ def initialize(source, comments, node, nesting); end
2453
+
2454
+ # source://spoom//lib/spoom/deadcode/remover.rb#506
2455
+ sig { params(node: ::Prism::Node).returns(T::Array[::Prism::Comment]) }
2456
+ def attached_comments(node); end
2457
+
2458
+ # source://spoom//lib/spoom/deadcode/remover.rb#534
2459
+ sig { returns(T.nilable(::Prism::CallNode)) }
2460
+ def attached_sig; end
2461
+
2462
+ # source://spoom//lib/spoom/deadcode/remover.rb#521
2463
+ sig { returns(T::Array[::Prism::Node]) }
2464
+ def attached_sigs; end
2465
+
2466
+ # source://spoom//lib/spoom/deadcode/remover.rb#376
2467
+ sig { returns(T::Hash[::Integer, ::Prism::Comment]) }
2468
+ def comments; end
2469
+
2470
+ # source://spoom//lib/spoom/deadcode/remover.rb#494
2471
+ sig { params(start_line: ::Integer, end_line: ::Integer).returns(T::Array[::Prism::Comment]) }
2472
+ def comments_between_lines(start_line, end_line); end
2473
+
2474
+ # source://spoom//lib/spoom/deadcode/remover.rb#382
2475
+ sig { returns(T::Array[::Prism::Node]) }
2476
+ def nesting; end
2477
+
2478
+ # @return [Array<Prism::Node>]
2479
+ #
2480
+ # source://spoom//lib/spoom/deadcode/remover.rb#382
2481
+ def nesting=(_arg0); end
2482
+
2483
+ # source://spoom//lib/spoom/deadcode/remover.rb#444
2484
+ sig { returns(T.nilable(::Prism::Node)) }
2485
+ def next_node; end
2486
+
2487
+ # source://spoom//lib/spoom/deadcode/remover.rb#433
2488
+ sig { returns(T::Array[::Prism::Node]) }
2489
+ def next_nodes; end
2490
+
2491
+ # source://spoom//lib/spoom/deadcode/remover.rb#379
2492
+ sig { returns(::Prism::Node) }
2493
+ def node; end
2494
+
2495
+ # source://spoom//lib/spoom/deadcode/remover.rb#408
2496
+ sig { returns(::Spoom::Deadcode::Remover::NodeContext) }
2497
+ def parent_context; end
2498
+
2499
+ # source://spoom//lib/spoom/deadcode/remover.rb#400
2500
+ sig { returns(::Prism::Node) }
2501
+ def parent_node; end
2502
+
2503
+ # source://spoom//lib/spoom/deadcode/remover.rb#428
2504
+ sig { returns(T.nilable(::Prism::Node)) }
2505
+ def previous_node; end
2506
+
2507
+ # source://spoom//lib/spoom/deadcode/remover.rb#417
2508
+ sig { returns(T::Array[::Prism::Node]) }
2509
+ def previous_nodes; end
2510
+
2511
+ # source://spoom//lib/spoom/deadcode/remover.rb#449
2512
+ sig { returns(T.nilable(::Spoom::Deadcode::Remover::NodeContext)) }
2513
+ def sclass_context; end
2514
+
2515
+ # source://spoom//lib/spoom/deadcode/remover.rb#482
2516
+ sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) }
2517
+ def sorbet_extend_sig?(node); end
2518
+
2519
+ # source://spoom//lib/spoom/deadcode/remover.rb#477
2520
+ sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) }
2521
+ def sorbet_signature?(node); end
2522
+ end
2523
+
2524
+ # source://spoom//lib/spoom/deadcode/remover.rb#549
2525
+ class Spoom::Deadcode::Remover::NodeFinder < ::Spoom::Deadcode::Visitor
2526
+ # source://spoom//lib/spoom/deadcode/remover.rb#621
2527
+ sig { params(location: ::Spoom::Deadcode::Location, kind: T.nilable(::Spoom::Deadcode::Definition::Kind)).void }
2528
+ def initialize(location, kind); end
2529
+
2530
+ # source://spoom//lib/spoom/deadcode/remover.rb#615
2531
+ sig { returns(T.nilable(::Prism::Node)) }
2532
+ def node; end
2533
+
2534
+ # source://spoom//lib/spoom/deadcode/remover.rb#618
2535
+ sig { returns(T::Array[::Prism::Node]) }
2536
+ def nodes_nesting; end
2537
+
2538
+ # source://spoom//lib/spoom/deadcode/remover.rb#630
2539
+ sig { override.params(node: T.nilable(::Prism::Node)).void }
2540
+ def visit(node); end
2541
+
2542
+ class << self
2543
+ # source://spoom//lib/spoom/deadcode/remover.rb#556
2544
+ sig do
2545
+ params(
2546
+ source: ::String,
2547
+ location: ::Spoom::Deadcode::Location,
2548
+ kind: T.nilable(::Spoom::Deadcode::Definition::Kind)
2549
+ ).returns(::Spoom::Deadcode::Remover::NodeContext)
2550
+ end
2551
+ def find(source, location, kind); end
2552
+
2553
+ # source://spoom//lib/spoom/deadcode/remover.rb#590
2554
+ sig { params(node: ::Prism::Node, kind: ::Spoom::Deadcode::Definition::Kind).returns(T::Boolean) }
2555
+ def node_match_kind?(node, kind); end
2556
+ end
2557
+ end
2558
+
2559
+ # source://spoom//lib/spoom/deadcode/remover.rb#29
2560
+ class Spoom::Deadcode::Remover::NodeRemover
2561
+ # source://spoom//lib/spoom/deadcode/remover.rb#36
2562
+ sig do
2563
+ params(
2564
+ source: ::String,
2565
+ kind: T.nilable(::Spoom::Deadcode::Definition::Kind),
2566
+ location: ::Spoom::Deadcode::Location
2567
+ ).void
2568
+ end
2569
+ def initialize(source, kind, location); end
2570
+
2571
+ # source://spoom//lib/spoom/deadcode/remover.rb#46
2572
+ sig { void }
2573
+ def apply_edit; end
2574
+
2575
+ # source://spoom//lib/spoom/deadcode/remover.rb#33
2576
+ sig { returns(::String) }
2577
+ def new_source; end
2578
+
2579
+ private
2580
+
2581
+ # source://spoom//lib/spoom/deadcode/remover.rb#153
2582
+ sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void }
2583
+ def delete_attr_accessor(context); end
2584
+
2585
+ # source://spoom//lib/spoom/deadcode/remover.rb#331
2586
+ sig { params(start_char: ::Integer, end_char: ::Integer).void }
2587
+ def delete_chars(start_char, end_char); end
2588
+
2589
+ # source://spoom//lib/spoom/deadcode/remover.rb#73
2590
+ sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void }
2591
+ def delete_constant_assignment(context); end
2592
+
2593
+ # source://spoom//lib/spoom/deadcode/remover.rb#324
2594
+ sig { params(start_line: ::Integer, end_line: ::Integer).void }
2595
+ def delete_lines(start_line, end_line); end
2596
+
2597
+ # source://spoom//lib/spoom/deadcode/remover.rb#261
2598
+ sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void }
2599
+ def delete_node_and_comments_and_sigs(context); end
2600
+
2601
+ # source://spoom//lib/spoom/deadcode/remover.rb#218
2602
+ sig do
2603
+ params(
2604
+ node: ::Prism::Node,
2605
+ send_context: ::Spoom::Deadcode::Remover::NodeContext,
2606
+ was_removed: T::Boolean
2607
+ ).void
2608
+ end
2609
+ def insert_accessor(node, send_context, was_removed:); end
2610
+
2611
+ # source://spoom//lib/spoom/deadcode/remover.rb#336
2612
+ sig { params(start_char: ::Integer, end_char: ::Integer, replacement: ::String).void }
2613
+ def replace_chars(start_char, end_char, replacement); end
2614
+
2615
+ # source://spoom//lib/spoom/deadcode/remover.rb#341
2616
+ sig do
2617
+ params(
2618
+ node: ::Prism::CallNode,
2619
+ name: ::String,
2620
+ kind: T.nilable(::Spoom::Deadcode::Definition::Kind)
2621
+ ).returns(::String)
2622
+ end
2623
+ def transform_sig(node, name:, kind:); end
2624
+ end
2625
+
2626
+ # An abstraction to simplify handling of Prism::CallNode nodes.
2627
+ #
2628
+ # source://spoom//lib/spoom/deadcode/send.rb#7
2629
+ class Spoom::Deadcode::Send < ::T::Struct
2630
+ const :node, ::Prism::CallNode
2631
+ const :name, ::String
2632
+ const :recv, T.nilable(::Prism::Node), default: T.unsafe(nil)
2633
+ const :args, T::Array[::Prism::Node], default: T.unsafe(nil)
2634
+ const :block, T.nilable(::Prism::Node), default: T.unsafe(nil)
2635
+
2636
+ # source://spoom//lib/spoom/deadcode/send.rb#21
2637
+ sig do
2638
+ type_parameters(:T)
2639
+ .params(
2640
+ arg_type: T::Class[T.type_parameter(:T)],
2641
+ block: T.proc.params(arg: T.type_parameter(:T)).void
2642
+ ).void
2643
+ end
2644
+ def each_arg(arg_type, &block); end
2645
+
2646
+ # source://spoom//lib/spoom/deadcode/send.rb#28
2647
+ sig { params(block: T.proc.params(key: ::Prism::Node, value: T.nilable(::Prism::Node)).void).void }
2648
+ def each_arg_assoc(&block); end
2649
+
2650
+ class << self
2651
+ # source://sorbet-runtime/0.5.11406/lib/types/struct.rb#13
2652
+ def inherited(s); end
2653
+ end
2654
+ end
2655
+
2656
+ # source://spoom//lib/spoom/deadcode/visitor.rb#6
2657
+ class Spoom::Deadcode::Visitor < ::Prism::Visitor
2658
+ # source://spoom//lib/spoom/deadcode/visitor.rb#15
2659
+ sig { override.params(node: ::Prism::AliasGlobalVariableNode).void }
2660
+ def visit_alias_global_variable_node(node); end
2661
+
2662
+ # source://spoom//lib/spoom/deadcode/visitor.rb#20
2663
+ sig { override.params(node: ::Prism::AliasMethodNode).void }
2664
+ def visit_alias_method_node(node); end
2665
+
2666
+ # source://spoom//lib/spoom/deadcode/visitor.rb#25
2667
+ sig { override.params(node: ::Prism::AlternationPatternNode).void }
2668
+ def visit_alternation_pattern_node(node); end
2669
+
2670
+ # source://spoom//lib/spoom/deadcode/visitor.rb#30
2671
+ sig { override.params(node: ::Prism::AndNode).void }
2672
+ def visit_and_node(node); end
2673
+
2674
+ # source://spoom//lib/spoom/deadcode/visitor.rb#35
2675
+ sig { override.params(node: ::Prism::ArgumentsNode).void }
2676
+ def visit_arguments_node(node); end
2677
+
2678
+ # source://spoom//lib/spoom/deadcode/visitor.rb#40
2679
+ sig { override.params(node: ::Prism::ArrayNode).void }
2680
+ def visit_array_node(node); end
2681
+
2682
+ # source://spoom//lib/spoom/deadcode/visitor.rb#45
2683
+ sig { override.params(node: ::Prism::ArrayPatternNode).void }
2684
+ def visit_array_pattern_node(node); end
2685
+
2686
+ # source://spoom//lib/spoom/deadcode/visitor.rb#50
2687
+ sig { override.params(node: ::Prism::AssocNode).void }
2688
+ def visit_assoc_node(node); end
2689
+
2690
+ # source://spoom//lib/spoom/deadcode/visitor.rb#55
2691
+ sig { override.params(node: ::Prism::AssocSplatNode).void }
2692
+ def visit_assoc_splat_node(node); end
2693
+
2694
+ # source://spoom//lib/spoom/deadcode/visitor.rb#60
2695
+ sig { override.params(node: ::Prism::BackReferenceReadNode).void }
2696
+ def visit_back_reference_read_node(node); end
2697
+
2698
+ # source://spoom//lib/spoom/deadcode/visitor.rb#65
2699
+ sig { override.params(node: ::Prism::BeginNode).void }
2700
+ def visit_begin_node(node); end
2701
+
2702
+ # source://spoom//lib/spoom/deadcode/visitor.rb#70
2703
+ sig { override.params(node: ::Prism::BlockArgumentNode).void }
2704
+ def visit_block_argument_node(node); end
2705
+
2706
+ # source://spoom//lib/spoom/deadcode/visitor.rb#75
2707
+ sig { override.params(node: ::Prism::BlockLocalVariableNode).void }
2708
+ def visit_block_local_variable_node(node); end
2709
+
2710
+ # source://spoom//lib/spoom/deadcode/visitor.rb#80
2711
+ sig { override.params(node: ::Prism::BlockNode).void }
2712
+ def visit_block_node(node); end
2713
+
2714
+ # source://spoom//lib/spoom/deadcode/visitor.rb#85
2715
+ sig { override.params(node: ::Prism::BlockParameterNode).void }
2716
+ def visit_block_parameter_node(node); end
2717
+
2718
+ # source://spoom//lib/spoom/deadcode/visitor.rb#90
2719
+ sig { override.params(node: ::Prism::BlockParametersNode).void }
2720
+ def visit_block_parameters_node(node); end
2721
+
2722
+ # source://spoom//lib/spoom/deadcode/visitor.rb#95
2723
+ sig { override.params(node: ::Prism::BreakNode).void }
2724
+ def visit_break_node(node); end
2725
+
2726
+ # source://spoom//lib/spoom/deadcode/visitor.rb#100
2727
+ sig { override.params(node: ::Prism::CallAndWriteNode).void }
2728
+ def visit_call_and_write_node(node); end
2729
+
2730
+ # source://spoom//lib/spoom/deadcode/visitor.rb#105
2731
+ sig { override.params(node: ::Prism::CallNode).void }
2732
+ def visit_call_node(node); end
2733
+
2734
+ # source://spoom//lib/spoom/deadcode/visitor.rb#110
2735
+ sig { override.params(node: ::Prism::CallOperatorWriteNode).void }
2736
+ def visit_call_operator_write_node(node); end
2737
+
2738
+ # source://spoom//lib/spoom/deadcode/visitor.rb#115
2739
+ sig { override.params(node: ::Prism::CallOrWriteNode).void }
2740
+ def visit_call_or_write_node(node); end
2741
+
2742
+ # source://spoom//lib/spoom/deadcode/visitor.rb#120
2743
+ sig { override.params(node: ::Prism::CallTargetNode).void }
2744
+ def visit_call_target_node(node); end
2745
+
2746
+ # source://spoom//lib/spoom/deadcode/visitor.rb#125
2747
+ sig { override.params(node: ::Prism::CapturePatternNode).void }
2748
+ def visit_capture_pattern_node(node); end
2749
+
2750
+ # source://spoom//lib/spoom/deadcode/visitor.rb#130
2751
+ sig { override.params(node: ::Prism::CaseMatchNode).void }
2752
+ def visit_case_match_node(node); end
2753
+
2754
+ # source://spoom//lib/spoom/deadcode/visitor.rb#135
2755
+ sig { override.params(node: ::Prism::CaseNode).void }
2756
+ def visit_case_node(node); end
2757
+
2758
+ # source://spoom//lib/spoom/deadcode/visitor.rb#10
2759
+ sig { override.params(node: ::Prism::Node).void }
2760
+ def visit_child_nodes(node); end
2761
+
2762
+ # source://spoom//lib/spoom/deadcode/visitor.rb#140
2763
+ sig { override.params(node: ::Prism::ClassNode).void }
2764
+ def visit_class_node(node); end
2765
+
2766
+ # source://spoom//lib/spoom/deadcode/visitor.rb#145
2767
+ sig { override.params(node: ::Prism::ClassVariableAndWriteNode).void }
2768
+ def visit_class_variable_and_write_node(node); end
2769
+
2770
+ # source://spoom//lib/spoom/deadcode/visitor.rb#150
2771
+ sig { override.params(node: ::Prism::ClassVariableOperatorWriteNode).void }
2772
+ def visit_class_variable_operator_write_node(node); end
2773
+
2774
+ # source://spoom//lib/spoom/deadcode/visitor.rb#155
2775
+ sig { override.params(node: ::Prism::ClassVariableOrWriteNode).void }
2776
+ def visit_class_variable_or_write_node(node); end
2777
+
2778
+ # source://spoom//lib/spoom/deadcode/visitor.rb#160
2779
+ sig { override.params(node: ::Prism::ClassVariableReadNode).void }
2780
+ def visit_class_variable_read_node(node); end
2781
+
2782
+ # source://spoom//lib/spoom/deadcode/visitor.rb#165
2783
+ sig { override.params(node: ::Prism::ClassVariableTargetNode).void }
2784
+ def visit_class_variable_target_node(node); end
2785
+
2786
+ # source://spoom//lib/spoom/deadcode/visitor.rb#170
2787
+ sig { override.params(node: ::Prism::ClassVariableWriteNode).void }
2788
+ def visit_class_variable_write_node(node); end
2789
+
2790
+ # source://spoom//lib/spoom/deadcode/visitor.rb#175
2791
+ sig { override.params(node: ::Prism::ConstantAndWriteNode).void }
2792
+ def visit_constant_and_write_node(node); end
2793
+
2794
+ # source://spoom//lib/spoom/deadcode/visitor.rb#180
2795
+ sig { override.params(node: ::Prism::ConstantOperatorWriteNode).void }
2796
+ def visit_constant_operator_write_node(node); end
2797
+
2798
+ # source://spoom//lib/spoom/deadcode/visitor.rb#185
2799
+ sig { override.params(node: ::Prism::ConstantOrWriteNode).void }
2800
+ def visit_constant_or_write_node(node); end
2801
+
2802
+ # source://spoom//lib/spoom/deadcode/visitor.rb#190
2803
+ sig { override.params(node: ::Prism::ConstantPathAndWriteNode).void }
2804
+ def visit_constant_path_and_write_node(node); end
2805
+
2806
+ # source://spoom//lib/spoom/deadcode/visitor.rb#195
2807
+ sig { override.params(node: ::Prism::ConstantPathNode).void }
2808
+ def visit_constant_path_node(node); end
2809
+
2810
+ # source://spoom//lib/spoom/deadcode/visitor.rb#200
2811
+ sig { override.params(node: ::Prism::ConstantPathOperatorWriteNode).void }
2812
+ def visit_constant_path_operator_write_node(node); end
2813
+
2814
+ # source://spoom//lib/spoom/deadcode/visitor.rb#205
2815
+ sig { override.params(node: ::Prism::ConstantPathOrWriteNode).void }
2816
+ def visit_constant_path_or_write_node(node); end
2817
+
2818
+ # source://spoom//lib/spoom/deadcode/visitor.rb#210
2819
+ sig { override.params(node: ::Prism::ConstantPathTargetNode).void }
2820
+ def visit_constant_path_target_node(node); end
2821
+
2822
+ # source://spoom//lib/spoom/deadcode/visitor.rb#215
2823
+ sig { override.params(node: ::Prism::ConstantPathWriteNode).void }
2824
+ def visit_constant_path_write_node(node); end
2825
+
2826
+ # source://spoom//lib/spoom/deadcode/visitor.rb#220
2827
+ sig { override.params(node: ::Prism::ConstantReadNode).void }
2828
+ def visit_constant_read_node(node); end
2829
+
2830
+ # source://spoom//lib/spoom/deadcode/visitor.rb#225
2831
+ sig { override.params(node: ::Prism::ConstantTargetNode).void }
2832
+ def visit_constant_target_node(node); end
2833
+
2834
+ # source://spoom//lib/spoom/deadcode/visitor.rb#230
2835
+ sig { override.params(node: ::Prism::ConstantWriteNode).void }
2836
+ def visit_constant_write_node(node); end
2837
+
2838
+ # source://spoom//lib/spoom/deadcode/visitor.rb#235
2839
+ sig { override.params(node: ::Prism::DefNode).void }
2840
+ def visit_def_node(node); end
2841
+
2842
+ # source://spoom//lib/spoom/deadcode/visitor.rb#240
2843
+ sig { override.params(node: ::Prism::DefinedNode).void }
2844
+ def visit_defined_node(node); end
2845
+
2846
+ # source://spoom//lib/spoom/deadcode/visitor.rb#245
2847
+ sig { override.params(node: ::Prism::ElseNode).void }
2848
+ def visit_else_node(node); end
2849
+
2850
+ # source://spoom//lib/spoom/deadcode/visitor.rb#250
2851
+ sig { override.params(node: ::Prism::EmbeddedStatementsNode).void }
2852
+ def visit_embedded_statements_node(node); end
2853
+
2854
+ # source://spoom//lib/spoom/deadcode/visitor.rb#255
2855
+ sig { override.params(node: ::Prism::EmbeddedVariableNode).void }
2856
+ def visit_embedded_variable_node(node); end
2857
+
2858
+ # source://spoom//lib/spoom/deadcode/visitor.rb#260
2859
+ sig { override.params(node: ::Prism::EnsureNode).void }
2860
+ def visit_ensure_node(node); end
2861
+
2862
+ # source://spoom//lib/spoom/deadcode/visitor.rb#265
2863
+ sig { override.params(node: ::Prism::FalseNode).void }
2864
+ def visit_false_node(node); end
2865
+
2866
+ # source://spoom//lib/spoom/deadcode/visitor.rb#270
2867
+ sig { override.params(node: ::Prism::FindPatternNode).void }
2868
+ def visit_find_pattern_node(node); end
2869
+
2870
+ # source://spoom//lib/spoom/deadcode/visitor.rb#275
2871
+ sig { override.params(node: ::Prism::FlipFlopNode).void }
2872
+ def visit_flip_flop_node(node); end
2873
+
2874
+ # source://spoom//lib/spoom/deadcode/visitor.rb#280
2875
+ sig { override.params(node: ::Prism::FloatNode).void }
2876
+ def visit_float_node(node); end
2877
+
2878
+ # source://spoom//lib/spoom/deadcode/visitor.rb#285
2879
+ sig { override.params(node: ::Prism::ForNode).void }
2880
+ def visit_for_node(node); end
2881
+
2882
+ # source://spoom//lib/spoom/deadcode/visitor.rb#290
2883
+ sig { override.params(node: ::Prism::ForwardingArgumentsNode).void }
2884
+ def visit_forwarding_arguments_node(node); end
2885
+
2886
+ # source://spoom//lib/spoom/deadcode/visitor.rb#295
2887
+ sig { override.params(node: ::Prism::ForwardingParameterNode).void }
2888
+ def visit_forwarding_parameter_node(node); end
2889
+
2890
+ # source://spoom//lib/spoom/deadcode/visitor.rb#300
2891
+ sig { override.params(node: ::Prism::ForwardingSuperNode).void }
2892
+ def visit_forwarding_super_node(node); end
2893
+
2894
+ # source://spoom//lib/spoom/deadcode/visitor.rb#305
2895
+ sig { override.params(node: ::Prism::GlobalVariableAndWriteNode).void }
2896
+ def visit_global_variable_and_write_node(node); end
2897
+
2898
+ # source://spoom//lib/spoom/deadcode/visitor.rb#310
2899
+ sig { override.params(node: ::Prism::GlobalVariableOperatorWriteNode).void }
2900
+ def visit_global_variable_operator_write_node(node); end
2901
+
2902
+ # source://spoom//lib/spoom/deadcode/visitor.rb#315
2903
+ sig { override.params(node: ::Prism::GlobalVariableOrWriteNode).void }
2904
+ def visit_global_variable_or_write_node(node); end
2905
+
2906
+ # source://spoom//lib/spoom/deadcode/visitor.rb#320
2907
+ sig { override.params(node: ::Prism::GlobalVariableReadNode).void }
2908
+ def visit_global_variable_read_node(node); end
2909
+
2910
+ # source://spoom//lib/spoom/deadcode/visitor.rb#325
2911
+ sig { override.params(node: ::Prism::GlobalVariableTargetNode).void }
2912
+ def visit_global_variable_target_node(node); end
2913
+
2914
+ # source://spoom//lib/spoom/deadcode/visitor.rb#330
2915
+ sig { override.params(node: ::Prism::GlobalVariableWriteNode).void }
2916
+ def visit_global_variable_write_node(node); end
2917
+
2918
+ # source://spoom//lib/spoom/deadcode/visitor.rb#335
2919
+ sig { override.params(node: ::Prism::HashNode).void }
2920
+ def visit_hash_node(node); end
2921
+
2922
+ # source://spoom//lib/spoom/deadcode/visitor.rb#340
2923
+ sig { override.params(node: ::Prism::HashPatternNode).void }
2924
+ def visit_hash_pattern_node(node); end
2925
+
2926
+ # source://spoom//lib/spoom/deadcode/visitor.rb#345
2927
+ sig { override.params(node: ::Prism::IfNode).void }
2928
+ def visit_if_node(node); end
2929
+
2930
+ # source://spoom//lib/spoom/deadcode/visitor.rb#350
2931
+ sig { override.params(node: ::Prism::ImaginaryNode).void }
2932
+ def visit_imaginary_node(node); end
2933
+
2934
+ # source://spoom//lib/spoom/deadcode/visitor.rb#355
2935
+ sig { override.params(node: ::Prism::ImplicitNode).void }
2936
+ def visit_implicit_node(node); end
2937
+
2938
+ # source://spoom//lib/spoom/deadcode/visitor.rb#360
2939
+ sig { override.params(node: ::Prism::ImplicitRestNode).void }
2940
+ def visit_implicit_rest_node(node); end
2941
+
2942
+ # source://spoom//lib/spoom/deadcode/visitor.rb#365
2943
+ sig { override.params(node: ::Prism::InNode).void }
2944
+ def visit_in_node(node); end
2945
+
2946
+ # source://spoom//lib/spoom/deadcode/visitor.rb#370
2947
+ sig { override.params(node: ::Prism::IndexAndWriteNode).void }
2948
+ def visit_index_and_write_node(node); end
2949
+
2950
+ # source://spoom//lib/spoom/deadcode/visitor.rb#375
2951
+ sig { override.params(node: ::Prism::IndexOperatorWriteNode).void }
2952
+ def visit_index_operator_write_node(node); end
2953
+
2954
+ # source://spoom//lib/spoom/deadcode/visitor.rb#380
2955
+ sig { override.params(node: ::Prism::IndexOrWriteNode).void }
2956
+ def visit_index_or_write_node(node); end
2957
+
2958
+ # source://spoom//lib/spoom/deadcode/visitor.rb#385
2959
+ sig { override.params(node: ::Prism::IndexTargetNode).void }
2960
+ def visit_index_target_node(node); end
2961
+
2962
+ # source://spoom//lib/spoom/deadcode/visitor.rb#390
2963
+ sig { override.params(node: ::Prism::InstanceVariableAndWriteNode).void }
2964
+ def visit_instance_variable_and_write_node(node); end
2965
+
2966
+ # source://spoom//lib/spoom/deadcode/visitor.rb#395
2967
+ sig { override.params(node: ::Prism::InstanceVariableOperatorWriteNode).void }
2968
+ def visit_instance_variable_operator_write_node(node); end
2969
+
2970
+ # source://spoom//lib/spoom/deadcode/visitor.rb#400
2971
+ sig { override.params(node: ::Prism::InstanceVariableOrWriteNode).void }
2972
+ def visit_instance_variable_or_write_node(node); end
2973
+
2974
+ # source://spoom//lib/spoom/deadcode/visitor.rb#405
2975
+ sig { override.params(node: ::Prism::InstanceVariableReadNode).void }
2976
+ def visit_instance_variable_read_node(node); end
2977
+
2978
+ # source://spoom//lib/spoom/deadcode/visitor.rb#410
2979
+ sig { override.params(node: ::Prism::InstanceVariableTargetNode).void }
2980
+ def visit_instance_variable_target_node(node); end
2981
+
2982
+ # source://spoom//lib/spoom/deadcode/visitor.rb#415
2983
+ sig { override.params(node: ::Prism::InstanceVariableWriteNode).void }
2984
+ def visit_instance_variable_write_node(node); end
2985
+
2986
+ # source://spoom//lib/spoom/deadcode/visitor.rb#420
2987
+ sig { override.params(node: ::Prism::IntegerNode).void }
2988
+ def visit_integer_node(node); end
2989
+
2990
+ # source://spoom//lib/spoom/deadcode/visitor.rb#425
2991
+ sig { override.params(node: ::Prism::InterpolatedMatchLastLineNode).void }
2992
+ def visit_interpolated_match_last_line_node(node); end
2993
+
2994
+ # source://spoom//lib/spoom/deadcode/visitor.rb#430
2995
+ sig { override.params(node: ::Prism::InterpolatedRegularExpressionNode).void }
2996
+ def visit_interpolated_regular_expression_node(node); end
2997
+
2998
+ # source://spoom//lib/spoom/deadcode/visitor.rb#435
2999
+ sig { override.params(node: ::Prism::InterpolatedStringNode).void }
3000
+ def visit_interpolated_string_node(node); end
3001
+
3002
+ # source://spoom//lib/spoom/deadcode/visitor.rb#440
3003
+ sig { override.params(node: ::Prism::InterpolatedSymbolNode).void }
3004
+ def visit_interpolated_symbol_node(node); end
3005
+
3006
+ # source://spoom//lib/spoom/deadcode/visitor.rb#445
3007
+ sig { override.params(node: ::Prism::InterpolatedXStringNode).void }
3008
+ def visit_interpolated_x_string_node(node); end
3009
+
3010
+ # source://spoom//lib/spoom/deadcode/visitor.rb#450
3011
+ sig { override.params(node: ::Prism::KeywordHashNode).void }
3012
+ def visit_keyword_hash_node(node); end
3013
+
3014
+ # source://spoom//lib/spoom/deadcode/visitor.rb#455
3015
+ sig { override.params(node: ::Prism::KeywordRestParameterNode).void }
3016
+ def visit_keyword_rest_parameter_node(node); end
3017
+
3018
+ # source://spoom//lib/spoom/deadcode/visitor.rb#460
3019
+ sig { override.params(node: ::Prism::LambdaNode).void }
3020
+ def visit_lambda_node(node); end
3021
+
3022
+ # source://spoom//lib/spoom/deadcode/visitor.rb#465
3023
+ sig { override.params(node: ::Prism::LocalVariableAndWriteNode).void }
3024
+ def visit_local_variable_and_write_node(node); end
3025
+
3026
+ # source://spoom//lib/spoom/deadcode/visitor.rb#470
3027
+ sig { override.params(node: ::Prism::LocalVariableOperatorWriteNode).void }
3028
+ def visit_local_variable_operator_write_node(node); end
3029
+
3030
+ # source://spoom//lib/spoom/deadcode/visitor.rb#475
3031
+ sig { override.params(node: ::Prism::LocalVariableOrWriteNode).void }
3032
+ def visit_local_variable_or_write_node(node); end
3033
+
3034
+ # source://spoom//lib/spoom/deadcode/visitor.rb#480
3035
+ sig { override.params(node: ::Prism::LocalVariableReadNode).void }
3036
+ def visit_local_variable_read_node(node); end
3037
+
3038
+ # source://spoom//lib/spoom/deadcode/visitor.rb#485
3039
+ sig { override.params(node: ::Prism::LocalVariableTargetNode).void }
3040
+ def visit_local_variable_target_node(node); end
3041
+
3042
+ # source://spoom//lib/spoom/deadcode/visitor.rb#490
3043
+ sig { override.params(node: ::Prism::LocalVariableWriteNode).void }
3044
+ def visit_local_variable_write_node(node); end
3045
+
3046
+ # source://spoom//lib/spoom/deadcode/visitor.rb#495
3047
+ sig { override.params(node: ::Prism::MatchLastLineNode).void }
3048
+ def visit_match_last_line_node(node); end
3049
+
3050
+ # source://spoom//lib/spoom/deadcode/visitor.rb#500
3051
+ sig { override.params(node: ::Prism::MatchPredicateNode).void }
3052
+ def visit_match_predicate_node(node); end
3053
+
3054
+ # source://spoom//lib/spoom/deadcode/visitor.rb#505
3055
+ sig { override.params(node: ::Prism::MatchRequiredNode).void }
3056
+ def visit_match_required_node(node); end
3057
+
3058
+ # source://spoom//lib/spoom/deadcode/visitor.rb#510
3059
+ sig { override.params(node: ::Prism::MatchWriteNode).void }
3060
+ def visit_match_write_node(node); end
3061
+
3062
+ # source://spoom//lib/spoom/deadcode/visitor.rb#515
3063
+ sig { override.params(node: ::Prism::MissingNode).void }
3064
+ def visit_missing_node(node); end
3065
+
3066
+ # source://spoom//lib/spoom/deadcode/visitor.rb#520
3067
+ sig { override.params(node: ::Prism::ModuleNode).void }
3068
+ def visit_module_node(node); end
3069
+
3070
+ # source://spoom//lib/spoom/deadcode/visitor.rb#525
3071
+ sig { override.params(node: ::Prism::MultiTargetNode).void }
3072
+ def visit_multi_target_node(node); end
3073
+
3074
+ # source://spoom//lib/spoom/deadcode/visitor.rb#530
3075
+ sig { override.params(node: ::Prism::MultiWriteNode).void }
3076
+ def visit_multi_write_node(node); end
3077
+
3078
+ # source://spoom//lib/spoom/deadcode/visitor.rb#535
3079
+ sig { override.params(node: ::Prism::NextNode).void }
3080
+ def visit_next_node(node); end
3081
+
3082
+ # source://spoom//lib/spoom/deadcode/visitor.rb#540
3083
+ sig { override.params(node: ::Prism::NilNode).void }
3084
+ def visit_nil_node(node); end
3085
+
3086
+ # source://spoom//lib/spoom/deadcode/visitor.rb#545
3087
+ sig { override.params(node: ::Prism::NoKeywordsParameterNode).void }
3088
+ def visit_no_keywords_parameter_node(node); end
3089
+
3090
+ # source://spoom//lib/spoom/deadcode/visitor.rb#550
3091
+ sig { override.params(node: ::Prism::NumberedParametersNode).void }
3092
+ def visit_numbered_parameters_node(node); end
3093
+
3094
+ # source://spoom//lib/spoom/deadcode/visitor.rb#555
3095
+ sig { override.params(node: ::Prism::NumberedReferenceReadNode).void }
3096
+ def visit_numbered_reference_read_node(node); end
3097
+
3098
+ # source://spoom//lib/spoom/deadcode/visitor.rb#560
3099
+ sig { override.params(node: ::Prism::OptionalKeywordParameterNode).void }
3100
+ def visit_optional_keyword_parameter_node(node); end
3101
+
3102
+ # source://spoom//lib/spoom/deadcode/visitor.rb#565
3103
+ sig { override.params(node: ::Prism::OptionalParameterNode).void }
3104
+ def visit_optional_parameter_node(node); end
3105
+
3106
+ # source://spoom//lib/spoom/deadcode/visitor.rb#570
3107
+ sig { override.params(node: ::Prism::OrNode).void }
3108
+ def visit_or_node(node); end
3109
+
3110
+ # source://spoom//lib/spoom/deadcode/visitor.rb#575
3111
+ sig { override.params(node: ::Prism::ParametersNode).void }
3112
+ def visit_parameters_node(node); end
3113
+
3114
+ # source://spoom//lib/spoom/deadcode/visitor.rb#580
3115
+ sig { override.params(node: ::Prism::ParenthesesNode).void }
3116
+ def visit_parentheses_node(node); end
3117
+
3118
+ # source://spoom//lib/spoom/deadcode/visitor.rb#585
3119
+ sig { override.params(node: ::Prism::PinnedExpressionNode).void }
3120
+ def visit_pinned_expression_node(node); end
3121
+
3122
+ # source://spoom//lib/spoom/deadcode/visitor.rb#590
3123
+ sig { override.params(node: ::Prism::PinnedVariableNode).void }
3124
+ def visit_pinned_variable_node(node); end
3125
+
3126
+ # source://spoom//lib/spoom/deadcode/visitor.rb#595
3127
+ sig { override.params(node: ::Prism::PostExecutionNode).void }
3128
+ def visit_post_execution_node(node); end
3129
+
3130
+ # source://spoom//lib/spoom/deadcode/visitor.rb#600
3131
+ sig { override.params(node: ::Prism::PreExecutionNode).void }
3132
+ def visit_pre_execution_node(node); end
3133
+
3134
+ # source://spoom//lib/spoom/deadcode/visitor.rb#605
3135
+ sig { override.params(node: ::Prism::ProgramNode).void }
3136
+ def visit_program_node(node); end
3137
+
3138
+ # source://spoom//lib/spoom/deadcode/visitor.rb#610
3139
+ sig { override.params(node: ::Prism::RangeNode).void }
3140
+ def visit_range_node(node); end
3141
+
3142
+ # source://spoom//lib/spoom/deadcode/visitor.rb#615
3143
+ sig { override.params(node: ::Prism::RationalNode).void }
3144
+ def visit_rational_node(node); end
3145
+
3146
+ # source://spoom//lib/spoom/deadcode/visitor.rb#620
3147
+ sig { override.params(node: ::Prism::RedoNode).void }
3148
+ def visit_redo_node(node); end
3149
+
3150
+ # source://spoom//lib/spoom/deadcode/visitor.rb#625
3151
+ sig { override.params(node: ::Prism::RegularExpressionNode).void }
3152
+ def visit_regular_expression_node(node); end
3153
+
3154
+ # source://spoom//lib/spoom/deadcode/visitor.rb#630
3155
+ sig { override.params(node: ::Prism::RequiredKeywordParameterNode).void }
3156
+ def visit_required_keyword_parameter_node(node); end
3157
+
3158
+ # source://spoom//lib/spoom/deadcode/visitor.rb#635
3159
+ sig { override.params(node: ::Prism::RequiredParameterNode).void }
3160
+ def visit_required_parameter_node(node); end
3161
+
3162
+ # source://spoom//lib/spoom/deadcode/visitor.rb#640
3163
+ sig { override.params(node: ::Prism::RescueModifierNode).void }
3164
+ def visit_rescue_modifier_node(node); end
3165
+
3166
+ # source://spoom//lib/spoom/deadcode/visitor.rb#645
3167
+ sig { override.params(node: ::Prism::RescueNode).void }
3168
+ def visit_rescue_node(node); end
3169
+
3170
+ # source://spoom//lib/spoom/deadcode/visitor.rb#650
3171
+ sig { override.params(node: ::Prism::RestParameterNode).void }
3172
+ def visit_rest_parameter_node(node); end
3173
+
3174
+ # source://spoom//lib/spoom/deadcode/visitor.rb#655
3175
+ sig { override.params(node: ::Prism::RetryNode).void }
3176
+ def visit_retry_node(node); end
3177
+
3178
+ # source://spoom//lib/spoom/deadcode/visitor.rb#660
3179
+ sig { override.params(node: ::Prism::ReturnNode).void }
3180
+ def visit_return_node(node); end
3181
+
3182
+ # source://spoom//lib/spoom/deadcode/visitor.rb#665
3183
+ sig { override.params(node: ::Prism::SelfNode).void }
3184
+ def visit_self_node(node); end
3185
+
3186
+ # source://spoom//lib/spoom/deadcode/visitor.rb#670
3187
+ sig { override.params(node: ::Prism::SingletonClassNode).void }
3188
+ def visit_singleton_class_node(node); end
3189
+
3190
+ # source://spoom//lib/spoom/deadcode/visitor.rb#675
3191
+ sig { override.params(node: ::Prism::SourceEncodingNode).void }
3192
+ def visit_source_encoding_node(node); end
3193
+
3194
+ # source://spoom//lib/spoom/deadcode/visitor.rb#680
3195
+ sig { override.params(node: ::Prism::SourceFileNode).void }
3196
+ def visit_source_file_node(node); end
3197
+
3198
+ # source://spoom//lib/spoom/deadcode/visitor.rb#685
3199
+ sig { override.params(node: ::Prism::SourceLineNode).void }
3200
+ def visit_source_line_node(node); end
3201
+
3202
+ # source://spoom//lib/spoom/deadcode/visitor.rb#690
3203
+ sig { override.params(node: ::Prism::SplatNode).void }
3204
+ def visit_splat_node(node); end
3205
+
3206
+ # source://spoom//lib/spoom/deadcode/visitor.rb#695
3207
+ sig { override.params(node: ::Prism::StatementsNode).void }
3208
+ def visit_statements_node(node); end
3209
+
3210
+ # source://spoom//lib/spoom/deadcode/visitor.rb#700
3211
+ sig { override.params(node: ::Prism::StringNode).void }
3212
+ def visit_string_node(node); end
3213
+
3214
+ # source://spoom//lib/spoom/deadcode/visitor.rb#705
3215
+ sig { override.params(node: ::Prism::SuperNode).void }
3216
+ def visit_super_node(node); end
3217
+
3218
+ # source://spoom//lib/spoom/deadcode/visitor.rb#710
3219
+ sig { override.params(node: ::Prism::SymbolNode).void }
3220
+ def visit_symbol_node(node); end
3221
+
3222
+ # source://spoom//lib/spoom/deadcode/visitor.rb#715
3223
+ sig { override.params(node: ::Prism::TrueNode).void }
3224
+ def visit_true_node(node); end
3225
+
3226
+ # source://spoom//lib/spoom/deadcode/visitor.rb#720
3227
+ sig { override.params(node: ::Prism::UndefNode).void }
3228
+ def visit_undef_node(node); end
3229
+
3230
+ # source://spoom//lib/spoom/deadcode/visitor.rb#725
3231
+ sig { override.params(node: ::Prism::UnlessNode).void }
3232
+ def visit_unless_node(node); end
3233
+
3234
+ # source://spoom//lib/spoom/deadcode/visitor.rb#730
3235
+ sig { override.params(node: ::Prism::UntilNode).void }
3236
+ def visit_until_node(node); end
3237
+
3238
+ # source://spoom//lib/spoom/deadcode/visitor.rb#735
3239
+ sig { override.params(node: ::Prism::WhenNode).void }
3240
+ def visit_when_node(node); end
3241
+
3242
+ # source://spoom//lib/spoom/deadcode/visitor.rb#740
3243
+ sig { override.params(node: ::Prism::WhileNode).void }
3244
+ def visit_while_node(node); end
3245
+
3246
+ # source://spoom//lib/spoom/deadcode/visitor.rb#745
3247
+ sig { override.params(node: ::Prism::XStringNode).void }
3248
+ def visit_x_string_node(node); end
3249
+
3250
+ # source://spoom//lib/spoom/deadcode/visitor.rb#750
3251
+ sig { override.params(node: ::Prism::YieldNode).void }
3252
+ def visit_yield_node(node); end
3253
+ end
3254
+
3255
+ # source://spoom//lib/spoom.rb#12
3256
+ class Spoom::Error < ::StandardError; end
3257
+
3258
+ # source://spoom//lib/spoom/context/exec.rb#5
3259
+ class Spoom::ExecResult < ::T::Struct
3260
+ const :out, ::String
3261
+ const :err, T.nilable(::String)
3262
+ const :status, T::Boolean
3263
+ const :exit_code, ::Integer
3264
+
3265
+ # source://spoom//lib/spoom/context/exec.rb#14
3266
+ sig { returns(::String) }
3267
+ def to_s; end
3268
+
3269
+ class << self
3270
+ # source://sorbet-runtime/0.5.11406/lib/types/struct.rb#13
3271
+ def inherited(s); end
3272
+ end
3273
+ end
3274
+
3275
+ # source://spoom//lib/spoom/file_collector.rb#5
3276
+ class Spoom::FileCollector
3277
+ # Initialize a new file collector
3278
+ #
3279
+ # If `allow_extensions` is empty, all files are collected.
3280
+ # If `allow_extensions` is an array of extensions, only files with one of these extensions are collected.
3281
+ #
3282
+ # If `allow_mime_types` is empty, all files are collected.
3283
+ # If `allow_mime_types` is an array of mimetypes, files without an extension are collected if their mimetype is in
3284
+ # the list.
3285
+ #
3286
+ # source://spoom//lib/spoom/file_collector.rb#26
3287
+ sig do
3288
+ params(
3289
+ allow_extensions: T::Array[::String],
3290
+ allow_mime_types: T::Array[::String],
3291
+ exclude_patterns: T::Array[::String]
3292
+ ).void
3293
+ end
3294
+ def initialize(allow_extensions: T.unsafe(nil), allow_mime_types: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end
3295
+
3296
+ # source://spoom//lib/spoom/file_collector.rb#9
3297
+ sig { returns(T::Array[::String]) }
3298
+ def files; end
3299
+
3300
+ # source://spoom//lib/spoom/file_collector.rb#39
3301
+ sig { params(path: ::String).void }
3302
+ def visit_path(path); end
3303
+
3304
+ # source://spoom//lib/spoom/file_collector.rb#34
3305
+ sig { params(paths: T::Array[::String]).void }
3306
+ def visit_paths(paths); end
3307
+
3308
+ private
3309
+
3310
+ # source://spoom//lib/spoom/file_collector.rb#56
3311
+ sig { params(path: ::String).returns(::String) }
3312
+ def clean_path(path); end
3313
+
3314
+ # source://spoom//lib/spoom/file_collector.rb#73
3315
+ sig { params(path: ::String).returns(T::Boolean) }
3316
+ def excluded_file?(path); end
3317
+
3318
+ # source://spoom//lib/spoom/file_collector.rb#88
3319
+ sig { params(path: ::String).returns(T::Boolean) }
3320
+ def excluded_path?(path); end
3321
+
3322
+ # source://spoom//lib/spoom/file_collector.rb#97
3323
+ sig { params(path: ::String).returns(T.nilable(::String)) }
3324
+ def mime_type_for(path); end
3325
+
3326
+ # source://spoom//lib/spoom/file_collector.rb#68
3327
+ sig { params(path: ::String).void }
3328
+ def visit_directory(path); end
3329
+
3330
+ # source://spoom//lib/spoom/file_collector.rb#61
3331
+ sig { params(path: ::String).void }
3332
+ def visit_file(path); end
3333
+ end
3334
+
3335
+ # Build a file hierarchy from a set of file paths.
3336
+ #
3337
+ # source://spoom//lib/spoom/file_tree.rb#6
3338
+ class Spoom::FileTree
3339
+ # source://spoom//lib/spoom/file_tree.rb#10
3340
+ sig { params(paths: T::Enumerable[::String]).void }
3341
+ def initialize(paths = T.unsafe(nil)); end
3342
+
3343
+ # Add a `path` to the tree
3344
+ #
3345
+ # This will create all nodes until the root of `path`.
3346
+ #
3347
+ # source://spoom//lib/spoom/file_tree.rb#25
3348
+ sig { params(path: ::String).returns(::Spoom::FileTree::Node) }
3349
+ def add_path(path); end
3350
+
3351
+ # Add all `paths` to the tree
3352
+ #
3353
+ # source://spoom//lib/spoom/file_tree.rb#17
3354
+ sig { params(paths: T::Enumerable[::String]).void }
3355
+ def add_paths(paths); end
3356
+
3357
+ # All the nodes in this tree
3358
+ #
3359
+ # source://spoom//lib/spoom/file_tree.rb#45
3360
+ sig { returns(T::Array[::Spoom::FileTree::Node]) }
3361
+ def nodes; end
3362
+
3363
+ # Return a map of typing scores for each node in the tree
3364
+ #
3365
+ # source://spoom//lib/spoom/file_tree.rb#59
3366
+ sig { params(context: ::Spoom::Context).returns(T::Hash[::Spoom::FileTree::Node, ::Float]) }
3367
+ def nodes_strictness_scores(context); end
3368
+
3369
+ # All the paths in this tree
3370
+ #
3371
+ # source://spoom//lib/spoom/file_tree.rb#53
3372
+ sig { returns(T::Array[::String]) }
3373
+ def paths; end
3374
+
3375
+ # Return a map of typing scores for each path in the tree
3376
+ #
3377
+ # source://spoom//lib/spoom/file_tree.rb#67
3378
+ sig { params(context: ::Spoom::Context).returns(T::Hash[::String, ::Float]) }
3379
+ def paths_strictness_scores(context); end
3380
+
3381
+ # source://spoom//lib/spoom/file_tree.rb#72
3382
+ sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean).void }
3383
+ def print(out: T.unsafe(nil), colors: T.unsafe(nil)); end
3384
+
3385
+ # All root nodes
3386
+ #
3387
+ # source://spoom//lib/spoom/file_tree.rb#39
3388
+ sig { returns(T::Array[::Spoom::FileTree::Node]) }
3389
+ def roots; end
3390
+ end
3391
+
3392
+ # A visitor that collects all the nodes in a tree
3393
+ #
3394
+ # source://spoom//lib/spoom/file_tree.rb#124
3395
+ class Spoom::FileTree::CollectNodes < ::Spoom::FileTree::Visitor
3396
+ # source://spoom//lib/spoom/file_tree.rb#131
3397
+ sig { void }
3398
+ def initialize; end
3399
+
3400
+ # source://spoom//lib/spoom/file_tree.rb#128
3401
+ sig { returns(T::Array[::Spoom::FileTree::Node]) }
3402
+ def nodes; end
3403
+
3404
+ # source://spoom//lib/spoom/file_tree.rb#137
3405
+ sig { override.params(node: ::Spoom::FileTree::Node).void }
3406
+ def visit_node(node); end
3407
+ end
3408
+
3409
+ # A visitor that collects the typing score of each node in a tree
3410
+ #
3411
+ # source://spoom//lib/spoom/file_tree.rb#167
3412
+ class Spoom::FileTree::CollectScores < ::Spoom::FileTree::CollectStrictnesses
3413
+ # source://spoom//lib/spoom/file_tree.rb#174
3414
+ sig { params(context: ::Spoom::Context).void }
3415
+ def initialize(context); end
3416
+
3417
+ # source://spoom//lib/spoom/file_tree.rb#171
3418
+ sig { returns(T::Hash[::Spoom::FileTree::Node, ::Float]) }
3419
+ def scores; end
3420
+
3421
+ # source://spoom//lib/spoom/file_tree.rb#181
3422
+ sig { override.params(node: ::Spoom::FileTree::Node).void }
3423
+ def visit_node(node); end
3424
+
3425
+ private
3426
+
3427
+ # source://spoom//lib/spoom/file_tree.rb#190
3428
+ sig { params(node: ::Spoom::FileTree::Node).returns(::Float) }
3429
+ def node_score(node); end
3430
+
3431
+ # source://spoom//lib/spoom/file_tree.rb#199
3432
+ sig { params(strictness: T.nilable(::String)).returns(::Float) }
3433
+ def strictness_score(strictness); end
3434
+ end
3435
+
3436
+ # A visitor that collects the strictness of each node in a tree
3437
+ #
3438
+ # source://spoom//lib/spoom/file_tree.rb#144
3439
+ class Spoom::FileTree::CollectStrictnesses < ::Spoom::FileTree::Visitor
3440
+ # source://spoom//lib/spoom/file_tree.rb#151
3441
+ sig { params(context: ::Spoom::Context).void }
3442
+ def initialize(context); end
3443
+
3444
+ # source://spoom//lib/spoom/file_tree.rb#148
3445
+ sig { returns(T::Hash[::Spoom::FileTree::Node, T.nilable(::String)]) }
3446
+ def strictnesses; end
3447
+
3448
+ # source://spoom//lib/spoom/file_tree.rb#158
3449
+ sig { override.params(node: ::Spoom::FileTree::Node).void }
3450
+ def visit_node(node); end
3451
+ end
3452
+
3453
+ # A node representing either a file or a directory inside a FileTree
3454
+ #
3455
+ # source://spoom//lib/spoom/file_tree.rb#78
3456
+ class Spoom::FileTree::Node < ::T::Struct
3457
+ const :parent, T.nilable(::Spoom::FileTree::Node)
3458
+ const :name, ::String
3459
+ const :children, T::Hash[::String, ::Spoom::FileTree::Node], default: T.unsafe(nil)
3460
+
3461
+ # Full path to this node from root
3462
+ #
3463
+ # source://spoom//lib/spoom/file_tree.rb#92
3464
+ sig { returns(::String) }
3465
+ def path; end
3466
+
3467
+ class << self
3468
+ # source://sorbet-runtime/0.5.11406/lib/types/struct.rb#13
3469
+ def inherited(s); end
3470
+ end
3471
+ end
3472
+
3473
+ # An internal class used to print a FileTree
3474
+ #
3475
+ # See `FileTree#print`
3476
+ #
3477
+ # source://spoom//lib/spoom/file_tree.rb#212
3478
+ class Spoom::FileTree::Printer < ::Spoom::FileTree::Visitor
3479
+ # source://spoom//lib/spoom/file_tree.rb#222
3480
+ sig do
3481
+ params(
3482
+ strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)],
3483
+ out: T.any(::IO, ::StringIO),
3484
+ colors: T::Boolean
3485
+ ).void
3486
+ end
3487
+ def initialize(strictnesses, out: T.unsafe(nil), colors: T.unsafe(nil)); end
3488
+
3489
+ # source://spoom//lib/spoom/file_tree.rb#230
3490
+ sig { override.params(node: ::Spoom::FileTree::Node).void }
3491
+ def visit_node(node); end
3492
+
3493
+ private
3494
+
3495
+ # source://spoom//lib/spoom/file_tree.rb#255
3496
+ sig { params(strictness: T.nilable(::String)).returns(::Spoom::Color) }
3497
+ def strictness_color(strictness); end
3498
+ end
3499
+
3500
+ # An abstract visitor for FileTree
3501
+ #
3502
+ # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
3503
+ #
3504
+ # source://spoom//lib/spoom/file_tree.rb#101
3505
+ class Spoom::FileTree::Visitor
3506
+ abstract!
3507
+
3508
+ # source://spoom//lib/spoom/file_tree.rb#113
3509
+ sig { params(node: ::Spoom::FileTree::Node).void }
3510
+ def visit_node(node); end
3511
+
3512
+ # source://spoom//lib/spoom/file_tree.rb#118
3513
+ sig { params(nodes: T::Array[::Spoom::FileTree::Node]).void }
3514
+ def visit_nodes(nodes); end
3515
+
3516
+ # source://spoom//lib/spoom/file_tree.rb#108
3517
+ sig { params(tree: ::Spoom::FileTree).void }
3518
+ def visit_tree(tree); end
3519
+ end
3520
+
3521
+ # source://spoom//lib/spoom/context/git.rb#5
3522
+ module Spoom::Git; end
3523
+
3524
+ # source://spoom//lib/spoom/context/git.rb#6
3525
+ class Spoom::Git::Commit < ::T::Struct
3526
+ const :sha, ::String
3527
+ const :time, ::Time
3528
+
3529
+ # source://spoom//lib/spoom/context/git.rb#27
3530
+ sig { returns(::Integer) }
3531
+ def timestamp; end
3532
+
3533
+ class << self
3534
+ # source://sorbet-runtime/0.5.11406/lib/types/struct.rb#13
3535
+ def inherited(s); end
3536
+
3537
+ # Parse a line formatted as `%h %at` into a `Commit`
3538
+ #
3539
+ # source://spoom//lib/spoom/context/git.rb#14
3540
+ sig { params(string: ::String).returns(T.nilable(::Spoom::Git::Commit)) }
3541
+ def parse_line(string); end
3542
+ end
3543
+ end
3544
+
3545
+ # source://spoom//lib/spoom/sorbet/lsp/base.rb#5
3546
+ module Spoom::LSP; end
3547
+
3548
+ # source://spoom//lib/spoom/sorbet/lsp.rb#13
3549
+ class Spoom::LSP::Client
3550
+ # source://spoom//lib/spoom/sorbet/lsp.rb#17
3551
+ sig { params(sorbet_bin: ::String, sorbet_args: ::String, path: ::String).void }
3552
+ def initialize(sorbet_bin, *sorbet_args, path: T.unsafe(nil)); end
3553
+
3554
+ # source://spoom//lib/spoom/sorbet/lsp.rb#229
3555
+ sig { void }
3556
+ def close; end
3557
+
3558
+ # source://spoom//lib/spoom/sorbet/lsp.rb#131
3559
+ sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::Location]) }
3560
+ def definitions(uri, line, column); end
3561
+
3562
+ # source://spoom//lib/spoom/sorbet/lsp.rb#212
3563
+ sig { params(uri: ::String).returns(T::Array[::Spoom::LSP::DocumentSymbol]) }
3564
+ def document_symbols(uri); end
3565
+
3566
+ # source://spoom//lib/spoom/sorbet/lsp.rb#89
3567
+ sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T.nilable(::Spoom::LSP::Hover)) }
3568
+ def hover(uri, line, column); end
3569
+
3570
+ # source://spoom//lib/spoom/sorbet/lsp.rb#27
3571
+ sig { returns(::Integer) }
3572
+ def next_id; end
3573
+
3574
+ # LSP requests
3575
+ #
3576
+ # @raise [Error::AlreadyOpen]
3577
+ #
3578
+ # source://spoom//lib/spoom/sorbet/lsp.rb#72
3579
+ sig { params(workspace_path: ::String).void }
3580
+ def open(workspace_path); end
3581
+
3582
+ # source://spoom//lib/spoom/sorbet/lsp.rb#54
3583
+ sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
3584
+ def read; end
3585
+
3586
+ # @raise [Error::BadHeaders]
3587
+ #
3588
+ # source://spoom//lib/spoom/sorbet/lsp.rb#43
3589
+ sig { returns(T.nilable(::String)) }
3590
+ def read_raw; end
3591
+
3592
+ # source://spoom//lib/spoom/sorbet/lsp.rb#173
3593
+ sig do
3594
+ params(
3595
+ uri: ::String,
3596
+ line: ::Integer,
3597
+ column: ::Integer,
3598
+ include_decl: T::Boolean
3599
+ ).returns(T::Array[::Spoom::LSP::Location])
3600
+ end
3601
+ def references(uri, line, column, include_decl = T.unsafe(nil)); end
3602
+
3603
+ # source://spoom//lib/spoom/sorbet/lsp.rb#37
3604
+ sig { params(message: ::Spoom::LSP::Message).returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
3605
+ def send(message); end
3606
+
3607
+ # source://spoom//lib/spoom/sorbet/lsp.rb#32
3608
+ sig { params(json_string: ::String).void }
3609
+ def send_raw(json_string); end
3610
+
3611
+ # source://spoom//lib/spoom/sorbet/lsp.rb#110
3612
+ sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::SignatureHelp]) }
3613
+ def signatures(uri, line, column); end
3614
+
3615
+ # source://spoom//lib/spoom/sorbet/lsp.rb#197
3616
+ sig { params(query: ::String).returns(T::Array[::Spoom::LSP::DocumentSymbol]) }
3617
+ def symbols(query); end
3618
+
3619
+ # source://spoom//lib/spoom/sorbet/lsp.rb#152
3620
+ sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::Location]) }
3621
+ def type_definitions(uri, line, column); end
3622
+ end
3623
+
3624
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#178
3625
+ class Spoom::LSP::Diagnostic < ::T::Struct
3626
+ include ::Spoom::LSP::PrintableSymbol
3627
+
3628
+ const :range, ::Spoom::LSP::Range
3629
+ const :code, ::Integer
3630
+ const :message, ::String
3631
+ const :information, ::Object
3632
+
3633
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#202
3634
+ sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
3635
+ def accept_printer(printer); end
3636
+
3637
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#207
3638
+ sig { returns(::String) }
3639
+ def to_s; end
3640
+
3641
+ class << self
3642
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#191
3643
+ sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Diagnostic) }
3644
+ def from_json(json); end
3645
+
3646
+ # source://sorbet-runtime/0.5.11406/lib/types/struct.rb#13
3647
+ def inherited(s); end
3648
+ end
3649
+ end
3650
+
3651
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#212
3652
+ class Spoom::LSP::DocumentSymbol < ::T::Struct
3653
+ include ::Spoom::LSP::PrintableSymbol
3654
+
3655
+ const :name, ::String
3656
+ const :detail, T.nilable(::String)
3657
+ const :kind, ::Integer
3658
+ const :location, T.nilable(::Spoom::LSP::Location)
3659
+ const :range, T.nilable(::Spoom::LSP::Range)
3660
+ const :children, T::Array[::Spoom::LSP::DocumentSymbol]
3661
+
3662
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#240
3663
+ sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
3664
+ def accept_printer(printer); end
3665
+
3666
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#272
3667
+ sig { returns(::String) }
3668
+ def kind_string; end
3669
+
3670
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#267
3671
+ sig { returns(::String) }
3672
+ def to_s; end
3673
+
3674
+ class << self
3675
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#227
3676
+ sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::DocumentSymbol) }
3677
+ def from_json(json); end
3678
+
3679
+ # source://sorbet-runtime/0.5.11406/lib/types/struct.rb#13
3680
+ def inherited(s); end
3681
+ end
3682
+ end
3683
+
3684
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#276
3685
+ Spoom::LSP::DocumentSymbol::SYMBOL_KINDS = T.let(T.unsafe(nil), Hash)
3686
+
3687
+ # source://spoom//lib/spoom/sorbet/lsp/errors.rb#6
3688
+ class Spoom::LSP::Error < ::StandardError; end
3689
+
3690
+ # source://spoom//lib/spoom/sorbet/lsp/errors.rb#7
3691
+ class Spoom::LSP::Error::AlreadyOpen < ::Spoom::LSP::Error; end
3692
+
3693
+ # source://spoom//lib/spoom/sorbet/lsp/errors.rb#8
3694
+ class Spoom::LSP::Error::BadHeaders < ::Spoom::LSP::Error; end
3695
+
3696
+ # source://spoom//lib/spoom/sorbet/lsp/errors.rb#10
3697
+ class Spoom::LSP::Error::Diagnostics < ::Spoom::LSP::Error
3698
+ # source://spoom//lib/spoom/sorbet/lsp/errors.rb#32
3699
+ sig { params(uri: ::String, diagnostics: T::Array[::Spoom::LSP::Diagnostic]).void }
3700
+ def initialize(uri, diagnostics); end
3701
+
3702
+ # source://spoom//lib/spoom/sorbet/lsp/errors.rb#17
3703
+ sig { returns(T::Array[::Spoom::LSP::Diagnostic]) }
3704
+ def diagnostics; end
3705
+
3706
+ # source://spoom//lib/spoom/sorbet/lsp/errors.rb#14
3707
+ sig { returns(::String) }
3708
+ def uri; end
3709
+
3710
+ class << self
3711
+ # source://spoom//lib/spoom/sorbet/lsp/errors.rb#23
3712
+ sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Error::Diagnostics) }
3713
+ def from_json(json); end
3714
+ end
3715
+ end
3716
+
3717
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#19
3718
+ class Spoom::LSP::Hover < ::T::Struct
3719
+ include ::Spoom::LSP::PrintableSymbol
3720
+
3721
+ const :contents, ::String
3722
+ const :range, T.nilable(T::Range[T.untyped])
3723
+
3724
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#39
3725
+ sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
3726
+ def accept_printer(printer); end
3727
+
3728
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#45
3729
+ sig { returns(::String) }
3730
+ def to_s; end
3731
+
3732
+ class << self
3733
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#30
3734
+ sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Hover) }
3735
+ def from_json(json); end
3736
+
3737
+ # source://sorbet-runtime/0.5.11406/lib/types/struct.rb#13
3738
+ def inherited(s); end
3739
+ end
3740
+ end
3741
+
3742
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#112
3743
+ class Spoom::LSP::Location < ::T::Struct
3744
+ include ::Spoom::LSP::PrintableSymbol
3745
+
3746
+ const :uri, ::String
3747
+ const :range, ::Spoom::LSP::Range
3748
+
3749
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#132
3750
+ sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
3751
+ def accept_printer(printer); end
3752
+
3753
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#138
3754
+ sig { returns(::String) }
3755
+ def to_s; end
3756
+
3757
+ class << self
3758
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#123
3759
+ sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Location) }
3760
+ def from_json(json); end
3761
+
3762
+ # source://sorbet-runtime/0.5.11406/lib/types/struct.rb#13
3763
+ def inherited(s); end
3764
+ end
3765
+ end
3766
+
3767
+ # A general message as defined by JSON-RPC.
3768
+ #
3769
+ # The language server protocol always uses `"2.0"` as the `jsonrpc` version.
3770
+ #
3771
+ # source://spoom//lib/spoom/sorbet/lsp/base.rb#12
3772
+ class Spoom::LSP::Message
3773
+ # source://spoom//lib/spoom/sorbet/lsp/base.rb#16
3774
+ sig { void }
3775
+ def initialize; end
3776
+
3777
+ # source://spoom//lib/spoom/sorbet/lsp/base.rb#21
3778
+ sig { returns(T::Hash[T.untyped, T.untyped]) }
3779
+ def as_json; end
3780
+
3781
+ # source://spoom//lib/spoom/sorbet/lsp/base.rb#29
3782
+ sig { params(args: T.untyped).returns(::String) }
3783
+ def to_json(*args); end
3784
+ end
3785
+
3786
+ # A notification message.
3787
+ #
3788
+ # A processed notification message must not send a response back. They work like events.
3789
+ #
3790
+ # source://spoom//lib/spoom/sorbet/lsp/base.rb#58
3791
+ class Spoom::LSP::Notification < ::Spoom::LSP::Message
3792
+ # source://spoom//lib/spoom/sorbet/lsp/base.rb#68
3793
+ sig { params(method: ::String, params: T::Hash[T.untyped, T.untyped]).void }
3794
+ def initialize(method, params); end
3795
+
3796
+ # source://spoom//lib/spoom/sorbet/lsp/base.rb#62
3797
+ sig { returns(::String) }
3798
+ def method; end
3799
+
3800
+ # source://spoom//lib/spoom/sorbet/lsp/base.rb#65
3801
+ sig { returns(T::Hash[T.untyped, T.untyped]) }
3802
+ def params; end
3803
+ end
3804
+
3805
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#50
3806
+ class Spoom::LSP::Position < ::T::Struct
3807
+ include ::Spoom::LSP::PrintableSymbol
3808
+
3809
+ const :line, ::Integer
3810
+ const :char, ::Integer
3811
+
3812
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#70
3813
+ sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
3814
+ def accept_printer(printer); end
3815
+
3816
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#75
3817
+ sig { returns(::String) }
3818
+ def to_s; end
3819
+
3820
+ class << self
3821
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#61
3822
+ sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Position) }
3823
+ def from_json(json); end
3824
+
3825
+ # source://sorbet-runtime/0.5.11406/lib/types/struct.rb#13
3826
+ def inherited(s); end
3827
+ end
3828
+ end
3829
+
3830
+ # @abstract Subclasses must implement the `abstract` methods below.
3831
+ #
3832
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#9
3833
+ module Spoom::LSP::PrintableSymbol
3834
+ interface!
3835
+
3836
+ # @abstract
3837
+ #
3838
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#16
3839
+ sig { abstract.params(printer: ::Spoom::LSP::SymbolPrinter).void }
3840
+ def accept_printer(printer); end
3841
+ end
3842
+
3843
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#80
3844
+ class Spoom::LSP::Range < ::T::Struct
3845
+ include ::Spoom::LSP::PrintableSymbol
3846
+
3847
+ const :start, ::Spoom::LSP::Position
3848
+ const :end, ::Spoom::LSP::Position
3849
+
3850
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#100
3851
+ sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
3852
+ def accept_printer(printer); end
3853
+
3854
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#107
3855
+ sig { returns(::String) }
3856
+ def to_s; end
3857
+
3858
+ class << self
3859
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#91
3860
+ sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Range) }
3861
+ def from_json(json); end
3862
+
3863
+ # source://sorbet-runtime/0.5.11406/lib/types/struct.rb#13
3864
+ def inherited(s); end
3865
+ end
3866
+ end
3867
+
3868
+ # A request message to describe a request between the client and the server.
3869
+ #
3870
+ # Every processed request must send a response back to the sender of the request.
3871
+ #
3872
+ # source://spoom//lib/spoom/sorbet/lsp/base.rb#37
3873
+ class Spoom::LSP::Request < ::Spoom::LSP::Message
3874
+ # source://spoom//lib/spoom/sorbet/lsp/base.rb#47
3875
+ sig { params(id: ::Integer, method: ::String, params: T::Hash[T.untyped, T.untyped]).void }
3876
+ def initialize(id, method, params); end
3877
+
3878
+ # source://spoom//lib/spoom/sorbet/lsp/base.rb#41
3879
+ sig { returns(::Integer) }
3880
+ def id; end
3881
+
3882
+ # source://spoom//lib/spoom/sorbet/lsp/base.rb#44
3883
+ sig { returns(T::Hash[T.untyped, T.untyped]) }
3884
+ def params; end
3885
+ end
3886
+
3887
+ # source://spoom//lib/spoom/sorbet/lsp/errors.rb#40
3888
+ class Spoom::LSP::ResponseError < ::Spoom::LSP::Error
3889
+ # source://spoom//lib/spoom/sorbet/lsp/errors.rb#63
3890
+ sig { params(code: ::Integer, message: ::String, data: T::Hash[T.untyped, T.untyped]).void }
3891
+ def initialize(code, message, data); end
3892
+
3893
+ # source://spoom//lib/spoom/sorbet/lsp/errors.rb#44
3894
+ sig { returns(::Integer) }
3895
+ def code; end
3896
+
3897
+ # source://spoom//lib/spoom/sorbet/lsp/errors.rb#47
3898
+ sig { returns(T::Hash[T.untyped, T.untyped]) }
3899
+ def data; end
3900
+
3901
+ class << self
3902
+ # source://spoom//lib/spoom/sorbet/lsp/errors.rb#53
3903
+ sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::ResponseError) }
3904
+ def from_json(json); end
3905
+ end
3906
+ end
3907
+
3908
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#143
3909
+ class Spoom::LSP::SignatureHelp < ::T::Struct
3910
+ include ::Spoom::LSP::PrintableSymbol
3911
+
3912
+ const :label, T.nilable(::String)
3913
+ const :doc, ::Object
3914
+ const :params, T::Array[T.untyped]
3915
+
3916
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#165
3917
+ sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
3918
+ def accept_printer(printer); end
3919
+
3920
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#173
3921
+ sig { returns(::String) }
3922
+ def to_s; end
3923
+
3924
+ class << self
3925
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#155
3926
+ sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::SignatureHelp) }
3927
+ def from_json(json); end
3928
+
3929
+ # source://sorbet-runtime/0.5.11406/lib/types/struct.rb#13
3930
+ def inherited(s); end
3931
+ end
3932
+ end
3933
+
3934
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#309
3935
+ class Spoom::LSP::SymbolPrinter < ::Spoom::Printer
3936
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#326
3937
+ sig do
3938
+ params(
3939
+ out: T.any(::IO, ::StringIO),
3940
+ colors: T::Boolean,
3941
+ indent_level: ::Integer,
3942
+ prefix: T.nilable(::String)
3943
+ ).void
3944
+ end
3945
+ def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil), prefix: T.unsafe(nil)); end
3946
+
3947
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#348
3948
+ sig { params(uri: ::String).returns(::String) }
3949
+ def clean_uri(uri); end
3950
+
3951
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#316
3952
+ sig { returns(T.nilable(::String)) }
3953
+ def prefix; end
3954
+
3955
+ # @return [String, nil]
3956
+ #
3957
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#316
3958
+ def prefix=(_arg0); end
3959
+
3960
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#356
3961
+ sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void }
3962
+ def print_list(objects); end
3963
+
3964
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#336
3965
+ sig { params(object: T.nilable(::Spoom::LSP::PrintableSymbol)).void }
3966
+ def print_object(object); end
3967
+
3968
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#343
3969
+ sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void }
3970
+ def print_objects(objects); end
3971
+
3972
+ # source://spoom//lib/spoom/sorbet/lsp/structures.rb#313
3973
+ sig { returns(T::Set[::Integer]) }
3974
+ def seen; end
3975
+ end
3976
+
3977
+ # source://spoom//lib/spoom/printer.rb#7
3978
+ class Spoom::Printer
3979
+ include ::Spoom::Colorize
3980
+
3981
+ # source://spoom//lib/spoom/printer.rb#17
3982
+ sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean, indent_level: ::Integer).void }
3983
+ def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end
3984
+
3985
+ # Colorize `string` with color if `@colors`
3986
+ #
3987
+ # source://spoom//lib/spoom/printer.rb#78
3988
+ sig { params(string: ::String, color: ::Spoom::Color).returns(::String) }
3989
+ def colorize(string, *color); end
3990
+
3991
+ # Decrease indent level
3992
+ #
3993
+ # source://spoom//lib/spoom/printer.rb#31
3994
+ sig { void }
3995
+ def dedent; end
3996
+
3997
+ # Increase indent level
3998
+ #
3999
+ # source://spoom//lib/spoom/printer.rb#25
4000
+ sig { void }
4001
+ def indent; end
4002
+
4003
+ # source://spoom//lib/spoom/printer.rb#14
4004
+ sig { returns(T.any(::IO, ::StringIO)) }
4005
+ def out; end
4006
+
4007
+ # @return [IO, StringIO]
4008
+ #
4009
+ # source://spoom//lib/spoom/printer.rb#14
4010
+ def out=(_arg0); end
4011
+
4012
+ # Print `string` into `out`
4013
+ #
4014
+ # source://spoom//lib/spoom/printer.rb#37
4015
+ sig { params(string: T.nilable(::String)).void }
4016
+ def print(string); end
4017
+
4018
+ # Print `string` colored with `color` into `out`
4019
+ #
4020
+ # Does not use colors unless `@colors`.
4021
+ #
4022
+ # source://spoom//lib/spoom/printer.rb#47
4023
+ sig { params(string: T.nilable(::String), color: ::Spoom::Color).void }
4024
+ def print_colored(string, *color); end
4025
+
4026
+ # Print `string` with indent and newline
4027
+ #
4028
+ # source://spoom//lib/spoom/printer.rb#62
4029
+ sig { params(string: T.nilable(::String)).void }
4030
+ def printl(string); end
4031
+
4032
+ # Print a new line into `out`
4033
+ #
4034
+ # source://spoom//lib/spoom/printer.rb#56
4035
+ sig { void }
4036
+ def printn; end
4037
+
4038
+ # Print an indent space into `out`
4039
+ #
4040
+ # source://spoom//lib/spoom/printer.rb#72
4041
+ sig { void }
4042
+ def printt; end
4043
+ end
4044
+
4045
+ # source://spoom//lib/spoom.rb#10
4046
+ Spoom::SPOOM_PATH = T.let(T.unsafe(nil), String)
4047
+
4048
+ # source://spoom//lib/spoom/sorbet/config.rb#5
4049
+ module Spoom::Sorbet; end
4050
+
4051
+ # source://spoom//lib/spoom/sorbet.rb#39
4052
+ Spoom::Sorbet::BIN_PATH = T.let(T.unsafe(nil), String)
4053
+
4054
+ # source://spoom//lib/spoom/sorbet.rb#36
4055
+ Spoom::Sorbet::CONFIG_PATH = T.let(T.unsafe(nil), String)
4056
+
4057
+ # Parse Sorbet config files
4058
+ #
4059
+ # Parses a Sorbet config file:
4060
+ #
4061
+ # ```ruby
4062
+ # config = Spoom::Sorbet::Config.parse_file("sorbet/config")
4063
+ # puts config.paths # "."
4064
+ # ```
4065
+ #
4066
+ # Parses a Sorbet config string:
4067
+ #
4068
+ # ```ruby
4069
+ # config = Spoom::Sorbet::Config.parse_string(<<~CONFIG)
4070
+ # a
4071
+ # --file=b
4072
+ # --ignore=c
4073
+ # CONFIG
4074
+ # puts config.paths # "a", "b"
4075
+ # puts config.ignore # "c"
4076
+ # ```
4077
+ #
4078
+ # source://spoom//lib/spoom/sorbet/config.rb#26
4079
+ class Spoom::Sorbet::Config
4080
+ # source://spoom//lib/spoom/sorbet/config.rb#38
4081
+ sig { void }
4082
+ def initialize; end
4083
+
4084
+ # @return [Array<String>]
4085
+ #
4086
+ # source://spoom//lib/spoom/sorbet/config.rb#32
4087
+ def allowed_extensions; end
4088
+
4089
+ # @return [Array<String>]
4090
+ #
4091
+ # source://spoom//lib/spoom/sorbet/config.rb#32
4092
+ def allowed_extensions=(_arg0); end
4093
+
4094
+ # source://spoom//lib/spoom/sorbet/config.rb#46
4095
+ sig { returns(::Spoom::Sorbet::Config) }
4096
+ def copy; end
4097
+
4098
+ # @return [Array<String>]
4099
+ #
4100
+ # source://spoom//lib/spoom/sorbet/config.rb#32
4101
+ def ignore; end
4102
+
4103
+ # @return [Array<String>]
4104
+ #
4105
+ # source://spoom//lib/spoom/sorbet/config.rb#32
4106
+ def ignore=(_arg0); end
4107
+
4108
+ # source://spoom//lib/spoom/sorbet/config.rb#35
4109
+ sig { returns(T::Boolean) }
4110
+ def no_stdlib; end
4111
+
4112
+ # @return [Boolean]
4113
+ #
4114
+ # source://spoom//lib/spoom/sorbet/config.rb#35
4115
+ def no_stdlib=(_arg0); end
4116
+
4117
+ # Returns self as a string of options that can be passed to Sorbet
4118
+ #
4119
+ # Example:
4120
+ # ~~~rb
4121
+ # config = Sorbet::Config.new
4122
+ # config.paths << "/foo"
4123
+ # config.paths << "/bar"
4124
+ # config.ignore << "/baz"
4125
+ # config.allowed_extensions << ".rb"
4126
+ #
4127
+ # puts config.options_string # "/foo /bar --ignore /baz --allowed-extension .rb"
4128
+ # ~~~
4129
+ #
4130
+ # source://spoom//lib/spoom/sorbet/config.rb#68
4131
+ sig { returns(::String) }
4132
+ def options_string; end
4133
+
4134
+ # source://spoom//lib/spoom/sorbet/config.rb#32
4135
+ sig { returns(T::Array[::String]) }
4136
+ def paths; end
4137
+
4138
+ # @return [Array<String>]
4139
+ #
4140
+ # source://spoom//lib/spoom/sorbet/config.rb#32
4141
+ def paths=(_arg0); end
4142
+
4143
+ class << self
4144
+ # source://spoom//lib/spoom/sorbet/config.rb#81
4145
+ sig { params(sorbet_config_path: ::String).returns(::Spoom::Sorbet::Config) }
4146
+ def parse_file(sorbet_config_path); end
4147
+
4148
+ # source://spoom//lib/spoom/sorbet/config.rb#86
4149
+ sig { params(sorbet_config: ::String).returns(::Spoom::Sorbet::Config) }
4150
+ def parse_string(sorbet_config); end
4151
+
4152
+ private
4153
+
4154
+ # source://spoom//lib/spoom/sorbet/config.rb#150
4155
+ sig { params(line: ::String).returns(::String) }
4156
+ def parse_option(line); end
4157
+ end
4158
+ end
4159
+
4160
+ # source://spoom//lib/spoom/sorbet/config.rb#29
4161
+ Spoom::Sorbet::Config::DEFAULT_ALLOWED_EXTENSIONS = T.let(T.unsafe(nil), Array)
4162
+
4163
+ # source://spoom//lib/spoom/sorbet.rb#14
4164
+ class Spoom::Sorbet::Error < ::StandardError
4165
+ # source://spoom//lib/spoom/sorbet.rb#29
4166
+ sig { params(message: ::String, result: ::Spoom::ExecResult).void }
4167
+ def initialize(message, result); end
4168
+
4169
+ # source://spoom//lib/spoom/sorbet.rb#21
4170
+ sig { returns(::Spoom::ExecResult) }
4171
+ def result; end
4172
+ end
4173
+
4174
+ # source://spoom//lib/spoom/sorbet.rb#17
4175
+ class Spoom::Sorbet::Error::Killed < ::Spoom::Sorbet::Error; end
4176
+
4177
+ # source://spoom//lib/spoom/sorbet.rb#18
4178
+ class Spoom::Sorbet::Error::Segfault < ::Spoom::Sorbet::Error; end
4179
+
4180
+ # source://spoom//lib/spoom/sorbet/errors.rb#6
4181
+ module Spoom::Sorbet::Errors
4182
+ class << self
4183
+ # source://spoom//lib/spoom/sorbet/errors.rb#13
4184
+ sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error]).returns(T::Array[::Spoom::Sorbet::Errors::Error]) }
4185
+ def sort_errors_by_code(errors); end
4186
+ end
4187
+ end
4188
+
4189
+ # source://spoom//lib/spoom/sorbet/errors.rb#7
4190
+ Spoom::Sorbet::Errors::DEFAULT_ERROR_URL_BASE = T.let(T.unsafe(nil), String)
4191
+
4192
+ # source://spoom//lib/spoom/sorbet/errors.rb#125
4193
+ class Spoom::Sorbet::Errors::Error
4194
+ include ::Comparable
4195
+
4196
+ # source://spoom//lib/spoom/sorbet/errors.rb#151
4197
+ sig do
4198
+ params(
4199
+ file: T.nilable(::String),
4200
+ line: T.nilable(::Integer),
4201
+ message: T.nilable(::String),
4202
+ code: T.nilable(::Integer),
4203
+ more: T::Array[::String]
4204
+ ).void
4205
+ end
4206
+ def initialize(file, line, message, code, more = T.unsafe(nil)); end
4207
+
4208
+ # By default errors are sorted by location
4209
+ #
4210
+ # source://spoom//lib/spoom/sorbet/errors.rb#162
4211
+ sig { params(other: T.untyped).returns(::Integer) }
4212
+ def <=>(other); end
4213
+
4214
+ # @return [Integer, nil]
4215
+ #
4216
+ # source://spoom//lib/spoom/sorbet/errors.rb#133
4217
+ def code; end
4218
+
4219
+ # source://spoom//lib/spoom/sorbet/errors.rb#130
4220
+ sig { returns(T.nilable(::String)) }
4221
+ def file; end
4222
+
4223
+ # Other files associated with the error
4224
+ #
4225
+ # source://spoom//lib/spoom/sorbet/errors.rb#140
4226
+ sig { returns(T::Set[::String]) }
4227
+ def files_from_error_sections; end
4228
+
4229
+ # source://spoom//lib/spoom/sorbet/errors.rb#133
4230
+ sig { returns(T.nilable(::Integer)) }
4231
+ def line; end
4232
+
4233
+ # @return [String, nil]
4234
+ #
4235
+ # source://spoom//lib/spoom/sorbet/errors.rb#130
4236
+ def message; end
4237
+
4238
+ # source://spoom//lib/spoom/sorbet/errors.rb#136
4239
+ sig { returns(T::Array[::String]) }
4240
+ def more; end
4241
+
4242
+ # source://spoom//lib/spoom/sorbet/errors.rb#169
4243
+ sig { returns(::String) }
4244
+ def to_s; end
4245
+ end
4246
+
4247
+ # Parse errors from Sorbet output
4248
+ #
4249
+ # source://spoom//lib/spoom/sorbet/errors.rb#18
4250
+ class Spoom::Sorbet::Errors::Parser
4251
+ # source://spoom//lib/spoom/sorbet/errors.rb#43
4252
+ sig { params(error_url_base: ::String).void }
4253
+ def initialize(error_url_base: T.unsafe(nil)); end
4254
+
4255
+ # source://spoom//lib/spoom/sorbet/errors.rb#50
4256
+ sig { params(output: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) }
4257
+ def parse(output); end
4258
+
4259
+ private
4260
+
4261
+ # source://spoom//lib/spoom/sorbet/errors.rb#114
4262
+ sig { params(line: ::String).void }
4263
+ def append_error(line); end
4264
+
4265
+ # source://spoom//lib/spoom/sorbet/errors.rb#106
4266
+ sig { void }
4267
+ def close_error; end
4268
+
4269
+ # source://spoom//lib/spoom/sorbet/errors.rb#73
4270
+ sig { params(error_url_base: ::String).returns(::Regexp) }
4271
+ def error_line_match_regexp(error_url_base); end
4272
+
4273
+ # source://spoom//lib/spoom/sorbet/errors.rb#90
4274
+ sig { params(line: ::String).returns(T.nilable(::Spoom::Sorbet::Errors::Error)) }
4275
+ def match_error_line(line); end
4276
+
4277
+ # source://spoom//lib/spoom/sorbet/errors.rb#99
4278
+ sig { params(error: ::Spoom::Sorbet::Errors::Error).void }
4279
+ def open_error(error); end
4280
+
4281
+ class << self
4282
+ # source://spoom//lib/spoom/sorbet/errors.rb#36
4283
+ sig { params(output: ::String, error_url_base: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) }
4284
+ def parse_string(output, error_url_base: T.unsafe(nil)); end
4285
+ end
4286
+ end
4287
+
4288
+ # source://spoom//lib/spoom/sorbet/errors.rb#21
4289
+ Spoom::Sorbet::Errors::Parser::HEADER = T.let(T.unsafe(nil), Array)
4290
+
4291
+ # source://spoom//lib/spoom/sorbet.rb#37
4292
+ Spoom::Sorbet::GEM_PATH = T.let(T.unsafe(nil), String)
4293
+
4294
+ # source://spoom//lib/spoom/sorbet.rb#38
4295
+ Spoom::Sorbet::GEM_VERSION = T.let(T.unsafe(nil), String)
4296
+
4297
+ # source://spoom//lib/spoom/sorbet.rb#41
4298
+ Spoom::Sorbet::KILLED_CODE = T.let(T.unsafe(nil), Integer)
4299
+
4300
+ # source://spoom//lib/spoom/sorbet/metrics.rb#8
4301
+ module Spoom::Sorbet::MetricsParser
4302
+ class << self
4303
+ # source://spoom//lib/spoom/sorbet/metrics.rb#15
4304
+ sig { params(path: ::String, prefix: ::String).returns(T::Hash[::String, ::Integer]) }
4305
+ def parse_file(path, prefix = T.unsafe(nil)); end
4306
+
4307
+ # source://spoom//lib/spoom/sorbet/metrics.rb#25
4308
+ sig { params(obj: T::Hash[::String, T.untyped], prefix: ::String).returns(T::Hash[::String, ::Integer]) }
4309
+ def parse_hash(obj, prefix = T.unsafe(nil)); end
4310
+
4311
+ # source://spoom//lib/spoom/sorbet/metrics.rb#20
4312
+ sig { params(string: ::String, prefix: ::String).returns(T::Hash[::String, ::Integer]) }
4313
+ def parse_string(string, prefix = T.unsafe(nil)); end
4314
+ end
4315
+ end
4316
+
4317
+ # source://spoom//lib/spoom/sorbet/metrics.rb#9
4318
+ Spoom::Sorbet::MetricsParser::DEFAULT_PREFIX = T.let(T.unsafe(nil), String)
4319
+
4320
+ # source://spoom//lib/spoom/sorbet.rb#42
4321
+ Spoom::Sorbet::SEGFAULT_CODE = T.let(T.unsafe(nil), Integer)
4322
+
4323
+ # source://spoom//lib/spoom/sorbet/sigils.rb#9
4324
+ module Spoom::Sorbet::Sigils
4325
+ class << self
4326
+ # changes the sigil in the file at the passed path to the specified new strictness
4327
+ #
4328
+ # source://spoom//lib/spoom/sorbet/sigils.rb#72
4329
+ sig { params(path: T.any(::Pathname, ::String), new_strictness: ::String).returns(T::Boolean) }
4330
+ def change_sigil_in_file(path, new_strictness); end
4331
+
4332
+ # changes the sigil to have a new strictness in a list of files
4333
+ #
4334
+ # source://spoom//lib/spoom/sorbet/sigils.rb#83
4335
+ sig { params(path_list: T::Array[::String], new_strictness: ::String).returns(T::Array[::String]) }
4336
+ def change_sigil_in_files(path_list, new_strictness); end
4337
+
4338
+ # returns a string containing the strictness of a sigil in a file at the passed path
4339
+ # * returns nil if no sigil
4340
+ #
4341
+ # source://spoom//lib/spoom/sorbet/sigils.rb#63
4342
+ sig { params(path: T.any(::Pathname, ::String)).returns(T.nilable(::String)) }
4343
+ def file_strictness(path); end
4344
+
4345
+ # returns the full sigil comment string for the passed strictness
4346
+ #
4347
+ # source://spoom//lib/spoom/sorbet/sigils.rb#38
4348
+ sig { params(strictness: ::String).returns(::String) }
4349
+ def sigil_string(strictness); end
4350
+
4351
+ # returns the strictness of a sigil in the passed file content string (nil if no sigil)
4352
+ #
4353
+ # source://spoom//lib/spoom/sorbet/sigils.rb#50
4354
+ sig { params(content: ::String).returns(T.nilable(::String)) }
4355
+ def strictness_in_content(content); end
4356
+
4357
+ # returns a string which is the passed content but with the sigil updated to a new strictness
4358
+ #
4359
+ # source://spoom//lib/spoom/sorbet/sigils.rb#56
4360
+ sig { params(content: ::String, new_strictness: ::String).returns(::String) }
4361
+ def update_sigil(content, new_strictness); end
4362
+
4363
+ # returns true if the passed string is a valid strictness (else false)
4364
+ #
4365
+ # source://spoom//lib/spoom/sorbet/sigils.rb#44
4366
+ sig { params(strictness: ::String).returns(T::Boolean) }
4367
+ def valid_strictness?(strictness); end
4368
+ end
4369
+ end
4370
+
4371
+ # source://spoom//lib/spoom/sorbet/sigils.rb#31
4372
+ Spoom::Sorbet::Sigils::SIGIL_REGEXP = T.let(T.unsafe(nil), Regexp)
4373
+
4374
+ # source://spoom//lib/spoom/sorbet/sigils.rb#13
4375
+ Spoom::Sorbet::Sigils::STRICTNESS_FALSE = T.let(T.unsafe(nil), String)
4376
+
4377
+ # source://spoom//lib/spoom/sorbet/sigils.rb#12
4378
+ Spoom::Sorbet::Sigils::STRICTNESS_IGNORE = T.let(T.unsafe(nil), String)
4379
+
4380
+ # source://spoom//lib/spoom/sorbet/sigils.rb#17
4381
+ Spoom::Sorbet::Sigils::STRICTNESS_INTERNAL = T.let(T.unsafe(nil), String)
4382
+
4383
+ # source://spoom//lib/spoom/sorbet/sigils.rb#15
4384
+ Spoom::Sorbet::Sigils::STRICTNESS_STRICT = T.let(T.unsafe(nil), String)
4385
+
4386
+ # source://spoom//lib/spoom/sorbet/sigils.rb#16
4387
+ Spoom::Sorbet::Sigils::STRICTNESS_STRONG = T.let(T.unsafe(nil), String)
4388
+
4389
+ # source://spoom//lib/spoom/sorbet/sigils.rb#14
4390
+ Spoom::Sorbet::Sigils::STRICTNESS_TRUE = T.let(T.unsafe(nil), String)
4391
+
4392
+ # source://spoom//lib/spoom/sorbet/sigils.rb#19
4393
+ Spoom::Sorbet::Sigils::VALID_STRICTNESS = T.let(T.unsafe(nil), Array)
4394
+
4395
+ # source://spoom//lib/spoom/timeline.rb#5
4396
+ class Spoom::Timeline
4397
+ # source://spoom//lib/spoom/timeline.rb#9
4398
+ sig { params(context: ::Spoom::Context, from: ::Time, to: ::Time).void }
4399
+ def initialize(context, from, to); end
4400
+
4401
+ # Return one commit for each date in `dates`
4402
+ #
4403
+ # source://spoom//lib/spoom/timeline.rb#36
4404
+ sig { params(dates: T::Array[::Time]).returns(T::Array[::Spoom::Git::Commit]) }
4405
+ def commits_for_dates(dates); end
4406
+
4407
+ # Return all months between `from` and `to`
4408
+ #
4409
+ # source://spoom//lib/spoom/timeline.rb#23
4410
+ sig { returns(T::Array[::Time]) }
4411
+ def months; end
4412
+
4413
+ # Return one commit for each month between `from` and `to`
4414
+ #
4415
+ # source://spoom//lib/spoom/timeline.rb#17
4416
+ sig { returns(T::Array[::Spoom::Git::Commit]) }
4417
+ def ticks; end
4418
+ end
4419
+
4420
+ # source://spoom//lib/spoom/version.rb#5
4421
+ Spoom::VERSION = T.let(T.unsafe(nil), String)