js-routes 2.2.7 → 2.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -9
- data/Gemfile +5 -0
- data/Readme.md +63 -47
- data/bin/tapioca +27 -0
- data/js-routes.gemspec +4 -1
- data/lib/js_routes/configuration.rb +80 -34
- data/lib/js_routes/engine.rb +2 -0
- data/lib/js_routes/generators/base.rb +15 -1
- data/lib/js_routes/generators/middleware.rb +3 -6
- data/lib/js_routes/generators/webpacker.rb +2 -4
- data/lib/js_routes/instance.rb +42 -15
- data/lib/js_routes/middleware.rb +14 -3
- data/lib/js_routes/route.rb +57 -16
- data/lib/js_routes/types.rb +28 -0
- data/lib/js_routes/version.rb +2 -1
- data/lib/js_routes.rb +20 -7
- data/lib/routes.js +25 -3
- data/lib/routes.ts +30 -6
- data/sorbet/config +4 -0
- data/sorbet/rbi/annotations/.gitattributes +1 -0
- data/sorbet/rbi/annotations/actionpack.rbi +428 -0
- data/sorbet/rbi/annotations/actionview.rbi +75 -0
- data/sorbet/rbi/annotations/activesupport.rbi +421 -0
- data/sorbet/rbi/annotations/railties.rbi +61 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/actionpack@7.0.4.1.rbi +303 -0
- data/sorbet/rbi/gems/actionview@7.0.4.1.rbi +8 -0
- data/sorbet/rbi/gems/activesupport@7.0.4.1.rbi +16424 -0
- data/sorbet/rbi/gems/appraisal@2.4.1.rbi +584 -0
- data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
- data/sorbet/rbi/gems/bump@0.10.0.rbi +168 -0
- data/sorbet/rbi/gems/byebug@11.1.3.rbi +3606 -0
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +3426 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.2.0.rbi +11570 -0
- data/sorbet/rbi/gems/crass@1.0.6.rbi +8 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1083 -0
- data/sorbet/rbi/gems/erubi@1.12.0.rbi +145 -0
- data/sorbet/rbi/gems/i18n@1.12.0.rbi +2296 -0
- data/sorbet/rbi/gems/libv8-node@16.10.0.0.rbi +8 -0
- data/sorbet/rbi/gems/loofah@2.19.1.rbi +8 -0
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
- data/sorbet/rbi/gems/mini_racer@0.6.3.rbi +224 -0
- data/sorbet/rbi/gems/minitest@5.17.0.rbi +1457 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
- data/sorbet/rbi/gems/nokogiri@1.14.0.rbi +8 -0
- data/sorbet/rbi/gems/parallel@1.24.0.rbi +280 -0
- data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +951 -0
- data/sorbet/rbi/gems/prism@0.24.0.rbi +29744 -0
- data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +1150 -0
- data/sorbet/rbi/gems/pry@0.14.2.rbi +10075 -0
- data/sorbet/rbi/gems/racc@1.6.2.rbi +150 -0
- data/sorbet/rbi/gems/rack-test@2.0.2.rbi +8 -0
- data/sorbet/rbi/gems/rack@2.2.6.2.rbi +5585 -0
- data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +8 -0
- data/sorbet/rbi/gems/rails-html-sanitizer@1.5.0.rbi +8 -0
- data/sorbet/rbi/gems/railties@7.0.4.1.rbi +1959 -0
- data/sorbet/rbi/gems/rake@13.0.6.rbi +3072 -0
- data/sorbet/rbi/gems/rbi@0.1.9.rbi +3006 -0
- data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +10868 -0
- data/sorbet/rbi/gems/rspec-expectations@3.12.2.rbi +8100 -0
- data/sorbet/rbi/gems/rspec-mocks@3.12.3.rbi +5299 -0
- data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +1611 -0
- data/sorbet/rbi/gems/rspec@3.12.0.rbi +82 -0
- data/sorbet/rbi/gems/spoom@1.2.4.rbi +3777 -0
- data/sorbet/rbi/gems/sprockets-rails@3.4.2.rbi +14 -0
- data/sorbet/rbi/gems/sprockets@4.2.0.rbi +8 -0
- data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +23136 -0
- data/sorbet/rbi/gems/tapioca@0.12.0.rbi +3510 -0
- data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
- data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +5914 -0
- data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
- data/sorbet/rbi/gems/yard@0.9.34.rbi +18332 -0
- data/sorbet/rbi/gems/zeitwerk@2.6.8.rbi +8 -0
- data/sorbet/rbi/todo.rbi +31 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +4 -0
- data/spec/js_routes/default_serializer_spec.rb +1 -1
- data/spec/js_routes/module_types/dts_spec.rb +17 -2
- data/spec/js_routes/module_types/umd_spec.rb +2 -2
- data/spec/js_routes/options_spec.rb +6 -6
- data/spec/js_routes/rails_routes_compatibility_spec.rb +17 -12
- data/spec/js_routes/route_specification_spec.rb +1 -4
- data/spec/js_routes/{zzz_last_post_rails_init_spec.rb → zzz_sprockets_spec.rb} +1 -1
- data/spec/spec_helper.rb +4 -0
- metadata +82 -7
@@ -0,0 +1,3777 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `spoom` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem spoom`.
|
6
|
+
|
7
|
+
# source://spoom//lib/spoom.rb#7
|
8
|
+
module Spoom; end
|
9
|
+
|
10
|
+
# source://spoom//lib/spoom/cli/helper.rb#9
|
11
|
+
module Spoom::Cli; end
|
12
|
+
|
13
|
+
# source://spoom//lib/spoom/cli/bump.rb#9
|
14
|
+
class Spoom::Cli::Bump < ::Thor
|
15
|
+
include ::Spoom::Colorize
|
16
|
+
include ::Spoom::Cli::Helper
|
17
|
+
|
18
|
+
# source://spoom//lib/spoom/cli/bump.rb#49
|
19
|
+
sig { params(directory: ::String).void }
|
20
|
+
def bump(directory = T.unsafe(nil)); end
|
21
|
+
|
22
|
+
def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
|
23
|
+
|
24
|
+
# source://spoom//lib/spoom/cli/bump.rb#170
|
25
|
+
def print_changes(files, command:, from: T.unsafe(nil), to: T.unsafe(nil), dry: T.unsafe(nil), path: T.unsafe(nil)); end
|
26
|
+
|
27
|
+
# source://spoom//lib/spoom/cli/bump.rb#192
|
28
|
+
def undo_changes(files, from_strictness); end
|
29
|
+
end
|
30
|
+
|
31
|
+
# source://spoom//lib/spoom/cli/config.rb#9
|
32
|
+
class Spoom::Cli::Config < ::Thor
|
33
|
+
include ::Spoom::Colorize
|
34
|
+
include ::Spoom::Cli::Helper
|
35
|
+
|
36
|
+
def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
|
37
|
+
|
38
|
+
# source://spoom//lib/spoom/cli/config.rb#15
|
39
|
+
def show; end
|
40
|
+
end
|
41
|
+
|
42
|
+
# source://spoom//lib/spoom/cli/coverage.rb#9
|
43
|
+
class Spoom::Cli::Coverage < ::Thor
|
44
|
+
include ::Spoom::Colorize
|
45
|
+
include ::Spoom::Cli::Helper
|
46
|
+
|
47
|
+
# source://spoom//lib/spoom/cli/coverage.rb#198
|
48
|
+
def bundle_install(path, sha); end
|
49
|
+
|
50
|
+
def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
|
51
|
+
|
52
|
+
# source://spoom//lib/spoom/cli/coverage.rb#210
|
53
|
+
def message_no_data(file); end
|
54
|
+
|
55
|
+
# source://spoom//lib/spoom/cli/coverage.rb#173
|
56
|
+
def open(file = T.unsafe(nil)); end
|
57
|
+
|
58
|
+
# source://spoom//lib/spoom/cli/coverage.rb#189
|
59
|
+
def parse_time(string, option); end
|
60
|
+
|
61
|
+
# source://spoom//lib/spoom/cli/coverage.rb#142
|
62
|
+
def report; end
|
63
|
+
|
64
|
+
# source://spoom//lib/spoom/cli/coverage.rb#20
|
65
|
+
def snapshot; end
|
66
|
+
|
67
|
+
# source://spoom//lib/spoom/cli/coverage.rb#42
|
68
|
+
def timeline; end
|
69
|
+
end
|
70
|
+
|
71
|
+
# source://spoom//lib/spoom/cli/coverage.rb#12
|
72
|
+
Spoom::Cli::Coverage::DATA_DIR = T.let(T.unsafe(nil), String)
|
73
|
+
|
74
|
+
# source://spoom//lib/spoom/cli/helper.rb#10
|
75
|
+
module Spoom::Cli::Helper
|
76
|
+
include ::Spoom::Colorize
|
77
|
+
|
78
|
+
requires_ancestor { Thor }
|
79
|
+
|
80
|
+
# source://spoom//lib/spoom/cli/helper.rb#119
|
81
|
+
sig { params(string: ::String).returns(::String) }
|
82
|
+
def blue(string); end
|
83
|
+
|
84
|
+
# Is the `--color` option true?
|
85
|
+
#
|
86
|
+
# source://spoom//lib/spoom/cli/helper.rb#83
|
87
|
+
sig { returns(T::Boolean) }
|
88
|
+
def color?; end
|
89
|
+
|
90
|
+
# Colorize a string if `color?`
|
91
|
+
#
|
92
|
+
# source://spoom//lib/spoom/cli/helper.rb#112
|
93
|
+
sig { params(string: ::String, color: ::Spoom::Color).returns(::String) }
|
94
|
+
def colorize(string, *color); end
|
95
|
+
|
96
|
+
# Returns the context at `--path` (by default the current working directory)
|
97
|
+
#
|
98
|
+
# source://spoom//lib/spoom/cli/helper.rb#51
|
99
|
+
sig { returns(::Spoom::Context) }
|
100
|
+
def context; end
|
101
|
+
|
102
|
+
# Raise if `spoom` is not ran inside a context with a `sorbet/config` file
|
103
|
+
#
|
104
|
+
# source://spoom//lib/spoom/cli/helper.rb#57
|
105
|
+
sig { returns(::Spoom::Context) }
|
106
|
+
def context_requiring_sorbet!; end
|
107
|
+
|
108
|
+
# source://spoom//lib/spoom/cli/helper.rb#124
|
109
|
+
sig { params(string: ::String).returns(::String) }
|
110
|
+
def cyan(string); end
|
111
|
+
|
112
|
+
# Return the path specified through `--path`
|
113
|
+
#
|
114
|
+
# source://spoom//lib/spoom/cli/helper.rb#72
|
115
|
+
sig { returns(::String) }
|
116
|
+
def exec_path; end
|
117
|
+
|
118
|
+
# source://spoom//lib/spoom/cli/helper.rb#129
|
119
|
+
sig { params(string: ::String).returns(::String) }
|
120
|
+
def gray(string); end
|
121
|
+
|
122
|
+
# source://spoom//lib/spoom/cli/helper.rb#134
|
123
|
+
sig { params(string: ::String).returns(::String) }
|
124
|
+
def green(string); end
|
125
|
+
|
126
|
+
# source://spoom//lib/spoom/cli/helper.rb#88
|
127
|
+
sig { params(string: ::String).returns(::String) }
|
128
|
+
def highlight(string); end
|
129
|
+
|
130
|
+
# source://spoom//lib/spoom/cli/helper.rb#139
|
131
|
+
sig { params(string: ::String).returns(::String) }
|
132
|
+
def red(string); end
|
133
|
+
|
134
|
+
# Print `message` on `$stdout`
|
135
|
+
#
|
136
|
+
# source://spoom//lib/spoom/cli/helper.rb#20
|
137
|
+
sig { params(message: ::String).void }
|
138
|
+
def say(message); end
|
139
|
+
|
140
|
+
# Print `message` on `$stderr`
|
141
|
+
#
|
142
|
+
# The message is prefixed by a status (default: `Error`).
|
143
|
+
#
|
144
|
+
# source://spoom//lib/spoom/cli/helper.rb#39
|
145
|
+
sig { params(message: ::String, status: T.nilable(::String), nl: T::Boolean).void }
|
146
|
+
def say_error(message, status: T.unsafe(nil), nl: T.unsafe(nil)); end
|
147
|
+
|
148
|
+
# source://spoom//lib/spoom/cli/helper.rb#144
|
149
|
+
sig { params(string: ::String).returns(::String) }
|
150
|
+
def yellow(string); end
|
151
|
+
end
|
152
|
+
|
153
|
+
# source://spoom//lib/spoom/cli/lsp.rb#10
|
154
|
+
class Spoom::Cli::LSP < ::Thor
|
155
|
+
include ::Spoom::Colorize
|
156
|
+
include ::Spoom::Cli::Helper
|
157
|
+
|
158
|
+
# TODO: options, filter, limit, kind etc.. filter rbi
|
159
|
+
#
|
160
|
+
# source://spoom//lib/spoom/cli/lsp.rb#55
|
161
|
+
def defs(file, line, col); end
|
162
|
+
|
163
|
+
# TODO: options, filter, limit, kind etc.. filter rbi
|
164
|
+
#
|
165
|
+
# source://spoom//lib/spoom/cli/lsp.rb#65
|
166
|
+
def find(query); end
|
167
|
+
|
168
|
+
def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
|
169
|
+
|
170
|
+
# TODO: options, filter, limit, kind etc.. filter rbi
|
171
|
+
#
|
172
|
+
# source://spoom//lib/spoom/cli/lsp.rb#41
|
173
|
+
def hover(file, line, col); end
|
174
|
+
|
175
|
+
# TODO: options, filter, limit, kind etc.. filter rbi
|
176
|
+
#
|
177
|
+
# source://spoom//lib/spoom/cli/lsp.rb#26
|
178
|
+
def list; end
|
179
|
+
|
180
|
+
# source://spoom//lib/spoom/cli/lsp.rb#114
|
181
|
+
def lsp_client; end
|
182
|
+
|
183
|
+
# TODO: options, filter, limit, kind etc.. filter rbi
|
184
|
+
#
|
185
|
+
# source://spoom//lib/spoom/cli/lsp.rb#85
|
186
|
+
def refs(file, line, col); end
|
187
|
+
|
188
|
+
# source://spoom//lib/spoom/cli/lsp.rb#137
|
189
|
+
def run(&block); end
|
190
|
+
|
191
|
+
# source://spoom//lib/spoom/cli/lsp.rb#16
|
192
|
+
def show; end
|
193
|
+
|
194
|
+
# TODO: options, filter, limit, kind etc.. filter rbi
|
195
|
+
#
|
196
|
+
# source://spoom//lib/spoom/cli/lsp.rb#95
|
197
|
+
def sigs(file, line, col); end
|
198
|
+
|
199
|
+
# source://spoom//lib/spoom/cli/lsp.rb#129
|
200
|
+
def symbol_printer; end
|
201
|
+
|
202
|
+
# TODO: options, filter, limit, kind etc.. filter rbi
|
203
|
+
#
|
204
|
+
# source://spoom//lib/spoom/cli/lsp.rb#75
|
205
|
+
def symbols(file); end
|
206
|
+
|
207
|
+
# source://spoom//lib/spoom/cli/lsp.rb#162
|
208
|
+
def to_uri(path); end
|
209
|
+
|
210
|
+
# TODO: options, filter, limit, kind etc.. filter rbi
|
211
|
+
#
|
212
|
+
# source://spoom//lib/spoom/cli/lsp.rb#105
|
213
|
+
def types(file, line, col); end
|
214
|
+
end
|
215
|
+
|
216
|
+
# source://spoom//lib/spoom/cli.rb#16
|
217
|
+
class Spoom::Cli::Main < ::Thor
|
218
|
+
include ::Spoom::Colorize
|
219
|
+
include ::Spoom::Cli::Helper
|
220
|
+
|
221
|
+
# source://spoom//lib/spoom/cli.rb#61
|
222
|
+
def __print_version; end
|
223
|
+
|
224
|
+
# source://thor/1.2.1/lib/thor.rb#239
|
225
|
+
def bump(*args); end
|
226
|
+
|
227
|
+
# source://thor/1.2.1/lib/thor.rb#239
|
228
|
+
def config(*args); end
|
229
|
+
|
230
|
+
# source://thor/1.2.1/lib/thor.rb#239
|
231
|
+
def coverage(*args); end
|
232
|
+
|
233
|
+
# source://spoom//lib/spoom/cli.rb#43
|
234
|
+
def files; end
|
235
|
+
|
236
|
+
# source://thor/1.2.1/lib/thor.rb#239
|
237
|
+
def lsp(*args); end
|
238
|
+
|
239
|
+
# source://thor/1.2.1/lib/thor.rb#239
|
240
|
+
def tc(*args); end
|
241
|
+
|
242
|
+
class << self
|
243
|
+
# @return [Boolean]
|
244
|
+
#
|
245
|
+
# source://spoom//lib/spoom/cli.rb#68
|
246
|
+
def exit_on_failure?; end
|
247
|
+
end
|
248
|
+
end
|
249
|
+
|
250
|
+
# source://spoom//lib/spoom/cli/run.rb#6
|
251
|
+
class Spoom::Cli::Run < ::Thor
|
252
|
+
include ::Spoom::Colorize
|
253
|
+
include ::Spoom::Cli::Helper
|
254
|
+
|
255
|
+
# source://spoom//lib/spoom/cli/run.rb#131
|
256
|
+
def colorize_message(message); end
|
257
|
+
|
258
|
+
# source://spoom//lib/spoom/cli/run.rb#122
|
259
|
+
def format_error(error, format); end
|
260
|
+
|
261
|
+
def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
|
262
|
+
|
263
|
+
# source://spoom//lib/spoom/cli/run.rb#26
|
264
|
+
def tc(*paths_to_select); end
|
265
|
+
end
|
266
|
+
|
267
|
+
# source://spoom//lib/spoom/cli/run.rb#15
|
268
|
+
Spoom::Cli::Run::DEFAULT_FORMAT = T.let(T.unsafe(nil), String)
|
269
|
+
|
270
|
+
# source://spoom//lib/spoom/cli/run.rb#11
|
271
|
+
Spoom::Cli::Run::SORT_CODE = T.let(T.unsafe(nil), String)
|
272
|
+
|
273
|
+
# source://spoom//lib/spoom/cli/run.rb#13
|
274
|
+
Spoom::Cli::Run::SORT_ENUM = T.let(T.unsafe(nil), Array)
|
275
|
+
|
276
|
+
# source://spoom//lib/spoom/cli/run.rb#12
|
277
|
+
Spoom::Cli::Run::SORT_LOC = T.let(T.unsafe(nil), String)
|
278
|
+
|
279
|
+
# source://spoom//lib/spoom/colors.rb#5
|
280
|
+
class Spoom::Color < ::T::Enum
|
281
|
+
enums do
|
282
|
+
CLEAR = new
|
283
|
+
BOLD = new
|
284
|
+
BLACK = new
|
285
|
+
RED = new
|
286
|
+
GREEN = new
|
287
|
+
YELLOW = new
|
288
|
+
BLUE = new
|
289
|
+
MAGENTA = new
|
290
|
+
CYAN = new
|
291
|
+
WHITE = new
|
292
|
+
LIGHT_BLACK = new
|
293
|
+
LIGHT_RED = new
|
294
|
+
LIGHT_GREEN = new
|
295
|
+
LIGHT_YELLOW = new
|
296
|
+
LIGHT_BLUE = new
|
297
|
+
LIGHT_MAGENTA = new
|
298
|
+
LIGHT_CYAN = new
|
299
|
+
LIGHT_WHITE = new
|
300
|
+
end
|
301
|
+
|
302
|
+
# source://spoom//lib/spoom/colors.rb#32
|
303
|
+
sig { returns(::String) }
|
304
|
+
def ansi_code; end
|
305
|
+
end
|
306
|
+
|
307
|
+
# source://spoom//lib/spoom/colors.rb#37
|
308
|
+
module Spoom::Colorize
|
309
|
+
# source://spoom//lib/spoom/colors.rb#41
|
310
|
+
sig { params(string: ::String, color: ::Spoom::Color).returns(::String) }
|
311
|
+
def set_color(string, *color); end
|
312
|
+
end
|
313
|
+
|
314
|
+
# An abstraction to a Ruby project context
|
315
|
+
#
|
316
|
+
# A context maps to a directory in the file system.
|
317
|
+
# It is used to manipulate files and run commands in the context of this directory.
|
318
|
+
#
|
319
|
+
# source://spoom//lib/spoom/context/bundle.rb#5
|
320
|
+
class Spoom::Context
|
321
|
+
include ::Spoom::Context::Bundle
|
322
|
+
include ::Spoom::Context::Exec
|
323
|
+
include ::Spoom::Context::FileSystem
|
324
|
+
include ::Spoom::Context::Git
|
325
|
+
include ::Spoom::Context::Sorbet
|
326
|
+
|
327
|
+
# Create a new context about `absolute_path`
|
328
|
+
#
|
329
|
+
# The directory will not be created if it doesn't exist.
|
330
|
+
# Call `#make!` to create it.
|
331
|
+
#
|
332
|
+
# source://spoom//lib/spoom/context.rb#51
|
333
|
+
sig { params(absolute_path: ::String).void }
|
334
|
+
def initialize(absolute_path); end
|
335
|
+
|
336
|
+
# The absolute path to the directory this context is about
|
337
|
+
#
|
338
|
+
# source://spoom//lib/spoom/context.rb#44
|
339
|
+
sig { returns(::String) }
|
340
|
+
def absolute_path; end
|
341
|
+
|
342
|
+
class << self
|
343
|
+
# Create a new context in the system's temporary directory
|
344
|
+
#
|
345
|
+
# `name` is used as prefix to the temporary directory name.
|
346
|
+
# The directory will be created if it doesn't exist.
|
347
|
+
#
|
348
|
+
# source://spoom//lib/spoom/context.rb#37
|
349
|
+
sig { params(name: T.nilable(::String)).returns(T.attached_class) }
|
350
|
+
def mktmp!(name = T.unsafe(nil)); end
|
351
|
+
end
|
352
|
+
end
|
353
|
+
|
354
|
+
# Bundle features for a context
|
355
|
+
#
|
356
|
+
# source://spoom//lib/spoom/context/bundle.rb#7
|
357
|
+
module Spoom::Context::Bundle
|
358
|
+
requires_ancestor { Spoom::Context }
|
359
|
+
|
360
|
+
# Run a command with `bundle` in this context directory
|
361
|
+
#
|
362
|
+
# source://spoom//lib/spoom/context/bundle.rb#33
|
363
|
+
sig { params(command: ::String, version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) }
|
364
|
+
def bundle(command, version: T.unsafe(nil), capture_err: T.unsafe(nil)); end
|
365
|
+
|
366
|
+
# Run a command `bundle exec` in this context directory
|
367
|
+
#
|
368
|
+
# source://spoom//lib/spoom/context/bundle.rb#46
|
369
|
+
sig { params(command: ::String, version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) }
|
370
|
+
def bundle_exec(command, version: T.unsafe(nil), capture_err: T.unsafe(nil)); end
|
371
|
+
|
372
|
+
# Run `bundle install` in this context directory
|
373
|
+
#
|
374
|
+
# source://spoom//lib/spoom/context/bundle.rb#40
|
375
|
+
sig { params(version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) }
|
376
|
+
def bundle_install!(version: T.unsafe(nil), capture_err: T.unsafe(nil)); end
|
377
|
+
|
378
|
+
# Get `gem` version from the `Gemfile.lock` content
|
379
|
+
#
|
380
|
+
# Returns `nil` if `gem` cannot be found in the Gemfile.
|
381
|
+
#
|
382
|
+
# source://spoom//lib/spoom/context/bundle.rb#62
|
383
|
+
sig { params(gem: ::String).returns(T.nilable(::String)) }
|
384
|
+
def gem_version_from_gemfile_lock(gem); end
|
385
|
+
|
386
|
+
# source://spoom//lib/spoom/context/bundle.rb#51
|
387
|
+
sig { returns(T::Hash[::String, ::Bundler::LazySpecification]) }
|
388
|
+
def gemfile_lock_specs; end
|
389
|
+
|
390
|
+
# Read the contents of the Gemfile in this context directory
|
391
|
+
#
|
392
|
+
# source://spoom//lib/spoom/context/bundle.rb#15
|
393
|
+
sig { returns(T.nilable(::String)) }
|
394
|
+
def read_gemfile; end
|
395
|
+
|
396
|
+
# Read the contents of the Gemfile.lock in this context directory
|
397
|
+
#
|
398
|
+
# source://spoom//lib/spoom/context/bundle.rb#21
|
399
|
+
sig { returns(T.nilable(::String)) }
|
400
|
+
def read_gemfile_lock; end
|
401
|
+
|
402
|
+
# Set the `contents` of the Gemfile in this context directory
|
403
|
+
#
|
404
|
+
# source://spoom//lib/spoom/context/bundle.rb#27
|
405
|
+
sig { params(contents: ::String, append: T::Boolean).void }
|
406
|
+
def write_gemfile!(contents, append: T.unsafe(nil)); end
|
407
|
+
end
|
408
|
+
|
409
|
+
# Execution features for a context
|
410
|
+
#
|
411
|
+
# source://spoom//lib/spoom/context/exec.rb#27
|
412
|
+
module Spoom::Context::Exec
|
413
|
+
requires_ancestor { Spoom::Context }
|
414
|
+
|
415
|
+
# Run a command in this context directory
|
416
|
+
#
|
417
|
+
# source://spoom//lib/spoom/context/exec.rb#35
|
418
|
+
sig { params(command: ::String, capture_err: T::Boolean).returns(::Spoom::ExecResult) }
|
419
|
+
def exec(command, capture_err: T.unsafe(nil)); end
|
420
|
+
end
|
421
|
+
|
422
|
+
# File System features for a context
|
423
|
+
#
|
424
|
+
# source://spoom//lib/spoom/context/file_system.rb#7
|
425
|
+
module Spoom::Context::FileSystem
|
426
|
+
requires_ancestor { Spoom::Context }
|
427
|
+
|
428
|
+
# Returns the absolute path to `relative_path` in the context's directory
|
429
|
+
#
|
430
|
+
# source://spoom//lib/spoom/context/file_system.rb#15
|
431
|
+
sig { params(relative_path: ::String).returns(::String) }
|
432
|
+
def absolute_path_to(relative_path); end
|
433
|
+
|
434
|
+
# source://spoom//lib/spoom/context/file_system.rb#53
|
435
|
+
sig do
|
436
|
+
params(
|
437
|
+
allow_extensions: T::Array[::String],
|
438
|
+
allow_mime_types: T::Array[::String],
|
439
|
+
exclude_patterns: T::Array[::String]
|
440
|
+
).returns(T::Array[::String])
|
441
|
+
end
|
442
|
+
def collect_files(allow_extensions: T.unsafe(nil), allow_mime_types: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end
|
443
|
+
|
444
|
+
# Delete this context and its content
|
445
|
+
#
|
446
|
+
# Warning: it will `rm -rf` the context directory on the file system.
|
447
|
+
#
|
448
|
+
# source://spoom//lib/spoom/context/file_system.rb#105
|
449
|
+
sig { void }
|
450
|
+
def destroy!; end
|
451
|
+
|
452
|
+
# Does the context directory at `absolute_path` exist and is a directory?
|
453
|
+
#
|
454
|
+
# source://spoom//lib/spoom/context/file_system.rb#21
|
455
|
+
sig { returns(T::Boolean) }
|
456
|
+
def exist?; end
|
457
|
+
|
458
|
+
# Does `relative_path` point to an existing file in this context directory?
|
459
|
+
#
|
460
|
+
# source://spoom//lib/spoom/context/file_system.rb#65
|
461
|
+
sig { params(relative_path: ::String).returns(T::Boolean) }
|
462
|
+
def file?(relative_path); end
|
463
|
+
|
464
|
+
# List all files in this context matching `pattern`
|
465
|
+
#
|
466
|
+
# source://spoom//lib/spoom/context/file_system.rb#34
|
467
|
+
sig { params(pattern: ::String).returns(T::Array[::String]) }
|
468
|
+
def glob(pattern = T.unsafe(nil)); end
|
469
|
+
|
470
|
+
# List all files at the top level of this context directory
|
471
|
+
#
|
472
|
+
# source://spoom//lib/spoom/context/file_system.rb#42
|
473
|
+
sig { returns(T::Array[::String]) }
|
474
|
+
def list; end
|
475
|
+
|
476
|
+
# Create the context directory at `absolute_path`
|
477
|
+
#
|
478
|
+
# source://spoom//lib/spoom/context/file_system.rb#27
|
479
|
+
sig { void }
|
480
|
+
def mkdir!; end
|
481
|
+
|
482
|
+
# Move the file or directory from `from_relative_path` to `to_relative_path`
|
483
|
+
#
|
484
|
+
# source://spoom//lib/spoom/context/file_system.rb#95
|
485
|
+
sig { params(from_relative_path: ::String, to_relative_path: ::String).void }
|
486
|
+
def move!(from_relative_path, to_relative_path); end
|
487
|
+
|
488
|
+
# Return the contents of the file at `relative_path` in this context directory
|
489
|
+
#
|
490
|
+
# Will raise if the file doesn't exist.
|
491
|
+
#
|
492
|
+
# source://spoom//lib/spoom/context/file_system.rb#73
|
493
|
+
sig { params(relative_path: ::String).returns(::String) }
|
494
|
+
def read(relative_path); end
|
495
|
+
|
496
|
+
# Remove the path at `relative_path` (recursive + force) in this context directory
|
497
|
+
#
|
498
|
+
# source://spoom//lib/spoom/context/file_system.rb#89
|
499
|
+
sig { params(relative_path: ::String).void }
|
500
|
+
def remove!(relative_path); end
|
501
|
+
|
502
|
+
# Write `contents` in the file at `relative_path` in this context directory
|
503
|
+
#
|
504
|
+
# Append to the file if `append` is true.
|
505
|
+
#
|
506
|
+
# source://spoom//lib/spoom/context/file_system.rb#81
|
507
|
+
sig { params(relative_path: ::String, contents: ::String, append: T::Boolean).void }
|
508
|
+
def write!(relative_path, contents = T.unsafe(nil), append: T.unsafe(nil)); end
|
509
|
+
end
|
510
|
+
|
511
|
+
# Git features for a context
|
512
|
+
#
|
513
|
+
# source://spoom//lib/spoom/context/git.rb#35
|
514
|
+
module Spoom::Context::Git
|
515
|
+
requires_ancestor { Spoom::Context }
|
516
|
+
|
517
|
+
# Run a command prefixed by `git` in this context directory
|
518
|
+
#
|
519
|
+
# source://spoom//lib/spoom/context/git.rb#43
|
520
|
+
sig { params(command: ::String).returns(::Spoom::ExecResult) }
|
521
|
+
def git(command); end
|
522
|
+
|
523
|
+
# Run `git checkout` in this context directory
|
524
|
+
#
|
525
|
+
# source://spoom//lib/spoom/context/git.rb#62
|
526
|
+
sig { params(ref: ::String).returns(::Spoom::ExecResult) }
|
527
|
+
def git_checkout!(ref: T.unsafe(nil)); end
|
528
|
+
|
529
|
+
# Run `git checkout -b <branch-name> <ref>` in this context directory
|
530
|
+
#
|
531
|
+
# source://spoom//lib/spoom/context/git.rb#68
|
532
|
+
sig { params(branch_name: ::String, ref: T.nilable(::String)).returns(::Spoom::ExecResult) }
|
533
|
+
def git_checkout_new_branch!(branch_name, ref: T.unsafe(nil)); end
|
534
|
+
|
535
|
+
# Run `git add . && git commit` in this context directory
|
536
|
+
#
|
537
|
+
# source://spoom//lib/spoom/context/git.rb#78
|
538
|
+
sig { params(message: ::String, time: ::Time, allow_empty: T::Boolean).returns(::Spoom::ExecResult) }
|
539
|
+
def git_commit!(message: T.unsafe(nil), time: T.unsafe(nil), allow_empty: T.unsafe(nil)); end
|
540
|
+
|
541
|
+
# Get the current git branch in this context directory
|
542
|
+
#
|
543
|
+
# source://spoom//lib/spoom/context/git.rb#89
|
544
|
+
sig { returns(T.nilable(::String)) }
|
545
|
+
def git_current_branch; end
|
546
|
+
|
547
|
+
# Run `git diff` in this context directory
|
548
|
+
#
|
549
|
+
# source://spoom//lib/spoom/context/git.rb#98
|
550
|
+
sig { params(arg: ::String).returns(::Spoom::ExecResult) }
|
551
|
+
def git_diff(*arg); end
|
552
|
+
|
553
|
+
# Run `git init` in this context directory
|
554
|
+
#
|
555
|
+
# Warning: passing a branch will run `git init -b <branch>` which is only available in git 2.28+.
|
556
|
+
# In older versions, use `git_init!` followed by `git("checkout -b <branch>")`.
|
557
|
+
#
|
558
|
+
# source://spoom//lib/spoom/context/git.rb#52
|
559
|
+
sig { params(branch: T.nilable(::String)).returns(::Spoom::ExecResult) }
|
560
|
+
def git_init!(branch: T.unsafe(nil)); end
|
561
|
+
|
562
|
+
# Get the last commit in the currently checked out branch
|
563
|
+
#
|
564
|
+
# source://spoom//lib/spoom/context/git.rb#104
|
565
|
+
sig { params(short_sha: T::Boolean).returns(T.nilable(::Spoom::Git::Commit)) }
|
566
|
+
def git_last_commit(short_sha: T.unsafe(nil)); end
|
567
|
+
|
568
|
+
# source://spoom//lib/spoom/context/git.rb#115
|
569
|
+
sig { params(arg: ::String).returns(::Spoom::ExecResult) }
|
570
|
+
def git_log(*arg); end
|
571
|
+
|
572
|
+
# Run `git push <remote> <ref>` in this context directory
|
573
|
+
#
|
574
|
+
# source://spoom//lib/spoom/context/git.rb#121
|
575
|
+
sig { params(remote: ::String, ref: ::String, force: T::Boolean).returns(::Spoom::ExecResult) }
|
576
|
+
def git_push!(remote, ref, force: T.unsafe(nil)); end
|
577
|
+
|
578
|
+
# source://spoom//lib/spoom/context/git.rb#126
|
579
|
+
sig { params(arg: ::String).returns(::Spoom::ExecResult) }
|
580
|
+
def git_show(*arg); end
|
581
|
+
|
582
|
+
# Is there uncommited changes in this context directory?
|
583
|
+
#
|
584
|
+
# source://spoom//lib/spoom/context/git.rb#132
|
585
|
+
sig { params(path: ::String).returns(T::Boolean) }
|
586
|
+
def git_workdir_clean?(path: T.unsafe(nil)); end
|
587
|
+
end
|
588
|
+
|
589
|
+
# Sorbet features for a context
|
590
|
+
#
|
591
|
+
# source://spoom//lib/spoom/context/sorbet.rb#7
|
592
|
+
module Spoom::Context::Sorbet
|
593
|
+
requires_ancestor { Spoom::Context }
|
594
|
+
|
595
|
+
# Does this context has a `sorbet/config` file?
|
596
|
+
#
|
597
|
+
# source://spoom//lib/spoom/context/sorbet.rb#119
|
598
|
+
sig { returns(T::Boolean) }
|
599
|
+
def has_sorbet_config?; end
|
600
|
+
|
601
|
+
# Read the strictness sigil from the file at `relative_path` (returns `nil` if no sigil)
|
602
|
+
#
|
603
|
+
# source://spoom//lib/spoom/context/sorbet.rb#142
|
604
|
+
sig { params(relative_path: ::String).returns(T.nilable(::String)) }
|
605
|
+
def read_file_strictness(relative_path); end
|
606
|
+
|
607
|
+
# Read the contents of `sorbet/config` in this context directory
|
608
|
+
#
|
609
|
+
# source://spoom//lib/spoom/context/sorbet.rb#130
|
610
|
+
sig { returns(::String) }
|
611
|
+
def read_sorbet_config; end
|
612
|
+
|
613
|
+
# source://spoom//lib/spoom/context/sorbet.rb#124
|
614
|
+
sig { returns(::Spoom::Sorbet::Config) }
|
615
|
+
def sorbet_config; end
|
616
|
+
|
617
|
+
# Get the commit introducing the `sorbet/config` file
|
618
|
+
#
|
619
|
+
# source://spoom//lib/spoom/context/sorbet.rb#148
|
620
|
+
sig { returns(T.nilable(::Spoom::Git::Commit)) }
|
621
|
+
def sorbet_intro_commit; end
|
622
|
+
|
623
|
+
# Get the commit removing the `sorbet/config` file
|
624
|
+
#
|
625
|
+
# source://spoom//lib/spoom/context/sorbet.rb#160
|
626
|
+
sig { returns(T.nilable(::Spoom::Git::Commit)) }
|
627
|
+
def sorbet_removal_commit; end
|
628
|
+
|
629
|
+
# Run `bundle exec srb` in this context directory
|
630
|
+
#
|
631
|
+
# source://spoom//lib/spoom/context/sorbet.rb#15
|
632
|
+
sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) }
|
633
|
+
def srb(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end
|
634
|
+
|
635
|
+
# List all files typechecked by Sorbet from its `config`
|
636
|
+
#
|
637
|
+
# source://spoom//lib/spoom/context/sorbet.rb#65
|
638
|
+
sig { params(with_config: T.nilable(::Spoom::Sorbet::Config), include_rbis: T::Boolean).returns(T::Array[::String]) }
|
639
|
+
def srb_files(with_config: T.unsafe(nil), include_rbis: T.unsafe(nil)); end
|
640
|
+
|
641
|
+
# List all files typechecked by Sorbet from its `config` that matches `strictness`
|
642
|
+
#
|
643
|
+
# source://spoom//lib/spoom/context/sorbet.rb#104
|
644
|
+
sig do
|
645
|
+
params(
|
646
|
+
strictness: ::String,
|
647
|
+
with_config: T.nilable(::Spoom::Sorbet::Config),
|
648
|
+
include_rbis: T::Boolean
|
649
|
+
).returns(T::Array[::String])
|
650
|
+
end
|
651
|
+
def srb_files_with_strictness(strictness, with_config: T.unsafe(nil), include_rbis: T.unsafe(nil)); end
|
652
|
+
|
653
|
+
# source://spoom//lib/spoom/context/sorbet.rb#45
|
654
|
+
sig do
|
655
|
+
params(
|
656
|
+
arg: ::String,
|
657
|
+
sorbet_bin: T.nilable(::String),
|
658
|
+
capture_err: T::Boolean
|
659
|
+
).returns(T.nilable(T::Hash[::String, ::Integer]))
|
660
|
+
end
|
661
|
+
def srb_metrics(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end
|
662
|
+
|
663
|
+
# source://spoom//lib/spoom/context/sorbet.rb#33
|
664
|
+
sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) }
|
665
|
+
def srb_tc(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end
|
666
|
+
|
667
|
+
# source://spoom//lib/spoom/context/sorbet.rb#110
|
668
|
+
sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(T.nilable(::String)) }
|
669
|
+
def srb_version(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end
|
670
|
+
|
671
|
+
# Set the `contents` of `sorbet/config` in this context directory
|
672
|
+
#
|
673
|
+
# source://spoom//lib/spoom/context/sorbet.rb#136
|
674
|
+
sig { params(contents: ::String, append: T::Boolean).void }
|
675
|
+
def write_sorbet_config!(contents, append: T.unsafe(nil)); end
|
676
|
+
end
|
677
|
+
|
678
|
+
# source://spoom//lib/spoom/coverage/snapshot.rb#5
|
679
|
+
module Spoom::Coverage
|
680
|
+
class << self
|
681
|
+
# source://spoom//lib/spoom/coverage.rb#103
|
682
|
+
sig { params(context: ::Spoom::Context).returns(::Spoom::FileTree) }
|
683
|
+
def file_tree(context); end
|
684
|
+
|
685
|
+
# source://spoom//lib/spoom/coverage.rb#83
|
686
|
+
sig do
|
687
|
+
params(
|
688
|
+
context: ::Spoom::Context,
|
689
|
+
snapshots: T::Array[::Spoom::Coverage::Snapshot],
|
690
|
+
palette: ::Spoom::Coverage::D3::ColorPalette
|
691
|
+
).returns(::Spoom::Coverage::Report)
|
692
|
+
end
|
693
|
+
def report(context, snapshots, palette:); end
|
694
|
+
|
695
|
+
# source://spoom//lib/spoom/coverage.rb#16
|
696
|
+
sig do
|
697
|
+
params(
|
698
|
+
context: ::Spoom::Context,
|
699
|
+
rbi: T::Boolean,
|
700
|
+
sorbet_bin: T.nilable(::String)
|
701
|
+
).returns(::Spoom::Coverage::Snapshot)
|
702
|
+
end
|
703
|
+
def snapshot(context, rbi: T.unsafe(nil), sorbet_bin: T.unsafe(nil)); end
|
704
|
+
end
|
705
|
+
end
|
706
|
+
|
707
|
+
# source://spoom//lib/spoom/coverage/report.rb#88
|
708
|
+
module Spoom::Coverage::Cards; end
|
709
|
+
|
710
|
+
# source://spoom//lib/spoom/coverage/report.rb#89
|
711
|
+
class Spoom::Coverage::Cards::Card < ::Spoom::Coverage::Template
|
712
|
+
# source://spoom//lib/spoom/coverage/report.rb#98
|
713
|
+
sig { params(template: ::String, title: T.nilable(::String), body: T.nilable(::String)).void }
|
714
|
+
def initialize(template: T.unsafe(nil), title: T.unsafe(nil), body: T.unsafe(nil)); end
|
715
|
+
|
716
|
+
# @return [String, nil]
|
717
|
+
#
|
718
|
+
# source://spoom//lib/spoom/coverage/report.rb#95
|
719
|
+
def body; end
|
720
|
+
|
721
|
+
# source://spoom//lib/spoom/coverage/report.rb#95
|
722
|
+
sig { returns(T.nilable(::String)) }
|
723
|
+
def title; end
|
724
|
+
end
|
725
|
+
|
726
|
+
# source://spoom//lib/spoom/coverage/report.rb#92
|
727
|
+
Spoom::Coverage::Cards::Card::TEMPLATE = T.let(T.unsafe(nil), String)
|
728
|
+
|
729
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
730
|
+
#
|
731
|
+
# source://spoom//lib/spoom/coverage/report.rb#105
|
732
|
+
class Spoom::Coverage::Cards::Erb < ::Spoom::Coverage::Cards::Card
|
733
|
+
abstract!
|
734
|
+
|
735
|
+
# source://spoom//lib/spoom/coverage/report.rb#112
|
736
|
+
sig { void }
|
737
|
+
def initialize; end
|
738
|
+
|
739
|
+
# @abstract
|
740
|
+
#
|
741
|
+
# source://spoom//lib/spoom/coverage/report.rb#120
|
742
|
+
sig { abstract.returns(::String) }
|
743
|
+
def erb; end
|
744
|
+
|
745
|
+
# source://spoom//lib/spoom/coverage/report.rb#115
|
746
|
+
sig { override.returns(::String) }
|
747
|
+
def html; end
|
748
|
+
end
|
749
|
+
|
750
|
+
# source://spoom//lib/spoom/coverage/report.rb#153
|
751
|
+
class Spoom::Coverage::Cards::Map < ::Spoom::Coverage::Cards::Card
|
752
|
+
# source://spoom//lib/spoom/coverage/report.rb#164
|
753
|
+
sig do
|
754
|
+
params(
|
755
|
+
file_tree: ::Spoom::FileTree,
|
756
|
+
nodes_strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)],
|
757
|
+
nodes_strictness_scores: T::Hash[::Spoom::FileTree::Node, ::Float],
|
758
|
+
title: ::String
|
759
|
+
).void
|
760
|
+
end
|
761
|
+
def initialize(file_tree:, nodes_strictnesses:, nodes_strictness_scores:, title: T.unsafe(nil)); end
|
762
|
+
end
|
763
|
+
|
764
|
+
# source://spoom//lib/spoom/coverage/report.rb#123
|
765
|
+
class Spoom::Coverage::Cards::Snapshot < ::Spoom::Coverage::Cards::Card
|
766
|
+
# source://spoom//lib/spoom/coverage/report.rb#132
|
767
|
+
sig { params(snapshot: ::Spoom::Coverage::Snapshot, title: ::String).void }
|
768
|
+
def initialize(snapshot:, title: T.unsafe(nil)); end
|
769
|
+
|
770
|
+
# source://spoom//lib/spoom/coverage/report.rb#143
|
771
|
+
sig { returns(::Spoom::Coverage::D3::Pie::Calls) }
|
772
|
+
def pie_calls; end
|
773
|
+
|
774
|
+
# source://spoom//lib/spoom/coverage/report.rb#138
|
775
|
+
sig { returns(::Spoom::Coverage::D3::Pie::Sigils) }
|
776
|
+
def pie_sigils; end
|
777
|
+
|
778
|
+
# source://spoom//lib/spoom/coverage/report.rb#148
|
779
|
+
sig { returns(::Spoom::Coverage::D3::Pie::Sigs) }
|
780
|
+
def pie_sigs; end
|
781
|
+
|
782
|
+
# source://spoom//lib/spoom/coverage/report.rb#129
|
783
|
+
sig { returns(::Spoom::Coverage::Snapshot) }
|
784
|
+
def snapshot; end
|
785
|
+
end
|
786
|
+
|
787
|
+
# source://spoom//lib/spoom/coverage/report.rb#126
|
788
|
+
Spoom::Coverage::Cards::Snapshot::TEMPLATE = T.let(T.unsafe(nil), String)
|
789
|
+
|
790
|
+
# source://spoom//lib/spoom/coverage/report.rb#240
|
791
|
+
class Spoom::Coverage::Cards::SorbetIntro < ::Spoom::Coverage::Cards::Erb
|
792
|
+
# source://spoom//lib/spoom/coverage/report.rb#244
|
793
|
+
sig { params(sorbet_intro_commit: T.nilable(::String), sorbet_intro_date: T.nilable(::Time)).void }
|
794
|
+
def initialize(sorbet_intro_commit: T.unsafe(nil), sorbet_intro_date: T.unsafe(nil)); end
|
795
|
+
|
796
|
+
# source://spoom//lib/spoom/coverage/report.rb#250
|
797
|
+
sig { override.returns(::String) }
|
798
|
+
def erb; end
|
799
|
+
end
|
800
|
+
|
801
|
+
# source://spoom//lib/spoom/coverage/report.rb#177
|
802
|
+
class Spoom::Coverage::Cards::Timeline < ::Spoom::Coverage::Cards::Card
|
803
|
+
# source://spoom//lib/spoom/coverage/report.rb#181
|
804
|
+
sig { params(title: ::String, timeline: ::Spoom::Coverage::D3::Timeline).void }
|
805
|
+
def initialize(title:, timeline:); end
|
806
|
+
end
|
807
|
+
|
808
|
+
# source://spoom//lib/spoom/coverage/report.rb#194
|
809
|
+
class Spoom::Coverage::Cards::Timeline::Calls < ::Spoom::Coverage::Cards::Timeline
|
810
|
+
# source://spoom//lib/spoom/coverage/report.rb#198
|
811
|
+
sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void }
|
812
|
+
def initialize(snapshots:, title: T.unsafe(nil)); end
|
813
|
+
end
|
814
|
+
|
815
|
+
# source://spoom//lib/spoom/coverage/report.rb#212
|
816
|
+
class Spoom::Coverage::Cards::Timeline::RBIs < ::Spoom::Coverage::Cards::Timeline
|
817
|
+
# source://spoom//lib/spoom/coverage/report.rb#216
|
818
|
+
sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void }
|
819
|
+
def initialize(snapshots:, title: T.unsafe(nil)); end
|
820
|
+
end
|
821
|
+
|
822
|
+
# source://spoom//lib/spoom/coverage/report.rb#230
|
823
|
+
class Spoom::Coverage::Cards::Timeline::Runtimes < ::Spoom::Coverage::Cards::Timeline
|
824
|
+
# source://spoom//lib/spoom/coverage/report.rb#234
|
825
|
+
sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void }
|
826
|
+
def initialize(snapshots:, title: T.unsafe(nil)); end
|
827
|
+
end
|
828
|
+
|
829
|
+
# source://spoom//lib/spoom/coverage/report.rb#185
|
830
|
+
class Spoom::Coverage::Cards::Timeline::Sigils < ::Spoom::Coverage::Cards::Timeline
|
831
|
+
# source://spoom//lib/spoom/coverage/report.rb#189
|
832
|
+
sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void }
|
833
|
+
def initialize(snapshots:, title: T.unsafe(nil)); end
|
834
|
+
end
|
835
|
+
|
836
|
+
# source://spoom//lib/spoom/coverage/report.rb#203
|
837
|
+
class Spoom::Coverage::Cards::Timeline::Sigs < ::Spoom::Coverage::Cards::Timeline
|
838
|
+
# source://spoom//lib/spoom/coverage/report.rb#207
|
839
|
+
sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void }
|
840
|
+
def initialize(snapshots:, title: T.unsafe(nil)); end
|
841
|
+
end
|
842
|
+
|
843
|
+
# source://spoom//lib/spoom/coverage/report.rb#221
|
844
|
+
class Spoom::Coverage::Cards::Timeline::Versions < ::Spoom::Coverage::Cards::Timeline
|
845
|
+
# source://spoom//lib/spoom/coverage/report.rb#225
|
846
|
+
sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void }
|
847
|
+
def initialize(snapshots:, title: T.unsafe(nil)); end
|
848
|
+
end
|
849
|
+
|
850
|
+
# source://spoom//lib/spoom/coverage/d3/base.rb#6
|
851
|
+
module Spoom::Coverage::D3
|
852
|
+
class << self
|
853
|
+
# source://spoom//lib/spoom/coverage/d3.rb#61
|
854
|
+
sig { params(palette: ::Spoom::Coverage::D3::ColorPalette).returns(::String) }
|
855
|
+
def header_script(palette); end
|
856
|
+
|
857
|
+
# source://spoom//lib/spoom/coverage/d3.rb#21
|
858
|
+
sig { returns(::String) }
|
859
|
+
def header_style; end
|
860
|
+
end
|
861
|
+
end
|
862
|
+
|
863
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
864
|
+
#
|
865
|
+
# source://spoom//lib/spoom/coverage/d3/base.rb#7
|
866
|
+
class Spoom::Coverage::D3::Base
|
867
|
+
abstract!
|
868
|
+
|
869
|
+
# source://spoom//lib/spoom/coverage/d3/base.rb#17
|
870
|
+
sig { params(id: ::String, data: T.untyped).void }
|
871
|
+
def initialize(id, data); end
|
872
|
+
|
873
|
+
# source://spoom//lib/spoom/coverage/d3/base.rb#37
|
874
|
+
sig { returns(::String) }
|
875
|
+
def html; end
|
876
|
+
|
877
|
+
# source://spoom//lib/spoom/coverage/d3/base.rb#14
|
878
|
+
sig { returns(::String) }
|
879
|
+
def id; end
|
880
|
+
|
881
|
+
# @abstract
|
882
|
+
#
|
883
|
+
# source://spoom//lib/spoom/coverage/d3/base.rb#50
|
884
|
+
sig { abstract.returns(::String) }
|
885
|
+
def script; end
|
886
|
+
|
887
|
+
# source://spoom//lib/spoom/coverage/d3/base.rb#45
|
888
|
+
sig { returns(::String) }
|
889
|
+
def tooltip; end
|
890
|
+
|
891
|
+
class << self
|
892
|
+
# source://spoom//lib/spoom/coverage/d3/base.rb#31
|
893
|
+
sig { returns(::String) }
|
894
|
+
def header_script; end
|
895
|
+
|
896
|
+
# source://spoom//lib/spoom/coverage/d3/base.rb#26
|
897
|
+
sig { returns(::String) }
|
898
|
+
def header_style; end
|
899
|
+
end
|
900
|
+
end
|
901
|
+
|
902
|
+
# source://spoom//lib/spoom/coverage/d3.rb#12
|
903
|
+
Spoom::Coverage::D3::COLOR_FALSE = T.let(T.unsafe(nil), String)
|
904
|
+
|
905
|
+
# source://spoom//lib/spoom/coverage/d3.rb#11
|
906
|
+
Spoom::Coverage::D3::COLOR_IGNORE = T.let(T.unsafe(nil), String)
|
907
|
+
|
908
|
+
# source://spoom//lib/spoom/coverage/d3.rb#14
|
909
|
+
Spoom::Coverage::D3::COLOR_STRICT = T.let(T.unsafe(nil), String)
|
910
|
+
|
911
|
+
# source://spoom//lib/spoom/coverage/d3.rb#15
|
912
|
+
Spoom::Coverage::D3::COLOR_STRONG = T.let(T.unsafe(nil), String)
|
913
|
+
|
914
|
+
# source://spoom//lib/spoom/coverage/d3.rb#13
|
915
|
+
Spoom::Coverage::D3::COLOR_TRUE = T.let(T.unsafe(nil), String)
|
916
|
+
|
917
|
+
# source://spoom//lib/spoom/coverage/d3/circle_map.rb#9
|
918
|
+
class Spoom::Coverage::D3::CircleMap < ::Spoom::Coverage::D3::Base
|
919
|
+
# source://spoom//lib/spoom/coverage/d3/circle_map.rb#59
|
920
|
+
sig { override.returns(::String) }
|
921
|
+
def script; end
|
922
|
+
|
923
|
+
class << self
|
924
|
+
# source://spoom//lib/spoom/coverage/d3/circle_map.rb#40
|
925
|
+
sig { returns(::String) }
|
926
|
+
def header_script; end
|
927
|
+
|
928
|
+
# source://spoom//lib/spoom/coverage/d3/circle_map.rb#14
|
929
|
+
sig { returns(::String) }
|
930
|
+
def header_style; end
|
931
|
+
end
|
932
|
+
end
|
933
|
+
|
934
|
+
# source://spoom//lib/spoom/coverage/d3/circle_map.rb#148
|
935
|
+
class Spoom::Coverage::D3::CircleMap::Sigils < ::Spoom::Coverage::D3::CircleMap
|
936
|
+
# source://spoom//lib/spoom/coverage/d3/circle_map.rb#159
|
937
|
+
sig do
|
938
|
+
params(
|
939
|
+
id: ::String,
|
940
|
+
file_tree: ::Spoom::FileTree,
|
941
|
+
nodes_strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)],
|
942
|
+
nodes_scores: T::Hash[::Spoom::FileTree::Node, ::Float]
|
943
|
+
).void
|
944
|
+
end
|
945
|
+
def initialize(id, file_tree, nodes_strictnesses, nodes_scores); end
|
946
|
+
|
947
|
+
# source://spoom//lib/spoom/coverage/d3/circle_map.rb#166
|
948
|
+
sig { params(node: ::Spoom::FileTree::Node).returns(T::Hash[::Symbol, T.untyped]) }
|
949
|
+
def tree_node_to_json(node); end
|
950
|
+
end
|
951
|
+
|
952
|
+
# source://spoom//lib/spoom/coverage/d3.rb#103
|
953
|
+
class Spoom::Coverage::D3::ColorPalette < ::T::Struct
|
954
|
+
prop :ignore, ::String
|
955
|
+
prop :false, ::String
|
956
|
+
prop :true, ::String
|
957
|
+
prop :strict, ::String
|
958
|
+
prop :strong, ::String
|
959
|
+
|
960
|
+
class << self
|
961
|
+
# source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13
|
962
|
+
def inherited(s); end
|
963
|
+
end
|
964
|
+
end
|
965
|
+
|
966
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
967
|
+
#
|
968
|
+
# source://spoom//lib/spoom/coverage/d3/pie.rb#9
|
969
|
+
class Spoom::Coverage::D3::Pie < ::Spoom::Coverage::D3::Base
|
970
|
+
abstract!
|
971
|
+
|
972
|
+
# source://spoom//lib/spoom/coverage/d3/pie.rb#16
|
973
|
+
sig { params(id: ::String, title: ::String, data: T.untyped).void }
|
974
|
+
def initialize(id, title, data); end
|
975
|
+
|
976
|
+
# source://spoom//lib/spoom/coverage/d3/pie.rb#56
|
977
|
+
sig { override.returns(::String) }
|
978
|
+
def script; end
|
979
|
+
|
980
|
+
class << self
|
981
|
+
# source://spoom//lib/spoom/coverage/d3/pie.rb#43
|
982
|
+
sig { returns(::String) }
|
983
|
+
def header_script; end
|
984
|
+
|
985
|
+
# source://spoom//lib/spoom/coverage/d3/pie.rb#25
|
986
|
+
sig { returns(::String) }
|
987
|
+
def header_style; end
|
988
|
+
end
|
989
|
+
end
|
990
|
+
|
991
|
+
# source://spoom//lib/spoom/coverage/d3/pie.rb#141
|
992
|
+
class Spoom::Coverage::D3::Pie::Calls < ::Spoom::Coverage::D3::Pie
|
993
|
+
# source://spoom//lib/spoom/coverage/d3/pie.rb#145
|
994
|
+
sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void }
|
995
|
+
def initialize(id, title, snapshot); end
|
996
|
+
|
997
|
+
# source://spoom//lib/spoom/coverage/d3/pie.rb#150
|
998
|
+
sig { override.returns(::String) }
|
999
|
+
def tooltip; end
|
1000
|
+
end
|
1001
|
+
|
1002
|
+
# source://spoom//lib/spoom/coverage/d3/pie.rb#123
|
1003
|
+
class Spoom::Coverage::D3::Pie::Sigils < ::Spoom::Coverage::D3::Pie
|
1004
|
+
# source://spoom//lib/spoom/coverage/d3/pie.rb#127
|
1005
|
+
sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void }
|
1006
|
+
def initialize(id, title, snapshot); end
|
1007
|
+
|
1008
|
+
# source://spoom//lib/spoom/coverage/d3/pie.rb#132
|
1009
|
+
sig { override.returns(::String) }
|
1010
|
+
def tooltip; end
|
1011
|
+
end
|
1012
|
+
|
1013
|
+
# source://spoom//lib/spoom/coverage/d3/pie.rb#159
|
1014
|
+
class Spoom::Coverage::D3::Pie::Sigs < ::Spoom::Coverage::D3::Pie
|
1015
|
+
# source://spoom//lib/spoom/coverage/d3/pie.rb#163
|
1016
|
+
sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void }
|
1017
|
+
def initialize(id, title, snapshot); end
|
1018
|
+
|
1019
|
+
# source://spoom//lib/spoom/coverage/d3/pie.rb#172
|
1020
|
+
sig { override.returns(::String) }
|
1021
|
+
def tooltip; end
|
1022
|
+
end
|
1023
|
+
|
1024
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
1025
|
+
#
|
1026
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#9
|
1027
|
+
class Spoom::Coverage::D3::Timeline < ::Spoom::Coverage::D3::Base
|
1028
|
+
abstract!
|
1029
|
+
|
1030
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#16
|
1031
|
+
sig { params(id: ::String, data: T.untyped, keys: T::Array[::String]).void }
|
1032
|
+
def initialize(id, data, keys); end
|
1033
|
+
|
1034
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#187
|
1035
|
+
sig { params(y: ::String, color: ::String, curve: ::String).returns(::String) }
|
1036
|
+
def area(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end
|
1037
|
+
|
1038
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#203
|
1039
|
+
sig { params(y: ::String, color: ::String, curve: ::String).returns(::String) }
|
1040
|
+
def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end
|
1041
|
+
|
1042
|
+
# @abstract
|
1043
|
+
#
|
1044
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#126
|
1045
|
+
sig { abstract.returns(::String) }
|
1046
|
+
def plot; end
|
1047
|
+
|
1048
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#217
|
1049
|
+
sig { params(y: ::String).returns(::String) }
|
1050
|
+
def points(y:); end
|
1051
|
+
|
1052
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#101
|
1053
|
+
sig { override.returns(::String) }
|
1054
|
+
def script; end
|
1055
|
+
|
1056
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#129
|
1057
|
+
sig { returns(::String) }
|
1058
|
+
def x_scale; end
|
1059
|
+
|
1060
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#145
|
1061
|
+
sig { returns(::String) }
|
1062
|
+
def x_ticks; end
|
1063
|
+
|
1064
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#158
|
1065
|
+
sig { params(min: ::String, max: ::String, ticks: ::String).returns(::String) }
|
1066
|
+
def y_scale(min:, max:, ticks:); end
|
1067
|
+
|
1068
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#174
|
1069
|
+
sig { params(ticks: ::String, format: ::String, padding: ::Integer).returns(::String) }
|
1070
|
+
def y_ticks(ticks:, format:, padding:); end
|
1071
|
+
|
1072
|
+
class << self
|
1073
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#79
|
1074
|
+
sig { returns(::String) }
|
1075
|
+
def header_script; end
|
1076
|
+
|
1077
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#25
|
1078
|
+
sig { returns(::String) }
|
1079
|
+
def header_style; end
|
1080
|
+
end
|
1081
|
+
end
|
1082
|
+
|
1083
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#448
|
1084
|
+
class Spoom::Coverage::D3::Timeline::Calls < ::Spoom::Coverage::D3::Timeline::Stacked
|
1085
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#452
|
1086
|
+
sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void }
|
1087
|
+
def initialize(id, snapshots); end
|
1088
|
+
|
1089
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#466
|
1090
|
+
sig { override.returns(::String) }
|
1091
|
+
def tooltip; end
|
1092
|
+
end
|
1093
|
+
|
1094
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#505
|
1095
|
+
class Spoom::Coverage::D3::Timeline::RBIs < ::Spoom::Coverage::D3::Timeline::Stacked
|
1096
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#509
|
1097
|
+
sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void }
|
1098
|
+
def initialize(id, snapshots); end
|
1099
|
+
|
1100
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#577
|
1101
|
+
sig { override.params(y: ::String, color: ::String, curve: ::String).returns(::String) }
|
1102
|
+
def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end
|
1103
|
+
|
1104
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#617
|
1105
|
+
sig { override.returns(::String) }
|
1106
|
+
def plot; end
|
1107
|
+
|
1108
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#537
|
1109
|
+
sig { override.returns(::String) }
|
1110
|
+
def script; end
|
1111
|
+
|
1112
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#523
|
1113
|
+
sig { override.returns(::String) }
|
1114
|
+
def tooltip; end
|
1115
|
+
end
|
1116
|
+
|
1117
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#282
|
1118
|
+
class Spoom::Coverage::D3::Timeline::Runtimes < ::Spoom::Coverage::D3::Timeline
|
1119
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#286
|
1120
|
+
sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void }
|
1121
|
+
def initialize(id, snapshots); end
|
1122
|
+
|
1123
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#311
|
1124
|
+
sig { override.returns(::String) }
|
1125
|
+
def plot; end
|
1126
|
+
|
1127
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#298
|
1128
|
+
sig { override.returns(::String) }
|
1129
|
+
def tooltip; end
|
1130
|
+
end
|
1131
|
+
|
1132
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#421
|
1133
|
+
class Spoom::Coverage::D3::Timeline::Sigils < ::Spoom::Coverage::D3::Timeline::Stacked
|
1134
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#425
|
1135
|
+
sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void }
|
1136
|
+
def initialize(id, snapshots); end
|
1137
|
+
|
1138
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#439
|
1139
|
+
sig { override.returns(::String) }
|
1140
|
+
def tooltip; end
|
1141
|
+
end
|
1142
|
+
|
1143
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#475
|
1144
|
+
class Spoom::Coverage::D3::Timeline::Sigs < ::Spoom::Coverage::D3::Timeline::Stacked
|
1145
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#479
|
1146
|
+
sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void }
|
1147
|
+
def initialize(id, snapshots); end
|
1148
|
+
|
1149
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#496
|
1150
|
+
sig { override.returns(::String) }
|
1151
|
+
def tooltip; end
|
1152
|
+
end
|
1153
|
+
|
1154
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
1155
|
+
#
|
1156
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#329
|
1157
|
+
class Spoom::Coverage::D3::Timeline::Stacked < ::Spoom::Coverage::D3::Timeline
|
1158
|
+
abstract!
|
1159
|
+
|
1160
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#388
|
1161
|
+
sig { override.params(y: ::String, color: ::String, curve: ::String).returns(::String) }
|
1162
|
+
def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end
|
1163
|
+
|
1164
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#377
|
1165
|
+
sig { override.returns(::String) }
|
1166
|
+
def plot; end
|
1167
|
+
|
1168
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#336
|
1169
|
+
sig { override.returns(::String) }
|
1170
|
+
def script; end
|
1171
|
+
end
|
1172
|
+
|
1173
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#232
|
1174
|
+
class Spoom::Coverage::D3::Timeline::Versions < ::Spoom::Coverage::D3::Timeline
|
1175
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#236
|
1176
|
+
sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void }
|
1177
|
+
def initialize(id, snapshots); end
|
1178
|
+
|
1179
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#263
|
1180
|
+
sig { override.returns(::String) }
|
1181
|
+
def plot; end
|
1182
|
+
|
1183
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#249
|
1184
|
+
sig { override.returns(::String) }
|
1185
|
+
def tooltip; end
|
1186
|
+
end
|
1187
|
+
|
1188
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
1189
|
+
#
|
1190
|
+
# source://spoom//lib/spoom/coverage/report.rb#38
|
1191
|
+
class Spoom::Coverage::Page < ::Spoom::Coverage::Template
|
1192
|
+
abstract!
|
1193
|
+
|
1194
|
+
# source://spoom//lib/spoom/coverage/report.rb#53
|
1195
|
+
sig { params(title: ::String, palette: ::Spoom::Coverage::D3::ColorPalette, template: ::String).void }
|
1196
|
+
def initialize(title:, palette:, template: T.unsafe(nil)); end
|
1197
|
+
|
1198
|
+
# source://spoom//lib/spoom/coverage/report.rb#75
|
1199
|
+
sig { returns(::String) }
|
1200
|
+
def body_html; end
|
1201
|
+
|
1202
|
+
# @abstract
|
1203
|
+
#
|
1204
|
+
# source://spoom//lib/spoom/coverage/report.rb#80
|
1205
|
+
sig { abstract.returns(T::Array[::Spoom::Coverage::Cards::Card]) }
|
1206
|
+
def cards; end
|
1207
|
+
|
1208
|
+
# source://spoom//lib/spoom/coverage/report.rb#83
|
1209
|
+
sig { returns(::String) }
|
1210
|
+
def footer_html; end
|
1211
|
+
|
1212
|
+
# source://spoom//lib/spoom/coverage/report.rb#70
|
1213
|
+
sig { returns(::String) }
|
1214
|
+
def header_html; end
|
1215
|
+
|
1216
|
+
# source://spoom//lib/spoom/coverage/report.rb#65
|
1217
|
+
sig { returns(::String) }
|
1218
|
+
def header_script; end
|
1219
|
+
|
1220
|
+
# source://spoom//lib/spoom/coverage/report.rb#60
|
1221
|
+
sig { returns(::String) }
|
1222
|
+
def header_style; end
|
1223
|
+
|
1224
|
+
# source://spoom//lib/spoom/coverage/report.rb#50
|
1225
|
+
sig { returns(::Spoom::Coverage::D3::ColorPalette) }
|
1226
|
+
def palette; end
|
1227
|
+
|
1228
|
+
# source://spoom//lib/spoom/coverage/report.rb#47
|
1229
|
+
sig { returns(::String) }
|
1230
|
+
def title; end
|
1231
|
+
end
|
1232
|
+
|
1233
|
+
# source://spoom//lib/spoom/coverage/report.rb#44
|
1234
|
+
Spoom::Coverage::Page::TEMPLATE = T.let(T.unsafe(nil), String)
|
1235
|
+
|
1236
|
+
# source://spoom//lib/spoom/coverage/report.rb#261
|
1237
|
+
class Spoom::Coverage::Report < ::Spoom::Coverage::Page
|
1238
|
+
# source://spoom//lib/spoom/coverage/report.rb#276
|
1239
|
+
sig do
|
1240
|
+
params(
|
1241
|
+
project_name: ::String,
|
1242
|
+
palette: ::Spoom::Coverage::D3::ColorPalette,
|
1243
|
+
snapshots: T::Array[::Spoom::Coverage::Snapshot],
|
1244
|
+
file_tree: ::Spoom::FileTree,
|
1245
|
+
nodes_strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)],
|
1246
|
+
nodes_strictness_scores: T::Hash[::Spoom::FileTree::Node, ::Float],
|
1247
|
+
sorbet_intro_commit: T.nilable(::String),
|
1248
|
+
sorbet_intro_date: T.nilable(::Time)
|
1249
|
+
).void
|
1250
|
+
end
|
1251
|
+
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
|
1252
|
+
|
1253
|
+
# source://spoom//lib/spoom/coverage/report.rb#308
|
1254
|
+
sig { override.returns(T::Array[::Spoom::Coverage::Cards::Card]) }
|
1255
|
+
def cards; end
|
1256
|
+
|
1257
|
+
# source://spoom//lib/spoom/coverage/report.rb#297
|
1258
|
+
sig { override.returns(::String) }
|
1259
|
+
def header_html; end
|
1260
|
+
end
|
1261
|
+
|
1262
|
+
# source://spoom//lib/spoom/coverage/snapshot.rb#6
|
1263
|
+
class Spoom::Coverage::Snapshot < ::T::Struct
|
1264
|
+
prop :timestamp, ::Integer, default: T.unsafe(nil)
|
1265
|
+
prop :version_static, T.nilable(::String), default: T.unsafe(nil)
|
1266
|
+
prop :version_runtime, T.nilable(::String), default: T.unsafe(nil)
|
1267
|
+
prop :duration, ::Integer, default: T.unsafe(nil)
|
1268
|
+
prop :commit_sha, T.nilable(::String), default: T.unsafe(nil)
|
1269
|
+
prop :commit_timestamp, T.nilable(::Integer), default: T.unsafe(nil)
|
1270
|
+
prop :files, ::Integer, default: T.unsafe(nil)
|
1271
|
+
prop :rbi_files, ::Integer, default: T.unsafe(nil)
|
1272
|
+
prop :modules, ::Integer, default: T.unsafe(nil)
|
1273
|
+
prop :classes, ::Integer, default: T.unsafe(nil)
|
1274
|
+
prop :singleton_classes, ::Integer, default: T.unsafe(nil)
|
1275
|
+
prop :methods_without_sig, ::Integer, default: T.unsafe(nil)
|
1276
|
+
prop :methods_with_sig, ::Integer, default: T.unsafe(nil)
|
1277
|
+
prop :calls_untyped, ::Integer, default: T.unsafe(nil)
|
1278
|
+
prop :calls_typed, ::Integer, default: T.unsafe(nil)
|
1279
|
+
prop :sigils, T::Hash[::String, ::Integer], default: T.unsafe(nil)
|
1280
|
+
prop :methods_with_sig_excluding_rbis, ::Integer, default: T.unsafe(nil)
|
1281
|
+
prop :methods_without_sig_excluding_rbis, ::Integer, default: T.unsafe(nil)
|
1282
|
+
prop :sigils_excluding_rbis, T::Hash[::String, ::Integer], default: T.unsafe(nil)
|
1283
|
+
|
1284
|
+
# source://spoom//lib/spoom/coverage/snapshot.rb#33
|
1285
|
+
sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean, indent_level: ::Integer).void }
|
1286
|
+
def print(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end
|
1287
|
+
|
1288
|
+
# source://spoom//lib/spoom/coverage/snapshot.rb#39
|
1289
|
+
sig { params(arg: T.untyped).returns(::String) }
|
1290
|
+
def to_json(*arg); end
|
1291
|
+
|
1292
|
+
class << self
|
1293
|
+
# source://spoom//lib/spoom/coverage/snapshot.rb#47
|
1294
|
+
sig { params(json: ::String).returns(::Spoom::Coverage::Snapshot) }
|
1295
|
+
def from_json(json); end
|
1296
|
+
|
1297
|
+
# source://spoom//lib/spoom/coverage/snapshot.rb#52
|
1298
|
+
sig { params(obj: T::Hash[::String, T.untyped]).returns(::Spoom::Coverage::Snapshot) }
|
1299
|
+
def from_obj(obj); end
|
1300
|
+
|
1301
|
+
# source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13
|
1302
|
+
def inherited(s); end
|
1303
|
+
end
|
1304
|
+
end
|
1305
|
+
|
1306
|
+
# The strictness name as found in the Sorbet metrics file
|
1307
|
+
#
|
1308
|
+
# source://spoom//lib/spoom/coverage/snapshot.rb#30
|
1309
|
+
Spoom::Coverage::Snapshot::STRICTNESSES = T.let(T.unsafe(nil), Array)
|
1310
|
+
|
1311
|
+
# source://spoom//lib/spoom/coverage/snapshot.rb#95
|
1312
|
+
class Spoom::Coverage::SnapshotPrinter < ::Spoom::Printer
|
1313
|
+
# source://spoom//lib/spoom/coverage/snapshot.rb#99
|
1314
|
+
sig { params(snapshot: ::Spoom::Coverage::Snapshot).void }
|
1315
|
+
def print_snapshot(snapshot); end
|
1316
|
+
|
1317
|
+
private
|
1318
|
+
|
1319
|
+
# source://spoom//lib/spoom/coverage/snapshot.rb#158
|
1320
|
+
sig { params(value: T.nilable(::Integer), total: T.nilable(::Integer)).returns(::String) }
|
1321
|
+
def percent(value, total); end
|
1322
|
+
|
1323
|
+
# source://spoom//lib/spoom/coverage/snapshot.rb#147
|
1324
|
+
sig { params(hash: T::Hash[::String, ::Integer], total: ::Integer).void }
|
1325
|
+
def print_map(hash, total); end
|
1326
|
+
end
|
1327
|
+
|
1328
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
1329
|
+
#
|
1330
|
+
# source://spoom//lib/spoom/coverage/report.rb#10
|
1331
|
+
class Spoom::Coverage::Template
|
1332
|
+
abstract!
|
1333
|
+
|
1334
|
+
# Create a new template from an Erb file path
|
1335
|
+
#
|
1336
|
+
# source://spoom//lib/spoom/coverage/report.rb#18
|
1337
|
+
sig { params(template: ::String).void }
|
1338
|
+
def initialize(template:); end
|
1339
|
+
|
1340
|
+
# source://spoom//lib/spoom/coverage/report.rb#23
|
1341
|
+
sig { returns(::String) }
|
1342
|
+
def erb; end
|
1343
|
+
|
1344
|
+
# source://spoom//lib/spoom/coverage/report.rb#33
|
1345
|
+
sig { returns(::Binding) }
|
1346
|
+
def get_binding; end
|
1347
|
+
|
1348
|
+
# source://spoom//lib/spoom/coverage/report.rb#28
|
1349
|
+
sig { returns(::String) }
|
1350
|
+
def html; end
|
1351
|
+
end
|
1352
|
+
|
1353
|
+
# source://spoom//lib/spoom/deadcode/erb.rb#27
|
1354
|
+
module Spoom::Deadcode
|
1355
|
+
class << self
|
1356
|
+
# source://spoom//lib/spoom/deadcode.rb#51
|
1357
|
+
sig do
|
1358
|
+
params(
|
1359
|
+
index: ::Spoom::Deadcode::Index,
|
1360
|
+
erb: ::String,
|
1361
|
+
file: ::String,
|
1362
|
+
plugins: T::Array[::Spoom::Deadcode::Plugins::Base]
|
1363
|
+
).void
|
1364
|
+
end
|
1365
|
+
def index_erb(index, erb, file:, plugins: T.unsafe(nil)); end
|
1366
|
+
|
1367
|
+
# source://spoom//lib/spoom/deadcode.rb#40
|
1368
|
+
sig do
|
1369
|
+
params(
|
1370
|
+
index: ::Spoom::Deadcode::Index,
|
1371
|
+
ruby: ::String,
|
1372
|
+
file: ::String,
|
1373
|
+
plugins: T::Array[::Spoom::Deadcode::Plugins::Base]
|
1374
|
+
).void
|
1375
|
+
end
|
1376
|
+
def index_ruby(index, ruby, file:, plugins: T.unsafe(nil)); end
|
1377
|
+
|
1378
|
+
# source://spoom//lib/spoom/deadcode/plugins.rb#74
|
1379
|
+
sig { params(context: ::Spoom::Context).returns(T::Array[::Spoom::Deadcode::Plugins::Base]) }
|
1380
|
+
def load_custom_plugins(context); end
|
1381
|
+
|
1382
|
+
# source://spoom//lib/spoom/deadcode/plugins.rb#60
|
1383
|
+
sig { params(context: ::Spoom::Context).returns(T::Array[::Spoom::Deadcode::Plugins::Base]) }
|
1384
|
+
def plugins_from_gemfile_lock(context); end
|
1385
|
+
end
|
1386
|
+
end
|
1387
|
+
|
1388
|
+
# source://spoom//lib/spoom/deadcode/plugins.rb#25
|
1389
|
+
Spoom::Deadcode::DEFAULT_CUSTOM_PLUGINS_PATH = T.let(T.unsafe(nil), String)
|
1390
|
+
|
1391
|
+
# source://spoom//lib/spoom/deadcode/plugins.rb#27
|
1392
|
+
Spoom::Deadcode::DEFAULT_PLUGINS = T.let(T.unsafe(nil), Set)
|
1393
|
+
|
1394
|
+
# A definition is a class, module, method, constant, etc. being defined in the code
|
1395
|
+
#
|
1396
|
+
# source://spoom//lib/spoom/deadcode/definition.rb#7
|
1397
|
+
class Spoom::Deadcode::Definition < ::T::Struct
|
1398
|
+
const :kind, ::Spoom::Deadcode::Definition::Kind
|
1399
|
+
const :name, ::String
|
1400
|
+
const :full_name, ::String
|
1401
|
+
const :location, ::Spoom::Deadcode::Location
|
1402
|
+
const :status, ::Spoom::Deadcode::Definition::Status, default: T.unsafe(nil)
|
1403
|
+
|
1404
|
+
# source://spoom//lib/spoom/deadcode/definition.rb#78
|
1405
|
+
sig { void }
|
1406
|
+
def alive!; end
|
1407
|
+
|
1408
|
+
# Status
|
1409
|
+
#
|
1410
|
+
# source://spoom//lib/spoom/deadcode/definition.rb#73
|
1411
|
+
sig { returns(T::Boolean) }
|
1412
|
+
def alive?; end
|
1413
|
+
|
1414
|
+
# Kind
|
1415
|
+
#
|
1416
|
+
# source://spoom//lib/spoom/deadcode/definition.rb#41
|
1417
|
+
sig { returns(T::Boolean) }
|
1418
|
+
def attr_reader?; end
|
1419
|
+
|
1420
|
+
# source://spoom//lib/spoom/deadcode/definition.rb#46
|
1421
|
+
sig { returns(T::Boolean) }
|
1422
|
+
def attr_writer?; end
|
1423
|
+
|
1424
|
+
# source://spoom//lib/spoom/deadcode/definition.rb#51
|
1425
|
+
sig { returns(T::Boolean) }
|
1426
|
+
def class?; end
|
1427
|
+
|
1428
|
+
# source://spoom//lib/spoom/deadcode/definition.rb#56
|
1429
|
+
sig { returns(T::Boolean) }
|
1430
|
+
def constant?; end
|
1431
|
+
|
1432
|
+
# source://spoom//lib/spoom/deadcode/definition.rb#83
|
1433
|
+
sig { returns(T::Boolean) }
|
1434
|
+
def dead?; end
|
1435
|
+
|
1436
|
+
# source://spoom//lib/spoom/deadcode/definition.rb#93
|
1437
|
+
sig { void }
|
1438
|
+
def ignored!; end
|
1439
|
+
|
1440
|
+
# source://spoom//lib/spoom/deadcode/definition.rb#88
|
1441
|
+
sig { returns(T::Boolean) }
|
1442
|
+
def ignored?; end
|
1443
|
+
|
1444
|
+
# source://spoom//lib/spoom/deadcode/definition.rb#61
|
1445
|
+
sig { returns(T::Boolean) }
|
1446
|
+
def method?; end
|
1447
|
+
|
1448
|
+
# source://spoom//lib/spoom/deadcode/definition.rb#66
|
1449
|
+
sig { returns(T::Boolean) }
|
1450
|
+
def module?; end
|
1451
|
+
|
1452
|
+
class << self
|
1453
|
+
# source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13
|
1454
|
+
def inherited(s); end
|
1455
|
+
end
|
1456
|
+
end
|
1457
|
+
|
1458
|
+
# source://spoom//lib/spoom/deadcode/definition.rb#10
|
1459
|
+
class Spoom::Deadcode::Definition::Kind < ::T::Enum
|
1460
|
+
enums do
|
1461
|
+
AttrReader = new
|
1462
|
+
AttrWriter = new
|
1463
|
+
Class = new
|
1464
|
+
Constant = new
|
1465
|
+
Method = new
|
1466
|
+
Module = new
|
1467
|
+
end
|
1468
|
+
end
|
1469
|
+
|
1470
|
+
# source://spoom//lib/spoom/deadcode/definition.rb#21
|
1471
|
+
class Spoom::Deadcode::Definition::Status < ::T::Enum
|
1472
|
+
enums do
|
1473
|
+
ALIVE = new
|
1474
|
+
DEAD = new
|
1475
|
+
IGNORED = new
|
1476
|
+
end
|
1477
|
+
end
|
1478
|
+
|
1479
|
+
# Custom engine to handle ERB templates as used by Rails
|
1480
|
+
#
|
1481
|
+
# source://spoom//lib/spoom/deadcode/erb.rb#29
|
1482
|
+
class Spoom::Deadcode::ERB < ::Erubi::Engine
|
1483
|
+
# source://spoom//lib/spoom/deadcode/erb.rb#33
|
1484
|
+
sig { params(input: T.untyped, properties: T.untyped).void }
|
1485
|
+
def initialize(input, properties = T.unsafe(nil)); end
|
1486
|
+
|
1487
|
+
private
|
1488
|
+
|
1489
|
+
# source://spoom//lib/spoom/deadcode/erb.rb#83
|
1490
|
+
sig { override.params(code: T.untyped).void }
|
1491
|
+
def add_code(code); end
|
1492
|
+
|
1493
|
+
# source://spoom//lib/spoom/deadcode/erb.rb#66
|
1494
|
+
sig { override.params(indicator: T.untyped, code: T.untyped).void }
|
1495
|
+
def add_expression(indicator, code); end
|
1496
|
+
|
1497
|
+
# source://spoom//lib/spoom/deadcode/erb.rb#89
|
1498
|
+
sig { override.params(_: T.untyped).void }
|
1499
|
+
def add_postamble(_); end
|
1500
|
+
|
1501
|
+
# source://spoom//lib/spoom/deadcode/erb.rb#48
|
1502
|
+
sig { override.params(text: T.untyped).void }
|
1503
|
+
def add_text(text); end
|
1504
|
+
|
1505
|
+
# source://spoom//lib/spoom/deadcode/erb.rb#95
|
1506
|
+
sig { params(src: T.untyped).void }
|
1507
|
+
def flush_newline_if_pending(src); end
|
1508
|
+
end
|
1509
|
+
|
1510
|
+
# source://spoom//lib/spoom/deadcode/erb.rb#63
|
1511
|
+
Spoom::Deadcode::ERB::BLOCK_EXPR = T.let(T.unsafe(nil), Regexp)
|
1512
|
+
|
1513
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
1514
|
+
#
|
1515
|
+
# source://spoom//lib/spoom/deadcode.rb#20
|
1516
|
+
class Spoom::Deadcode::Error < ::Spoom::Error
|
1517
|
+
abstract!
|
1518
|
+
|
1519
|
+
# source://spoom//lib/spoom/deadcode.rb#27
|
1520
|
+
sig { params(message: ::String, parent: ::Exception).void }
|
1521
|
+
def initialize(message, parent:); end
|
1522
|
+
end
|
1523
|
+
|
1524
|
+
# source://spoom//lib/spoom/deadcode/index.rb#6
|
1525
|
+
class Spoom::Deadcode::Index
|
1526
|
+
# source://spoom//lib/spoom/deadcode/index.rb#16
|
1527
|
+
sig { void }
|
1528
|
+
def initialize; end
|
1529
|
+
|
1530
|
+
# source://spoom//lib/spoom/deadcode/index.rb#51
|
1531
|
+
sig { returns(T::Array[::Spoom::Deadcode::Definition]) }
|
1532
|
+
def all_definitions; end
|
1533
|
+
|
1534
|
+
# source://spoom//lib/spoom/deadcode/index.rb#56
|
1535
|
+
sig { returns(T::Array[::Spoom::Deadcode::Reference]) }
|
1536
|
+
def all_references; end
|
1537
|
+
|
1538
|
+
# Indexing
|
1539
|
+
#
|
1540
|
+
# source://spoom//lib/spoom/deadcode/index.rb#24
|
1541
|
+
sig { params(definition: ::Spoom::Deadcode::Definition).void }
|
1542
|
+
def define(definition); end
|
1543
|
+
|
1544
|
+
# source://spoom//lib/spoom/deadcode/index.rb#10
|
1545
|
+
sig { returns(T::Hash[::String, T::Array[::Spoom::Deadcode::Definition]]) }
|
1546
|
+
def definitions; end
|
1547
|
+
|
1548
|
+
# Utils
|
1549
|
+
#
|
1550
|
+
# source://spoom//lib/spoom/deadcode/index.rb#46
|
1551
|
+
sig { params(name: ::String).returns(T::Array[::Spoom::Deadcode::Definition]) }
|
1552
|
+
def definitions_for_name(name); end
|
1553
|
+
|
1554
|
+
# Mark all definitions having a reference of the same name as `alive`
|
1555
|
+
#
|
1556
|
+
# To be called once all the files have been indexed and all the definitions and references discovered.
|
1557
|
+
#
|
1558
|
+
# source://spoom//lib/spoom/deadcode/index.rb#37
|
1559
|
+
sig { void }
|
1560
|
+
def finalize!; end
|
1561
|
+
|
1562
|
+
# source://spoom//lib/spoom/deadcode/index.rb#29
|
1563
|
+
sig { params(reference: ::Spoom::Deadcode::Reference).void }
|
1564
|
+
def reference(reference); end
|
1565
|
+
|
1566
|
+
# source://spoom//lib/spoom/deadcode/index.rb#13
|
1567
|
+
sig { returns(T::Hash[::String, T::Array[::Spoom::Deadcode::Reference]]) }
|
1568
|
+
def references; end
|
1569
|
+
end
|
1570
|
+
|
1571
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#6
|
1572
|
+
class Spoom::Deadcode::Indexer < ::SyntaxTree::Visitor
|
1573
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#16
|
1574
|
+
sig do
|
1575
|
+
params(
|
1576
|
+
path: ::String,
|
1577
|
+
source: ::String,
|
1578
|
+
index: ::Spoom::Deadcode::Index,
|
1579
|
+
plugins: T::Array[::Spoom::Deadcode::Plugins::Base]
|
1580
|
+
).void
|
1581
|
+
end
|
1582
|
+
def initialize(path, source, index, plugins: T.unsafe(nil)); end
|
1583
|
+
|
1584
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#459
|
1585
|
+
sig do
|
1586
|
+
params(
|
1587
|
+
node: T.nilable(T.any(::SyntaxTree::ArgParen, ::SyntaxTree::Args, ::SyntaxTree::ArgsForward))
|
1588
|
+
).returns(T::Array[::SyntaxTree::Node])
|
1589
|
+
end
|
1590
|
+
def call_args(node); end
|
1591
|
+
|
1592
|
+
# Context
|
1593
|
+
#
|
1594
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#367
|
1595
|
+
sig { returns(::SyntaxTree::Node) }
|
1596
|
+
def current_node; end
|
1597
|
+
|
1598
|
+
# Definition indexing
|
1599
|
+
#
|
1600
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#281
|
1601
|
+
sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void }
|
1602
|
+
def define_attr_reader(name, full_name, node); end
|
1603
|
+
|
1604
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#293
|
1605
|
+
sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void }
|
1606
|
+
def define_attr_writer(name, full_name, node); end
|
1607
|
+
|
1608
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#305
|
1609
|
+
sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void }
|
1610
|
+
def define_class(name, full_name, node); end
|
1611
|
+
|
1612
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#317
|
1613
|
+
sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void }
|
1614
|
+
def define_constant(name, full_name, node); end
|
1615
|
+
|
1616
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#329
|
1617
|
+
sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void }
|
1618
|
+
def define_method(name, full_name, node); end
|
1619
|
+
|
1620
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#341
|
1621
|
+
sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void }
|
1622
|
+
def define_module(name, full_name, node); end
|
1623
|
+
|
1624
|
+
# @return [String]
|
1625
|
+
#
|
1626
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#10
|
1627
|
+
def file_name; end
|
1628
|
+
|
1629
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#13
|
1630
|
+
sig { returns(::Spoom::Deadcode::Index) }
|
1631
|
+
def index; end
|
1632
|
+
|
1633
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#426
|
1634
|
+
sig { returns(T.nilable(::String)) }
|
1635
|
+
def last_sig; end
|
1636
|
+
|
1637
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#386
|
1638
|
+
sig { returns(T.nilable(::SyntaxTree::BlockNode)) }
|
1639
|
+
def nesting_block; end
|
1640
|
+
|
1641
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#391
|
1642
|
+
sig { returns(T.nilable(::SyntaxTree::MethodAddBlock)) }
|
1643
|
+
def nesting_block_call; end
|
1644
|
+
|
1645
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#396
|
1646
|
+
sig { returns(T.nilable(::String)) }
|
1647
|
+
def nesting_block_call_name; end
|
1648
|
+
|
1649
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#381
|
1650
|
+
sig { returns(T.nilable(::SyntaxTree::ClassDeclaration)) }
|
1651
|
+
def nesting_class; end
|
1652
|
+
|
1653
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#410
|
1654
|
+
sig { returns(T.nilable(::String)) }
|
1655
|
+
def nesting_class_name; end
|
1656
|
+
|
1657
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#418
|
1658
|
+
sig { returns(T.nilable(::String)) }
|
1659
|
+
def nesting_class_superclass_name; end
|
1660
|
+
|
1661
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#372
|
1662
|
+
sig { type_parameters(:N).params(type: T::Class[T.type_parameter(:N)]).returns(T.nilable(T.type_parameter(:N))) }
|
1663
|
+
def nesting_node(type); end
|
1664
|
+
|
1665
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#445
|
1666
|
+
sig { params(node: ::SyntaxTree::Node).returns(::Spoom::Deadcode::Location) }
|
1667
|
+
def node_location(node); end
|
1668
|
+
|
1669
|
+
# Node utils
|
1670
|
+
#
|
1671
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#435
|
1672
|
+
sig { params(node: T.any(::Symbol, ::SyntaxTree::Node)).returns(::String) }
|
1673
|
+
def node_string(node); end
|
1674
|
+
|
1675
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#10
|
1676
|
+
sig { returns(::String) }
|
1677
|
+
def path; end
|
1678
|
+
|
1679
|
+
# Reference indexing
|
1680
|
+
#
|
1681
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#355
|
1682
|
+
sig { params(name: ::String, node: ::SyntaxTree::Node).void }
|
1683
|
+
def reference_constant(name, node); end
|
1684
|
+
|
1685
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#360
|
1686
|
+
sig { params(name: ::String, node: ::SyntaxTree::Node).void }
|
1687
|
+
def reference_method(name, node); end
|
1688
|
+
|
1689
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#450
|
1690
|
+
sig { params(node: ::SyntaxTree::Node).returns(::String) }
|
1691
|
+
def symbol_string(node); end
|
1692
|
+
|
1693
|
+
# Visit
|
1694
|
+
#
|
1695
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#35
|
1696
|
+
sig { override.params(node: T.nilable(::SyntaxTree::Node)).void }
|
1697
|
+
def visit(node); end
|
1698
|
+
|
1699
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#45
|
1700
|
+
sig { override.params(node: ::SyntaxTree::AliasNode).void }
|
1701
|
+
def visit_alias(node); end
|
1702
|
+
|
1703
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#50
|
1704
|
+
sig { override.params(node: ::SyntaxTree::ARef).void }
|
1705
|
+
def visit_aref(node); end
|
1706
|
+
|
1707
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#57
|
1708
|
+
sig { override.params(node: ::SyntaxTree::ARefField).void }
|
1709
|
+
def visit_aref_field(node); end
|
1710
|
+
|
1711
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#64
|
1712
|
+
sig { override.params(node: ::SyntaxTree::ArgBlock).void }
|
1713
|
+
def visit_arg_block(node); end
|
1714
|
+
|
1715
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#78
|
1716
|
+
sig { override.params(node: ::SyntaxTree::Binary).void }
|
1717
|
+
def visit_binary(node); end
|
1718
|
+
|
1719
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#94
|
1720
|
+
sig { override.params(node: ::SyntaxTree::CallNode).void }
|
1721
|
+
def visit_call(node); end
|
1722
|
+
|
1723
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#106
|
1724
|
+
sig { override.params(node: ::SyntaxTree::ClassDeclaration).void }
|
1725
|
+
def visit_class(node); end
|
1726
|
+
|
1727
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#119
|
1728
|
+
sig { override.params(node: ::SyntaxTree::Command).void }
|
1729
|
+
def visit_command(node); end
|
1730
|
+
|
1731
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#131
|
1732
|
+
sig { override.params(node: ::SyntaxTree::CommandCall).void }
|
1733
|
+
def visit_command_call(node); end
|
1734
|
+
|
1735
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#144
|
1736
|
+
sig { override.params(node: ::SyntaxTree::Const).void }
|
1737
|
+
def visit_const(node); end
|
1738
|
+
|
1739
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#149
|
1740
|
+
sig { override.params(node: ::SyntaxTree::ConstPathField).void }
|
1741
|
+
def visit_const_path_field(node); end
|
1742
|
+
|
1743
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#159
|
1744
|
+
sig { override.params(node: ::SyntaxTree::DefNode).void }
|
1745
|
+
def visit_def(node); end
|
1746
|
+
|
1747
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#167
|
1748
|
+
sig { override.params(node: ::SyntaxTree::Field).void }
|
1749
|
+
def visit_field(node); end
|
1750
|
+
|
1751
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#183
|
1752
|
+
sig { override.params(node: ::SyntaxTree::ModuleDeclaration).void }
|
1753
|
+
def visit_module(node); end
|
1754
|
+
|
1755
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#195
|
1756
|
+
sig { override.params(node: ::SyntaxTree::OpAssign).void }
|
1757
|
+
def visit_opassign(node); end
|
1758
|
+
|
1759
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#204
|
1760
|
+
sig { params(send: ::Spoom::Deadcode::Send).void }
|
1761
|
+
def visit_send(send); end
|
1762
|
+
|
1763
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#243
|
1764
|
+
sig { override.params(node: ::SyntaxTree::SymbolLiteral).void }
|
1765
|
+
def visit_symbol_literal(node); end
|
1766
|
+
|
1767
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#252
|
1768
|
+
sig { override.params(node: ::SyntaxTree::TopConstField).void }
|
1769
|
+
def visit_top_const_field(node); end
|
1770
|
+
|
1771
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#257
|
1772
|
+
sig { override.params(node: ::SyntaxTree::VarField).void }
|
1773
|
+
def visit_var_field(node); end
|
1774
|
+
|
1775
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#274
|
1776
|
+
sig { override.params(node: ::SyntaxTree::VCall).void }
|
1777
|
+
def visit_vcall(node); end
|
1778
|
+
end
|
1779
|
+
|
1780
|
+
# source://spoom//lib/spoom/deadcode.rb#34
|
1781
|
+
class Spoom::Deadcode::IndexerError < ::Spoom::Deadcode::Error; end
|
1782
|
+
|
1783
|
+
# source://spoom//lib/spoom/deadcode/location.rb#6
|
1784
|
+
class Spoom::Deadcode::Location
|
1785
|
+
include ::Comparable
|
1786
|
+
|
1787
|
+
# source://spoom//lib/spoom/deadcode/location.rb#54
|
1788
|
+
sig do
|
1789
|
+
params(
|
1790
|
+
file: ::String,
|
1791
|
+
start_line: ::Integer,
|
1792
|
+
start_column: ::Integer,
|
1793
|
+
end_line: ::Integer,
|
1794
|
+
end_column: ::Integer
|
1795
|
+
).void
|
1796
|
+
end
|
1797
|
+
def initialize(file, start_line, start_column, end_line, end_column); end
|
1798
|
+
|
1799
|
+
# source://spoom//lib/spoom/deadcode/location.rb#74
|
1800
|
+
sig { override.params(other: ::BasicObject).returns(T.nilable(::Integer)) }
|
1801
|
+
def <=>(other); end
|
1802
|
+
|
1803
|
+
# @return [Integer]
|
1804
|
+
#
|
1805
|
+
# source://spoom//lib/spoom/deadcode/location.rb#43
|
1806
|
+
def end_column; end
|
1807
|
+
|
1808
|
+
# @return [Integer]
|
1809
|
+
#
|
1810
|
+
# source://spoom//lib/spoom/deadcode/location.rb#43
|
1811
|
+
def end_line; end
|
1812
|
+
|
1813
|
+
# source://spoom//lib/spoom/deadcode/location.rb#40
|
1814
|
+
sig { returns(::String) }
|
1815
|
+
def file; end
|
1816
|
+
|
1817
|
+
# source://spoom//lib/spoom/deadcode/location.rb#63
|
1818
|
+
sig { params(other: ::Spoom::Deadcode::Location).returns(T::Boolean) }
|
1819
|
+
def include?(other); end
|
1820
|
+
|
1821
|
+
# @return [Integer]
|
1822
|
+
#
|
1823
|
+
# source://spoom//lib/spoom/deadcode/location.rb#43
|
1824
|
+
def start_column; end
|
1825
|
+
|
1826
|
+
# source://spoom//lib/spoom/deadcode/location.rb#43
|
1827
|
+
sig { returns(::Integer) }
|
1828
|
+
def start_line; end
|
1829
|
+
|
1830
|
+
# source://spoom//lib/spoom/deadcode/location.rb#81
|
1831
|
+
sig { returns(::String) }
|
1832
|
+
def to_s; end
|
1833
|
+
|
1834
|
+
class << self
|
1835
|
+
# @raise [LocationError]
|
1836
|
+
#
|
1837
|
+
# source://spoom//lib/spoom/deadcode/location.rb#17
|
1838
|
+
sig { params(location_string: ::String).returns(::Spoom::Deadcode::Location) }
|
1839
|
+
def from_string(location_string); end
|
1840
|
+
|
1841
|
+
# source://spoom//lib/spoom/deadcode/location.rb#34
|
1842
|
+
sig { params(file: ::String, location: ::SyntaxTree::Location).returns(::Spoom::Deadcode::Location) }
|
1843
|
+
def from_syntax_tree(file, location); end
|
1844
|
+
end
|
1845
|
+
end
|
1846
|
+
|
1847
|
+
# source://spoom//lib/spoom/deadcode/location.rb#11
|
1848
|
+
class Spoom::Deadcode::Location::LocationError < ::Spoom::Error; end
|
1849
|
+
|
1850
|
+
# source://spoom//lib/spoom/deadcode/plugins.rb#35
|
1851
|
+
Spoom::Deadcode::PLUGINS_FOR_GEM = T.let(T.unsafe(nil), Hash)
|
1852
|
+
|
1853
|
+
# source://spoom//lib/spoom/deadcode.rb#33
|
1854
|
+
class Spoom::Deadcode::ParserError < ::Spoom::Deadcode::Error; end
|
1855
|
+
|
1856
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#8
|
1857
|
+
module Spoom::Deadcode::Plugins; end
|
1858
|
+
|
1859
|
+
# source://spoom//lib/spoom/deadcode/plugins/action_mailer.rb#7
|
1860
|
+
class Spoom::Deadcode::Plugins::ActionMailer < ::Spoom::Deadcode::Plugins::Base
|
1861
|
+
# source://spoom//lib/spoom/deadcode/plugins/action_mailer.rb#11
|
1862
|
+
sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void }
|
1863
|
+
def on_send(indexer, send); end
|
1864
|
+
end
|
1865
|
+
|
1866
|
+
# source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#7
|
1867
|
+
class Spoom::Deadcode::Plugins::ActionPack < ::Spoom::Deadcode::Plugins::Base
|
1868
|
+
# source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#31
|
1869
|
+
sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
|
1870
|
+
def on_define_method(indexer, definition); end
|
1871
|
+
|
1872
|
+
# source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#36
|
1873
|
+
sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void }
|
1874
|
+
def on_send(indexer, send); end
|
1875
|
+
end
|
1876
|
+
|
1877
|
+
# source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#10
|
1878
|
+
Spoom::Deadcode::Plugins::ActionPack::CALLBACKS = T.let(T.unsafe(nil), Array)
|
1879
|
+
|
1880
|
+
# source://spoom//lib/spoom/deadcode/plugins/active_job.rb#7
|
1881
|
+
class Spoom::Deadcode::Plugins::ActiveJob < ::Spoom::Deadcode::Plugins::Base; end
|
1882
|
+
|
1883
|
+
# source://spoom//lib/spoom/deadcode/plugins/active_model.rb#7
|
1884
|
+
class Spoom::Deadcode::Plugins::ActiveModel < ::Spoom::Deadcode::Plugins::Base
|
1885
|
+
# source://spoom//lib/spoom/deadcode/plugins/active_model.rb#14
|
1886
|
+
sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void }
|
1887
|
+
def on_send(indexer, send); end
|
1888
|
+
end
|
1889
|
+
|
1890
|
+
# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#7
|
1891
|
+
class Spoom::Deadcode::Plugins::ActiveRecord < ::Spoom::Deadcode::Plugins::Base
|
1892
|
+
# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#74
|
1893
|
+
sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void }
|
1894
|
+
def on_send(indexer, send); end
|
1895
|
+
end
|
1896
|
+
|
1897
|
+
# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#64
|
1898
|
+
Spoom::Deadcode::Plugins::ActiveRecord::ARRAY_METHODS = T.let(T.unsafe(nil), Array)
|
1899
|
+
|
1900
|
+
# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#20
|
1901
|
+
Spoom::Deadcode::Plugins::ActiveRecord::CALLBACKS = T.let(T.unsafe(nil), Array)
|
1902
|
+
|
1903
|
+
# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#49
|
1904
|
+
Spoom::Deadcode::Plugins::ActiveRecord::CRUD_METHODS = T.let(T.unsafe(nil), Array)
|
1905
|
+
|
1906
|
+
# source://spoom//lib/spoom/deadcode/plugins/active_support.rb#7
|
1907
|
+
class Spoom::Deadcode::Plugins::ActiveSupport < ::Spoom::Deadcode::Plugins::Base; end
|
1908
|
+
|
1909
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
1910
|
+
#
|
1911
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#9
|
1912
|
+
class Spoom::Deadcode::Plugins::Base
|
1913
|
+
abstract!
|
1914
|
+
|
1915
|
+
# Do not override this method, use `on_define_accessor` instead.
|
1916
|
+
#
|
1917
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#150
|
1918
|
+
sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
|
1919
|
+
def internal_on_define_accessor(indexer, definition); end
|
1920
|
+
|
1921
|
+
# Do not override this method, use `on_define_class` instead.
|
1922
|
+
#
|
1923
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#174
|
1924
|
+
sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
|
1925
|
+
def internal_on_define_class(indexer, definition); end
|
1926
|
+
|
1927
|
+
# Do not override this method, use `on_define_constant` instead.
|
1928
|
+
#
|
1929
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#204
|
1930
|
+
sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
|
1931
|
+
def internal_on_define_constant(indexer, definition); end
|
1932
|
+
|
1933
|
+
# Do not override this method, use `on_define_method` instead.
|
1934
|
+
#
|
1935
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#232
|
1936
|
+
sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
|
1937
|
+
def internal_on_define_method(indexer, definition); end
|
1938
|
+
|
1939
|
+
# Do not override this method, use `on_define_module` instead.
|
1940
|
+
#
|
1941
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#258
|
1942
|
+
sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
|
1943
|
+
def internal_on_define_module(indexer, definition); end
|
1944
|
+
|
1945
|
+
# Do not override this method, use `on_send` instead.
|
1946
|
+
#
|
1947
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#284
|
1948
|
+
sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void }
|
1949
|
+
def internal_on_send(indexer, send); end
|
1950
|
+
|
1951
|
+
# Called when an accessor is defined.
|
1952
|
+
#
|
1953
|
+
# Will be called when the indexer processes a `attr_reader`, `attr_writer` or `attr_accessor` node.
|
1954
|
+
# Note that when this method is called, the definition for the node has already been added to the index.
|
1955
|
+
# It is still possible to ignore it from the plugin:
|
1956
|
+
#
|
1957
|
+
# ~~~rb
|
1958
|
+
# class MyPlugin < Spoom::Deadcode::Plugins::Base
|
1959
|
+
# def on_define_accessor(indexer, definition)
|
1960
|
+
# definition.ignored! if definition.name == "foo"
|
1961
|
+
# end
|
1962
|
+
# end
|
1963
|
+
# ~~~
|
1964
|
+
#
|
1965
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#144
|
1966
|
+
sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
|
1967
|
+
def on_define_accessor(indexer, definition); end
|
1968
|
+
|
1969
|
+
# Called when a class is defined.
|
1970
|
+
#
|
1971
|
+
# Will be called when the indexer processes a `class` node.
|
1972
|
+
# Note that when this method is called, the definition for the node has already been added to the index.
|
1973
|
+
# It is still possible to ignore it from the plugin:
|
1974
|
+
#
|
1975
|
+
# ~~~rb
|
1976
|
+
# class MyPlugin < Spoom::Deadcode::Plugins::Base
|
1977
|
+
# def on_define_class(indexer, definition)
|
1978
|
+
# definition.ignored! if definition.name == "Foo"
|
1979
|
+
# end
|
1980
|
+
# end
|
1981
|
+
# ~~~
|
1982
|
+
#
|
1983
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#168
|
1984
|
+
sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
|
1985
|
+
def on_define_class(indexer, definition); end
|
1986
|
+
|
1987
|
+
# Called when a constant is defined.
|
1988
|
+
#
|
1989
|
+
# Will be called when the indexer processes a `CONST =` node.
|
1990
|
+
# Note that when this method is called, the definition for the node has already been added to the index.
|
1991
|
+
# It is still possible to ignore it from the plugin:
|
1992
|
+
#
|
1993
|
+
# ~~~rb
|
1994
|
+
# class MyPlugin < Spoom::Deadcode::Plugins::Base
|
1995
|
+
# def on_define_constant(indexer, definition)
|
1996
|
+
# definition.ignored! if definition.name == "FOO"
|
1997
|
+
# end
|
1998
|
+
# end
|
1999
|
+
# ~~~
|
2000
|
+
#
|
2001
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#198
|
2002
|
+
sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
|
2003
|
+
def on_define_constant(indexer, definition); end
|
2004
|
+
|
2005
|
+
# Called when a method is defined.
|
2006
|
+
#
|
2007
|
+
# Will be called when the indexer processes a `def` or `defs` node.
|
2008
|
+
# Note that when this method is called, the definition for the node has already been added to the index.
|
2009
|
+
# It is still possible to ignore it from the plugin:
|
2010
|
+
#
|
2011
|
+
# ~~~rb
|
2012
|
+
# class MyPlugin < Spoom::Deadcode::Plugins::Base
|
2013
|
+
# def on_define_method(indexer, definition)
|
2014
|
+
# super # So the `ignore_method_names` DSL is still applied
|
2015
|
+
#
|
2016
|
+
# definition.ignored! if definition.name == "foo"
|
2017
|
+
# end
|
2018
|
+
# end
|
2019
|
+
# ~~~
|
2020
|
+
#
|
2021
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#226
|
2022
|
+
sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
|
2023
|
+
def on_define_method(indexer, definition); end
|
2024
|
+
|
2025
|
+
# Called when a module is defined.
|
2026
|
+
#
|
2027
|
+
# Will be called when the indexer processes a `module` node.
|
2028
|
+
# Note that when this method is called, the definition for the node has already been added to the index.
|
2029
|
+
# It is still possible to ignore it from the plugin:
|
2030
|
+
#
|
2031
|
+
# ~~~rb
|
2032
|
+
# class MyPlugin < Spoom::Deadcode::Plugins::Base
|
2033
|
+
# def on_define_module(indexer, definition)
|
2034
|
+
# definition.ignored! if definition.name == "Foo"
|
2035
|
+
# end
|
2036
|
+
# end
|
2037
|
+
# ~~~
|
2038
|
+
#
|
2039
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#252
|
2040
|
+
sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
|
2041
|
+
def on_define_module(indexer, definition); end
|
2042
|
+
|
2043
|
+
# Called when a send is being processed
|
2044
|
+
#
|
2045
|
+
# ~~~rb
|
2046
|
+
# class MyPlugin < Spoom::Deadcode::Plugins::Base
|
2047
|
+
# def on_send(indexer, send)
|
2048
|
+
# return unless send.name == "dsl_method"
|
2049
|
+
# return if send.args.empty?
|
2050
|
+
#
|
2051
|
+
# method_name = indexer.node_string(send.args.first).delete_prefix(":")
|
2052
|
+
# indexer.reference_method(method_name, send.node)
|
2053
|
+
# end
|
2054
|
+
# end
|
2055
|
+
# ~~~
|
2056
|
+
#
|
2057
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#278
|
2058
|
+
sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void }
|
2059
|
+
def on_send(indexer, send); end
|
2060
|
+
|
2061
|
+
private
|
2062
|
+
|
2063
|
+
# Plugin utils
|
2064
|
+
#
|
2065
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#339
|
2066
|
+
sig { params(name: ::String).returns(::String) }
|
2067
|
+
def camelize(name); end
|
2068
|
+
|
2069
|
+
# DSL support
|
2070
|
+
#
|
2071
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#293
|
2072
|
+
sig { params(name: T.nilable(::String)).returns(T::Boolean) }
|
2073
|
+
def ignored_class_name?(name); end
|
2074
|
+
|
2075
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#307
|
2076
|
+
sig { params(name: ::String).returns(T::Boolean) }
|
2077
|
+
def ignored_constant_name?(name); end
|
2078
|
+
|
2079
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#312
|
2080
|
+
sig { params(name: ::String).returns(T::Boolean) }
|
2081
|
+
def ignored_method_name?(name); end
|
2082
|
+
|
2083
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#317
|
2084
|
+
sig { params(name: ::String).returns(T::Boolean) }
|
2085
|
+
def ignored_module_name?(name); end
|
2086
|
+
|
2087
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#322
|
2088
|
+
sig { params(name: ::String, names_variable: ::Symbol, patterns_variable: ::Symbol).returns(T::Boolean) }
|
2089
|
+
def ignored_name?(name, names_variable, patterns_variable); end
|
2090
|
+
|
2091
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#300
|
2092
|
+
sig { params(superclass_name: T.nilable(::String)).returns(T::Boolean) }
|
2093
|
+
def ignored_subclass?(superclass_name); end
|
2094
|
+
|
2095
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#327
|
2096
|
+
sig { params(const: ::Symbol).returns(T::Set[::String]) }
|
2097
|
+
def names(const); end
|
2098
|
+
|
2099
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#332
|
2100
|
+
sig { params(const: ::Symbol).returns(T::Array[::Regexp]) }
|
2101
|
+
def patterns(const); end
|
2102
|
+
|
2103
|
+
class << self
|
2104
|
+
# Mark classes directly subclassing a class matching `names` as ignored.
|
2105
|
+
#
|
2106
|
+
# Names can be either strings or regexps:
|
2107
|
+
#
|
2108
|
+
# ~~~rb
|
2109
|
+
# class MyPlugin < Spoom::Deadcode::Plugins::Base
|
2110
|
+
# ignore_classes_inheriting_from(
|
2111
|
+
# "Foo",
|
2112
|
+
# "Bar",
|
2113
|
+
# /Baz.*/,
|
2114
|
+
# )
|
2115
|
+
# end
|
2116
|
+
# ~~~
|
2117
|
+
#
|
2118
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#52
|
2119
|
+
sig { params(names: T.any(::Regexp, ::String)).void }
|
2120
|
+
def ignore_classes_inheriting_from(*names); end
|
2121
|
+
|
2122
|
+
# Mark classes matching `names` as ignored.
|
2123
|
+
#
|
2124
|
+
# Names can be either strings or regexps:
|
2125
|
+
#
|
2126
|
+
# ~~~rb
|
2127
|
+
# class MyPlugin < Spoom::Deadcode::Plugins::Base
|
2128
|
+
# ignore_class_names(
|
2129
|
+
# "Foo",
|
2130
|
+
# "Bar",
|
2131
|
+
# /Baz.*/,
|
2132
|
+
# )
|
2133
|
+
# end
|
2134
|
+
# ~~~
|
2135
|
+
#
|
2136
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#34
|
2137
|
+
sig { params(names: T.any(::Regexp, ::String)).void }
|
2138
|
+
def ignore_classes_named(*names); end
|
2139
|
+
|
2140
|
+
# Mark constants matching `names` as ignored.
|
2141
|
+
#
|
2142
|
+
# Names can be either strings or regexps:
|
2143
|
+
#
|
2144
|
+
# ~~~rb
|
2145
|
+
# class MyPlugin < Spoom::Deadcode::Plugins::Base
|
2146
|
+
# ignore_class_names(
|
2147
|
+
# "FOO",
|
2148
|
+
# "BAR",
|
2149
|
+
# /BAZ.*/,
|
2150
|
+
# )
|
2151
|
+
# end
|
2152
|
+
# ~~~
|
2153
|
+
#
|
2154
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#70
|
2155
|
+
sig { params(names: T.any(::Regexp, ::String)).void }
|
2156
|
+
def ignore_constants_named(*names); end
|
2157
|
+
|
2158
|
+
# Mark methods matching `names` as ignored.
|
2159
|
+
#
|
2160
|
+
# Names can be either strings or regexps:
|
2161
|
+
#
|
2162
|
+
# ~~~rb
|
2163
|
+
# class MyPlugin < Spoom::Deadcode::Plugins::Base
|
2164
|
+
# ignore_method_names(
|
2165
|
+
# "foo",
|
2166
|
+
# "bar",
|
2167
|
+
# /baz.*/,
|
2168
|
+
# )
|
2169
|
+
# end
|
2170
|
+
# ~~~
|
2171
|
+
#
|
2172
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#88
|
2173
|
+
sig { params(names: T.any(::Regexp, ::String)).void }
|
2174
|
+
def ignore_methods_named(*names); end
|
2175
|
+
|
2176
|
+
# Mark modules matching `names` as ignored.
|
2177
|
+
#
|
2178
|
+
# Names can be either strings or regexps:
|
2179
|
+
#
|
2180
|
+
# ~~~rb
|
2181
|
+
# class MyPlugin < Spoom::Deadcode::Plugins::Base
|
2182
|
+
# ignore_class_names(
|
2183
|
+
# "Foo",
|
2184
|
+
# "Bar",
|
2185
|
+
# /Baz.*/,
|
2186
|
+
# )
|
2187
|
+
# end
|
2188
|
+
# ~~~
|
2189
|
+
#
|
2190
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#106
|
2191
|
+
sig { params(names: T.any(::Regexp, ::String)).void }
|
2192
|
+
def ignore_modules_named(*names); end
|
2193
|
+
|
2194
|
+
private
|
2195
|
+
|
2196
|
+
# source://spoom//lib/spoom/deadcode/plugins/base.rb#113
|
2197
|
+
sig do
|
2198
|
+
params(
|
2199
|
+
names: T::Array[T.any(::Regexp, ::String)],
|
2200
|
+
names_variable: ::Symbol,
|
2201
|
+
patterns_variable: ::Symbol
|
2202
|
+
).void
|
2203
|
+
end
|
2204
|
+
def save_names_and_patterns(names, names_variable, patterns_variable); end
|
2205
|
+
end
|
2206
|
+
end
|
2207
|
+
|
2208
|
+
# source://spoom//lib/spoom/deadcode/plugins/graphql.rb#7
|
2209
|
+
class Spoom::Deadcode::Plugins::GraphQL < ::Spoom::Deadcode::Plugins::Base
|
2210
|
+
# source://spoom//lib/spoom/deadcode/plugins/graphql.rb#28
|
2211
|
+
sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void }
|
2212
|
+
def on_send(indexer, send); end
|
2213
|
+
end
|
2214
|
+
|
2215
|
+
# source://spoom//lib/spoom/deadcode/plugins/minitest.rb#7
|
2216
|
+
class Spoom::Deadcode::Plugins::Minitest < ::Spoom::Deadcode::Plugins::Base
|
2217
|
+
# source://spoom//lib/spoom/deadcode/plugins/minitest.rb#22
|
2218
|
+
sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
|
2219
|
+
def on_define_method(indexer, definition); end
|
2220
|
+
end
|
2221
|
+
|
2222
|
+
# source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#7
|
2223
|
+
class Spoom::Deadcode::Plugins::Namespaces < ::Spoom::Deadcode::Plugins::Base
|
2224
|
+
# source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#11
|
2225
|
+
sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
|
2226
|
+
def on_define_class(indexer, definition); end
|
2227
|
+
|
2228
|
+
# source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#16
|
2229
|
+
sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
|
2230
|
+
def on_define_module(indexer, definition); end
|
2231
|
+
|
2232
|
+
private
|
2233
|
+
|
2234
|
+
# source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#23
|
2235
|
+
sig { params(indexer: ::Spoom::Deadcode::Indexer).returns(T::Boolean) }
|
2236
|
+
def used_as_namespace?(indexer); end
|
2237
|
+
end
|
2238
|
+
|
2239
|
+
# source://spoom//lib/spoom/deadcode/plugins/rspec.rb#7
|
2240
|
+
class Spoom::Deadcode::Plugins::RSpec < ::Spoom::Deadcode::Plugins::Base; end
|
2241
|
+
|
2242
|
+
# source://spoom//lib/spoom/deadcode/plugins/rails.rb#7
|
2243
|
+
class Spoom::Deadcode::Plugins::Rails < ::Spoom::Deadcode::Plugins::Base
|
2244
|
+
# source://spoom//lib/spoom/deadcode/plugins/rails.rb#13
|
2245
|
+
sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
|
2246
|
+
def on_define_class(indexer, definition); end
|
2247
|
+
|
2248
|
+
# source://spoom//lib/spoom/deadcode/plugins/rails.rb#18
|
2249
|
+
sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
|
2250
|
+
def on_define_module(indexer, definition); end
|
2251
|
+
|
2252
|
+
private
|
2253
|
+
|
2254
|
+
# source://spoom//lib/spoom/deadcode/plugins/rails.rb#25
|
2255
|
+
sig { params(indexer: ::Spoom::Deadcode::Indexer).returns(T::Boolean) }
|
2256
|
+
def file_is_helper?(indexer); end
|
2257
|
+
end
|
2258
|
+
|
2259
|
+
# source://spoom//lib/spoom/deadcode/plugins/rake.rb#7
|
2260
|
+
class Spoom::Deadcode::Plugins::Rake < ::Spoom::Deadcode::Plugins::Base; end
|
2261
|
+
|
2262
|
+
# source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#7
|
2263
|
+
class Spoom::Deadcode::Plugins::Rubocop < ::Spoom::Deadcode::Plugins::Base
|
2264
|
+
# source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#18
|
2265
|
+
sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
|
2266
|
+
def on_define_constant(indexer, definition); end
|
2267
|
+
|
2268
|
+
# source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#23
|
2269
|
+
sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
|
2270
|
+
def on_define_method(indexer, definition); end
|
2271
|
+
|
2272
|
+
private
|
2273
|
+
|
2274
|
+
# source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#30
|
2275
|
+
sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) }
|
2276
|
+
def rubocop_constant?(indexer, definition); end
|
2277
|
+
|
2278
|
+
# source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#35
|
2279
|
+
sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) }
|
2280
|
+
def rubocop_method?(indexer, definition); end
|
2281
|
+
end
|
2282
|
+
|
2283
|
+
# source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#10
|
2284
|
+
Spoom::Deadcode::Plugins::Rubocop::RUBOCOP_CONSTANTS = T.let(T.unsafe(nil), Set)
|
2285
|
+
|
2286
|
+
# source://spoom//lib/spoom/deadcode/plugins/ruby.rb#7
|
2287
|
+
class Spoom::Deadcode::Plugins::Ruby < ::Spoom::Deadcode::Plugins::Base
|
2288
|
+
# source://spoom//lib/spoom/deadcode/plugins/ruby.rb#24
|
2289
|
+
sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void }
|
2290
|
+
def on_send(indexer, send); end
|
2291
|
+
|
2292
|
+
private
|
2293
|
+
|
2294
|
+
# source://spoom//lib/spoom/deadcode/plugins/ruby.rb#50
|
2295
|
+
sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send, node: ::SyntaxTree::Node).void }
|
2296
|
+
def reference_symbol_as_constant(indexer, send, node); end
|
2297
|
+
end
|
2298
|
+
|
2299
|
+
# source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#7
|
2300
|
+
class Spoom::Deadcode::Plugins::Sorbet < ::Spoom::Deadcode::Plugins::Base
|
2301
|
+
# source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#11
|
2302
|
+
sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
|
2303
|
+
def on_define_constant(indexer, definition); end
|
2304
|
+
|
2305
|
+
# source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#16
|
2306
|
+
sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
|
2307
|
+
def on_define_method(indexer, definition); end
|
2308
|
+
|
2309
|
+
private
|
2310
|
+
|
2311
|
+
# source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#40
|
2312
|
+
sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) }
|
2313
|
+
def sorbet_enum_constant?(indexer, definition); end
|
2314
|
+
|
2315
|
+
# source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#23
|
2316
|
+
sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) }
|
2317
|
+
def sorbet_type_member?(indexer, definition); end
|
2318
|
+
end
|
2319
|
+
|
2320
|
+
# source://spoom//lib/spoom/deadcode/plugins/thor.rb#7
|
2321
|
+
class Spoom::Deadcode::Plugins::Thor < ::Spoom::Deadcode::Plugins::Base
|
2322
|
+
# source://spoom//lib/spoom/deadcode/plugins/thor.rb#13
|
2323
|
+
sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void }
|
2324
|
+
def on_define_method(indexer, definition); end
|
2325
|
+
end
|
2326
|
+
|
2327
|
+
# A reference is a call to a method or a constant
|
2328
|
+
#
|
2329
|
+
# source://spoom//lib/spoom/deadcode/reference.rb#7
|
2330
|
+
class Spoom::Deadcode::Reference < ::T::Struct
|
2331
|
+
const :kind, ::Spoom::Deadcode::Reference::Kind
|
2332
|
+
const :name, ::String
|
2333
|
+
const :location, ::Spoom::Deadcode::Location
|
2334
|
+
|
2335
|
+
# Kind
|
2336
|
+
#
|
2337
|
+
# source://spoom//lib/spoom/deadcode/reference.rb#24
|
2338
|
+
sig { returns(T::Boolean) }
|
2339
|
+
def constant?; end
|
2340
|
+
|
2341
|
+
# source://spoom//lib/spoom/deadcode/reference.rb#29
|
2342
|
+
sig { returns(T::Boolean) }
|
2343
|
+
def method?; end
|
2344
|
+
|
2345
|
+
class << self
|
2346
|
+
# source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13
|
2347
|
+
def inherited(s); end
|
2348
|
+
end
|
2349
|
+
end
|
2350
|
+
|
2351
|
+
# source://spoom//lib/spoom/deadcode/reference.rb#10
|
2352
|
+
class Spoom::Deadcode::Reference::Kind < ::T::Enum
|
2353
|
+
enums do
|
2354
|
+
Constant = new
|
2355
|
+
Method = new
|
2356
|
+
end
|
2357
|
+
end
|
2358
|
+
|
2359
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#6
|
2360
|
+
class Spoom::Deadcode::Remover
|
2361
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#12
|
2362
|
+
sig { params(context: ::Spoom::Context).void }
|
2363
|
+
def initialize(context); end
|
2364
|
+
|
2365
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#17
|
2366
|
+
sig { params(kind: ::Spoom::Deadcode::Definition::Kind, location: ::Spoom::Deadcode::Location).void }
|
2367
|
+
def remove_location(kind, location); end
|
2368
|
+
end
|
2369
|
+
|
2370
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#9
|
2371
|
+
class Spoom::Deadcode::Remover::Error < ::Spoom::Error; end
|
2372
|
+
|
2373
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#348
|
2374
|
+
class Spoom::Deadcode::Remover::NodeContext
|
2375
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#358
|
2376
|
+
sig { params(source: ::String, node: ::SyntaxTree::Node, nesting: T::Array[::SyntaxTree::Node]).void }
|
2377
|
+
def initialize(source, node, nesting); end
|
2378
|
+
|
2379
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#467
|
2380
|
+
sig { returns(T::Array[::SyntaxTree::Node]) }
|
2381
|
+
def attached_comments_and_sigs; end
|
2382
|
+
|
2383
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#480
|
2384
|
+
sig { returns(T.nilable(::SyntaxTree::MethodAddBlock)) }
|
2385
|
+
def attached_sig; end
|
2386
|
+
|
2387
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#460
|
2388
|
+
sig { params(comment: ::SyntaxTree::Node, node: ::SyntaxTree::Node).returns(T::Boolean) }
|
2389
|
+
def comment_for_node?(comment, node); end
|
2390
|
+
|
2391
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#355
|
2392
|
+
sig { returns(T::Array[::SyntaxTree::Node]) }
|
2393
|
+
def nesting; end
|
2394
|
+
|
2395
|
+
# @return [Array<SyntaxTree::Node>]
|
2396
|
+
#
|
2397
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#355
|
2398
|
+
def nesting=(_arg0); end
|
2399
|
+
|
2400
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#407
|
2401
|
+
sig { returns(T.nilable(::SyntaxTree::Node)) }
|
2402
|
+
def next_node; end
|
2403
|
+
|
2404
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#397
|
2405
|
+
sig { returns(T::Array[::SyntaxTree::Node]) }
|
2406
|
+
def next_nodes; end
|
2407
|
+
|
2408
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#352
|
2409
|
+
sig { returns(::SyntaxTree::Node) }
|
2410
|
+
def node; end
|
2411
|
+
|
2412
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#495
|
2413
|
+
sig { params(node: T.any(::Symbol, ::SyntaxTree::Node)).returns(::String) }
|
2414
|
+
def node_string(node); end
|
2415
|
+
|
2416
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#373
|
2417
|
+
sig { returns(::Spoom::Deadcode::Remover::NodeContext) }
|
2418
|
+
def parent_context; end
|
2419
|
+
|
2420
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#365
|
2421
|
+
sig { returns(::SyntaxTree::Node) }
|
2422
|
+
def parent_node; end
|
2423
|
+
|
2424
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#392
|
2425
|
+
sig { returns(T.nilable(::SyntaxTree::Node)) }
|
2426
|
+
def previous_node; end
|
2427
|
+
|
2428
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#382
|
2429
|
+
sig { returns(T::Array[::SyntaxTree::Node]) }
|
2430
|
+
def previous_nodes; end
|
2431
|
+
|
2432
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#412
|
2433
|
+
sig { returns(T.nilable(::Spoom::Deadcode::Remover::NodeContext)) }
|
2434
|
+
def sclass_context; end
|
2435
|
+
|
2436
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#451
|
2437
|
+
sig { params(node: T.nilable(::SyntaxTree::Node)).returns(T::Boolean) }
|
2438
|
+
def sorbet_extend_sig?(node); end
|
2439
|
+
|
2440
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#438
|
2441
|
+
sig { params(node: T.nilable(::SyntaxTree::Node)).returns(T::Boolean) }
|
2442
|
+
def sorbet_signature?(node); end
|
2443
|
+
end
|
2444
|
+
|
2445
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#505
|
2446
|
+
class Spoom::Deadcode::Remover::NodeFinder < ::SyntaxTree::Visitor
|
2447
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#554
|
2448
|
+
sig { params(location: ::Spoom::Deadcode::Location).void }
|
2449
|
+
def initialize(location); end
|
2450
|
+
|
2451
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#548
|
2452
|
+
sig { returns(T.nilable(::SyntaxTree::Node)) }
|
2453
|
+
def node; end
|
2454
|
+
|
2455
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#551
|
2456
|
+
sig { returns(T::Array[::SyntaxTree::Node]) }
|
2457
|
+
def nodes_nesting; end
|
2458
|
+
|
2459
|
+
# @return [Array<SyntaxTree::Node>]
|
2460
|
+
#
|
2461
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#551
|
2462
|
+
def nodes_nesting=(_arg0); end
|
2463
|
+
|
2464
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#562
|
2465
|
+
sig { override.params(node: T.nilable(::SyntaxTree::Node)).void }
|
2466
|
+
def visit(node); end
|
2467
|
+
|
2468
|
+
private
|
2469
|
+
|
2470
|
+
# TODO: remove once SyntaxTree location are fixed
|
2471
|
+
#
|
2472
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#601
|
2473
|
+
sig { params(node: ::SyntaxTree::Node, nodes: T::Array[::SyntaxTree::Node]).returns(::Spoom::Deadcode::Location) }
|
2474
|
+
def location_from_children(node, nodes); end
|
2475
|
+
|
2476
|
+
# TODO: remove once SyntaxTree location are fixed
|
2477
|
+
#
|
2478
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#586
|
2479
|
+
sig { params(node: ::SyntaxTree::Node).returns(::Spoom::Deadcode::Location) }
|
2480
|
+
def location_from_node(node); end
|
2481
|
+
|
2482
|
+
class << self
|
2483
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#512
|
2484
|
+
sig do
|
2485
|
+
params(
|
2486
|
+
source: ::String,
|
2487
|
+
location: ::Spoom::Deadcode::Location,
|
2488
|
+
kind: ::Spoom::Deadcode::Definition::Kind
|
2489
|
+
).returns(::Spoom::Deadcode::Remover::NodeContext)
|
2490
|
+
end
|
2491
|
+
def find(source, location, kind); end
|
2492
|
+
|
2493
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#531
|
2494
|
+
sig { params(node: ::SyntaxTree::Node, kind: ::Spoom::Deadcode::Definition::Kind).returns(T::Boolean) }
|
2495
|
+
def node_match_kind?(node, kind); end
|
2496
|
+
end
|
2497
|
+
end
|
2498
|
+
|
2499
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#29
|
2500
|
+
class Spoom::Deadcode::Remover::NodeRemover
|
2501
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#36
|
2502
|
+
sig do
|
2503
|
+
params(
|
2504
|
+
source: ::String,
|
2505
|
+
kind: ::Spoom::Deadcode::Definition::Kind,
|
2506
|
+
location: ::Spoom::Deadcode::Location
|
2507
|
+
).void
|
2508
|
+
end
|
2509
|
+
def initialize(source, kind, location); end
|
2510
|
+
|
2511
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#46
|
2512
|
+
sig { void }
|
2513
|
+
def apply_edit; end
|
2514
|
+
|
2515
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#33
|
2516
|
+
sig { returns(::String) }
|
2517
|
+
def new_source; end
|
2518
|
+
|
2519
|
+
private
|
2520
|
+
|
2521
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#142
|
2522
|
+
sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void }
|
2523
|
+
def delete_attr_accessor(context); end
|
2524
|
+
|
2525
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#290
|
2526
|
+
sig { params(start_char: ::Integer, end_char: ::Integer).void }
|
2527
|
+
def delete_chars(start_char, end_char); end
|
2528
|
+
|
2529
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#69
|
2530
|
+
sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void }
|
2531
|
+
def delete_constant_assignment(context); end
|
2532
|
+
|
2533
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#300
|
2534
|
+
sig { params(line_number: ::Integer, start_column: ::Integer, end_column: ::Integer).void }
|
2535
|
+
def delete_line_part(line_number, start_column, end_column); end
|
2536
|
+
|
2537
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#283
|
2538
|
+
sig { params(start_line: ::Integer, end_line: ::Integer).void }
|
2539
|
+
def delete_lines(start_line, end_line); end
|
2540
|
+
|
2541
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#250
|
2542
|
+
sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void }
|
2543
|
+
def delete_node_and_comments_and_sigs(context); end
|
2544
|
+
|
2545
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#207
|
2546
|
+
sig do
|
2547
|
+
params(
|
2548
|
+
node: ::SyntaxTree::Node,
|
2549
|
+
send_context: ::Spoom::Deadcode::Remover::NodeContext,
|
2550
|
+
was_removed: T::Boolean
|
2551
|
+
).void
|
2552
|
+
end
|
2553
|
+
def insert_accessor(node, send_context, was_removed:); end
|
2554
|
+
|
2555
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#295
|
2556
|
+
sig { params(start_char: ::Integer, end_char: ::Integer, replacement: ::String).void }
|
2557
|
+
def replace_chars(start_char, end_char, replacement); end
|
2558
|
+
|
2559
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#315
|
2560
|
+
sig do
|
2561
|
+
params(
|
2562
|
+
node: ::SyntaxTree::MethodAddBlock,
|
2563
|
+
name: ::String,
|
2564
|
+
kind: ::Spoom::Deadcode::Definition::Kind
|
2565
|
+
).returns(::String)
|
2566
|
+
end
|
2567
|
+
def transform_sig(node, name:, kind:); end
|
2568
|
+
end
|
2569
|
+
|
2570
|
+
# An abstraction to simplify handling of SyntaxTree::CallNode, SyntaxTree::Command, SyntaxTree::CommandCall and
|
2571
|
+
# SyntaxTree::VCall nodes.
|
2572
|
+
#
|
2573
|
+
# source://spoom//lib/spoom/deadcode/send.rb#8
|
2574
|
+
class Spoom::Deadcode::Send < ::T::Struct
|
2575
|
+
const :node, ::SyntaxTree::Node
|
2576
|
+
const :name, ::String
|
2577
|
+
const :recv, T.nilable(::SyntaxTree::Node), default: T.unsafe(nil)
|
2578
|
+
const :args, T::Array[::SyntaxTree::Node], default: T.unsafe(nil)
|
2579
|
+
const :block, T.nilable(::SyntaxTree::Node), default: T.unsafe(nil)
|
2580
|
+
|
2581
|
+
# source://spoom//lib/spoom/deadcode/send.rb#22
|
2582
|
+
sig do
|
2583
|
+
type_parameters(:T)
|
2584
|
+
.params(
|
2585
|
+
arg_type: T::Class[T.type_parameter(:T)],
|
2586
|
+
block: T.proc.params(arg: T.type_parameter(:T)).void
|
2587
|
+
).void
|
2588
|
+
end
|
2589
|
+
def each_arg(arg_type, &block); end
|
2590
|
+
|
2591
|
+
# source://spoom//lib/spoom/deadcode/send.rb#29
|
2592
|
+
sig { params(block: T.proc.params(key: ::SyntaxTree::Node, value: T.nilable(::SyntaxTree::Node)).void).void }
|
2593
|
+
def each_arg_assoc(&block); end
|
2594
|
+
|
2595
|
+
class << self
|
2596
|
+
# source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13
|
2597
|
+
def inherited(s); end
|
2598
|
+
end
|
2599
|
+
end
|
2600
|
+
|
2601
|
+
# source://spoom//lib/spoom.rb#12
|
2602
|
+
class Spoom::Error < ::StandardError; end
|
2603
|
+
|
2604
|
+
# source://spoom//lib/spoom/context/exec.rb#5
|
2605
|
+
class Spoom::ExecResult < ::T::Struct
|
2606
|
+
const :out, ::String
|
2607
|
+
const :err, T.nilable(::String)
|
2608
|
+
const :status, T::Boolean
|
2609
|
+
const :exit_code, ::Integer
|
2610
|
+
|
2611
|
+
# source://spoom//lib/spoom/context/exec.rb#14
|
2612
|
+
sig { returns(::String) }
|
2613
|
+
def to_s; end
|
2614
|
+
|
2615
|
+
class << self
|
2616
|
+
# source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13
|
2617
|
+
def inherited(s); end
|
2618
|
+
end
|
2619
|
+
end
|
2620
|
+
|
2621
|
+
# source://spoom//lib/spoom/file_collector.rb#5
|
2622
|
+
class Spoom::FileCollector
|
2623
|
+
# Initialize a new file collector
|
2624
|
+
#
|
2625
|
+
# If `allow_extensions` is empty, all files are collected.
|
2626
|
+
# If `allow_extensions` is an array of extensions, only files with one of these extensions are collected.
|
2627
|
+
#
|
2628
|
+
# If `allow_mime_types` is empty, all files are collected.
|
2629
|
+
# If `allow_mime_types` is an array of mimetypes, files without an extension are collected if their mimetype is in
|
2630
|
+
# the list.
|
2631
|
+
#
|
2632
|
+
# source://spoom//lib/spoom/file_collector.rb#26
|
2633
|
+
sig do
|
2634
|
+
params(
|
2635
|
+
allow_extensions: T::Array[::String],
|
2636
|
+
allow_mime_types: T::Array[::String],
|
2637
|
+
exclude_patterns: T::Array[::String]
|
2638
|
+
).void
|
2639
|
+
end
|
2640
|
+
def initialize(allow_extensions: T.unsafe(nil), allow_mime_types: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end
|
2641
|
+
|
2642
|
+
# source://spoom//lib/spoom/file_collector.rb#9
|
2643
|
+
sig { returns(T::Array[::String]) }
|
2644
|
+
def files; end
|
2645
|
+
|
2646
|
+
# source://spoom//lib/spoom/file_collector.rb#39
|
2647
|
+
sig { params(path: ::String).void }
|
2648
|
+
def visit_path(path); end
|
2649
|
+
|
2650
|
+
# source://spoom//lib/spoom/file_collector.rb#34
|
2651
|
+
sig { params(paths: T::Array[::String]).void }
|
2652
|
+
def visit_paths(paths); end
|
2653
|
+
|
2654
|
+
private
|
2655
|
+
|
2656
|
+
# source://spoom//lib/spoom/file_collector.rb#56
|
2657
|
+
sig { params(path: ::String).returns(::String) }
|
2658
|
+
def clean_path(path); end
|
2659
|
+
|
2660
|
+
# source://spoom//lib/spoom/file_collector.rb#73
|
2661
|
+
sig { params(path: ::String).returns(T::Boolean) }
|
2662
|
+
def excluded_file?(path); end
|
2663
|
+
|
2664
|
+
# source://spoom//lib/spoom/file_collector.rb#88
|
2665
|
+
sig { params(path: ::String).returns(T::Boolean) }
|
2666
|
+
def excluded_path?(path); end
|
2667
|
+
|
2668
|
+
# source://spoom//lib/spoom/file_collector.rb#97
|
2669
|
+
sig { params(path: ::String).returns(T.nilable(::String)) }
|
2670
|
+
def mime_type_for(path); end
|
2671
|
+
|
2672
|
+
# source://spoom//lib/spoom/file_collector.rb#68
|
2673
|
+
sig { params(path: ::String).void }
|
2674
|
+
def visit_directory(path); end
|
2675
|
+
|
2676
|
+
# source://spoom//lib/spoom/file_collector.rb#61
|
2677
|
+
sig { params(path: ::String).void }
|
2678
|
+
def visit_file(path); end
|
2679
|
+
end
|
2680
|
+
|
2681
|
+
# Build a file hierarchy from a set of file paths.
|
2682
|
+
#
|
2683
|
+
# source://spoom//lib/spoom/file_tree.rb#6
|
2684
|
+
class Spoom::FileTree
|
2685
|
+
# source://spoom//lib/spoom/file_tree.rb#10
|
2686
|
+
sig { params(paths: T::Enumerable[::String]).void }
|
2687
|
+
def initialize(paths = T.unsafe(nil)); end
|
2688
|
+
|
2689
|
+
# Add a `path` to the tree
|
2690
|
+
#
|
2691
|
+
# This will create all nodes until the root of `path`.
|
2692
|
+
#
|
2693
|
+
# source://spoom//lib/spoom/file_tree.rb#25
|
2694
|
+
sig { params(path: ::String).returns(::Spoom::FileTree::Node) }
|
2695
|
+
def add_path(path); end
|
2696
|
+
|
2697
|
+
# Add all `paths` to the tree
|
2698
|
+
#
|
2699
|
+
# source://spoom//lib/spoom/file_tree.rb#17
|
2700
|
+
sig { params(paths: T::Enumerable[::String]).void }
|
2701
|
+
def add_paths(paths); end
|
2702
|
+
|
2703
|
+
# All the nodes in this tree
|
2704
|
+
#
|
2705
|
+
# source://spoom//lib/spoom/file_tree.rb#45
|
2706
|
+
sig { returns(T::Array[::Spoom::FileTree::Node]) }
|
2707
|
+
def nodes; end
|
2708
|
+
|
2709
|
+
# Return a map of typing scores for each node in the tree
|
2710
|
+
#
|
2711
|
+
# source://spoom//lib/spoom/file_tree.rb#67
|
2712
|
+
sig { params(context: ::Spoom::Context).returns(T::Hash[::Spoom::FileTree::Node, ::Float]) }
|
2713
|
+
def nodes_strictness_scores(context); end
|
2714
|
+
|
2715
|
+
# Return a map of strictnesses for each node in the tree
|
2716
|
+
#
|
2717
|
+
# source://spoom//lib/spoom/file_tree.rb#59
|
2718
|
+
sig { params(context: ::Spoom::Context).returns(T::Hash[::Spoom::FileTree::Node, T.nilable(::String)]) }
|
2719
|
+
def nodes_strictnesses(context); end
|
2720
|
+
|
2721
|
+
# All the paths in this tree
|
2722
|
+
#
|
2723
|
+
# source://spoom//lib/spoom/file_tree.rb#53
|
2724
|
+
sig { returns(T::Array[::String]) }
|
2725
|
+
def paths; end
|
2726
|
+
|
2727
|
+
# Return a map of typing scores for each path in the tree
|
2728
|
+
#
|
2729
|
+
# source://spoom//lib/spoom/file_tree.rb#75
|
2730
|
+
sig { params(context: ::Spoom::Context).returns(T::Hash[::String, ::Float]) }
|
2731
|
+
def paths_strictness_scores(context); end
|
2732
|
+
|
2733
|
+
# source://spoom//lib/spoom/file_tree.rb#80
|
2734
|
+
sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean).void }
|
2735
|
+
def print(out: T.unsafe(nil), colors: T.unsafe(nil)); end
|
2736
|
+
|
2737
|
+
# source://spoom//lib/spoom/file_tree.rb#86
|
2738
|
+
sig { params(context: ::Spoom::Context, out: T.any(::IO, ::StringIO), colors: T::Boolean).void }
|
2739
|
+
def print_with_strictnesses(context, out: T.unsafe(nil), colors: T.unsafe(nil)); end
|
2740
|
+
|
2741
|
+
# All root nodes
|
2742
|
+
#
|
2743
|
+
# source://spoom//lib/spoom/file_tree.rb#39
|
2744
|
+
sig { returns(T::Array[::Spoom::FileTree::Node]) }
|
2745
|
+
def roots; end
|
2746
|
+
end
|
2747
|
+
|
2748
|
+
# A visitor that collects all the nodes in a tree
|
2749
|
+
#
|
2750
|
+
# source://spoom//lib/spoom/file_tree.rb#140
|
2751
|
+
class Spoom::FileTree::CollectNodes < ::Spoom::FileTree::Visitor
|
2752
|
+
# source://spoom//lib/spoom/file_tree.rb#147
|
2753
|
+
sig { void }
|
2754
|
+
def initialize; end
|
2755
|
+
|
2756
|
+
# source://spoom//lib/spoom/file_tree.rb#144
|
2757
|
+
sig { returns(T::Array[::Spoom::FileTree::Node]) }
|
2758
|
+
def nodes; end
|
2759
|
+
|
2760
|
+
# source://spoom//lib/spoom/file_tree.rb#153
|
2761
|
+
sig { override.params(node: ::Spoom::FileTree::Node).void }
|
2762
|
+
def visit_node(node); end
|
2763
|
+
end
|
2764
|
+
|
2765
|
+
# A visitor that collects the typing score of each node in a tree
|
2766
|
+
#
|
2767
|
+
# source://spoom//lib/spoom/file_tree.rb#183
|
2768
|
+
class Spoom::FileTree::CollectScores < ::Spoom::FileTree::CollectStrictnesses
|
2769
|
+
# source://spoom//lib/spoom/file_tree.rb#190
|
2770
|
+
sig { params(context: ::Spoom::Context).void }
|
2771
|
+
def initialize(context); end
|
2772
|
+
|
2773
|
+
# source://spoom//lib/spoom/file_tree.rb#187
|
2774
|
+
sig { returns(T::Hash[::Spoom::FileTree::Node, ::Float]) }
|
2775
|
+
def scores; end
|
2776
|
+
|
2777
|
+
# source://spoom//lib/spoom/file_tree.rb#197
|
2778
|
+
sig { override.params(node: ::Spoom::FileTree::Node).void }
|
2779
|
+
def visit_node(node); end
|
2780
|
+
|
2781
|
+
private
|
2782
|
+
|
2783
|
+
# source://spoom//lib/spoom/file_tree.rb#206
|
2784
|
+
sig { params(node: ::Spoom::FileTree::Node).returns(::Float) }
|
2785
|
+
def node_score(node); end
|
2786
|
+
|
2787
|
+
# source://spoom//lib/spoom/file_tree.rb#215
|
2788
|
+
sig { params(strictness: T.nilable(::String)).returns(::Float) }
|
2789
|
+
def strictness_score(strictness); end
|
2790
|
+
end
|
2791
|
+
|
2792
|
+
# A visitor that collects the strictness of each node in a tree
|
2793
|
+
#
|
2794
|
+
# source://spoom//lib/spoom/file_tree.rb#160
|
2795
|
+
class Spoom::FileTree::CollectStrictnesses < ::Spoom::FileTree::Visitor
|
2796
|
+
# source://spoom//lib/spoom/file_tree.rb#167
|
2797
|
+
sig { params(context: ::Spoom::Context).void }
|
2798
|
+
def initialize(context); end
|
2799
|
+
|
2800
|
+
# source://spoom//lib/spoom/file_tree.rb#164
|
2801
|
+
sig { returns(T::Hash[::Spoom::FileTree::Node, T.nilable(::String)]) }
|
2802
|
+
def strictnesses; end
|
2803
|
+
|
2804
|
+
# source://spoom//lib/spoom/file_tree.rb#174
|
2805
|
+
sig { override.params(node: ::Spoom::FileTree::Node).void }
|
2806
|
+
def visit_node(node); end
|
2807
|
+
end
|
2808
|
+
|
2809
|
+
# A node representing either a file or a directory inside a FileTree
|
2810
|
+
#
|
2811
|
+
# source://spoom//lib/spoom/file_tree.rb#94
|
2812
|
+
class Spoom::FileTree::Node < ::T::Struct
|
2813
|
+
const :parent, T.nilable(::Spoom::FileTree::Node)
|
2814
|
+
const :name, ::String
|
2815
|
+
const :children, T::Hash[::String, ::Spoom::FileTree::Node], default: T.unsafe(nil)
|
2816
|
+
|
2817
|
+
# Full path to this node from root
|
2818
|
+
#
|
2819
|
+
# source://spoom//lib/spoom/file_tree.rb#108
|
2820
|
+
sig { returns(::String) }
|
2821
|
+
def path; end
|
2822
|
+
|
2823
|
+
class << self
|
2824
|
+
# source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13
|
2825
|
+
def inherited(s); end
|
2826
|
+
end
|
2827
|
+
end
|
2828
|
+
|
2829
|
+
# An internal class used to print a FileTree
|
2830
|
+
#
|
2831
|
+
# See `FileTree#print`
|
2832
|
+
#
|
2833
|
+
# source://spoom//lib/spoom/file_tree.rb#228
|
2834
|
+
class Spoom::FileTree::Printer < ::Spoom::FileTree::Visitor
|
2835
|
+
# source://spoom//lib/spoom/file_tree.rb#238
|
2836
|
+
sig do
|
2837
|
+
params(
|
2838
|
+
strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)],
|
2839
|
+
out: T.any(::IO, ::StringIO),
|
2840
|
+
colors: T::Boolean
|
2841
|
+
).void
|
2842
|
+
end
|
2843
|
+
def initialize(strictnesses, out: T.unsafe(nil), colors: T.unsafe(nil)); end
|
2844
|
+
|
2845
|
+
# source://spoom//lib/spoom/file_tree.rb#246
|
2846
|
+
sig { override.params(node: ::Spoom::FileTree::Node).void }
|
2847
|
+
def visit_node(node); end
|
2848
|
+
|
2849
|
+
private
|
2850
|
+
|
2851
|
+
# source://spoom//lib/spoom/file_tree.rb#271
|
2852
|
+
sig { params(strictness: T.nilable(::String)).returns(::Spoom::Color) }
|
2853
|
+
def strictness_color(strictness); end
|
2854
|
+
end
|
2855
|
+
|
2856
|
+
# An abstract visitor for FileTree
|
2857
|
+
#
|
2858
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
2859
|
+
#
|
2860
|
+
# source://spoom//lib/spoom/file_tree.rb#117
|
2861
|
+
class Spoom::FileTree::Visitor
|
2862
|
+
abstract!
|
2863
|
+
|
2864
|
+
# source://spoom//lib/spoom/file_tree.rb#129
|
2865
|
+
sig { params(node: ::Spoom::FileTree::Node).void }
|
2866
|
+
def visit_node(node); end
|
2867
|
+
|
2868
|
+
# source://spoom//lib/spoom/file_tree.rb#134
|
2869
|
+
sig { params(nodes: T::Array[::Spoom::FileTree::Node]).void }
|
2870
|
+
def visit_nodes(nodes); end
|
2871
|
+
|
2872
|
+
# source://spoom//lib/spoom/file_tree.rb#124
|
2873
|
+
sig { params(tree: ::Spoom::FileTree).void }
|
2874
|
+
def visit_tree(tree); end
|
2875
|
+
end
|
2876
|
+
|
2877
|
+
# source://spoom//lib/spoom/context/git.rb#5
|
2878
|
+
module Spoom::Git; end
|
2879
|
+
|
2880
|
+
# source://spoom//lib/spoom/context/git.rb#6
|
2881
|
+
class Spoom::Git::Commit < ::T::Struct
|
2882
|
+
const :sha, ::String
|
2883
|
+
const :time, ::Time
|
2884
|
+
|
2885
|
+
# source://spoom//lib/spoom/context/git.rb#27
|
2886
|
+
sig { returns(::Integer) }
|
2887
|
+
def timestamp; end
|
2888
|
+
|
2889
|
+
class << self
|
2890
|
+
# source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13
|
2891
|
+
def inherited(s); end
|
2892
|
+
|
2893
|
+
# Parse a line formated as `%h %at` into a `Commit`
|
2894
|
+
#
|
2895
|
+
# source://spoom//lib/spoom/context/git.rb#14
|
2896
|
+
sig { params(string: ::String).returns(T.nilable(::Spoom::Git::Commit)) }
|
2897
|
+
def parse_line(string); end
|
2898
|
+
end
|
2899
|
+
end
|
2900
|
+
|
2901
|
+
# source://spoom//lib/spoom/sorbet/lsp/base.rb#5
|
2902
|
+
module Spoom::LSP; end
|
2903
|
+
|
2904
|
+
# source://spoom//lib/spoom/sorbet/lsp.rb#13
|
2905
|
+
class Spoom::LSP::Client
|
2906
|
+
# source://spoom//lib/spoom/sorbet/lsp.rb#17
|
2907
|
+
sig { params(sorbet_bin: ::String, sorbet_args: ::String, path: ::String).void }
|
2908
|
+
def initialize(sorbet_bin, *sorbet_args, path: T.unsafe(nil)); end
|
2909
|
+
|
2910
|
+
# source://spoom//lib/spoom/sorbet/lsp.rb#229
|
2911
|
+
sig { void }
|
2912
|
+
def close; end
|
2913
|
+
|
2914
|
+
# source://spoom//lib/spoom/sorbet/lsp.rb#131
|
2915
|
+
sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::Location]) }
|
2916
|
+
def definitions(uri, line, column); end
|
2917
|
+
|
2918
|
+
# source://spoom//lib/spoom/sorbet/lsp.rb#212
|
2919
|
+
sig { params(uri: ::String).returns(T::Array[::Spoom::LSP::DocumentSymbol]) }
|
2920
|
+
def document_symbols(uri); end
|
2921
|
+
|
2922
|
+
# source://spoom//lib/spoom/sorbet/lsp.rb#89
|
2923
|
+
sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T.nilable(::Spoom::LSP::Hover)) }
|
2924
|
+
def hover(uri, line, column); end
|
2925
|
+
|
2926
|
+
# source://spoom//lib/spoom/sorbet/lsp.rb#27
|
2927
|
+
sig { returns(::Integer) }
|
2928
|
+
def next_id; end
|
2929
|
+
|
2930
|
+
# LSP requests
|
2931
|
+
#
|
2932
|
+
# @raise [Error::AlreadyOpen]
|
2933
|
+
#
|
2934
|
+
# source://spoom//lib/spoom/sorbet/lsp.rb#72
|
2935
|
+
sig { params(workspace_path: ::String).void }
|
2936
|
+
def open(workspace_path); end
|
2937
|
+
|
2938
|
+
# source://spoom//lib/spoom/sorbet/lsp.rb#54
|
2939
|
+
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
|
2940
|
+
def read; end
|
2941
|
+
|
2942
|
+
# @raise [Error::BadHeaders]
|
2943
|
+
#
|
2944
|
+
# source://spoom//lib/spoom/sorbet/lsp.rb#43
|
2945
|
+
sig { returns(T.nilable(::String)) }
|
2946
|
+
def read_raw; end
|
2947
|
+
|
2948
|
+
# source://spoom//lib/spoom/sorbet/lsp.rb#173
|
2949
|
+
sig do
|
2950
|
+
params(
|
2951
|
+
uri: ::String,
|
2952
|
+
line: ::Integer,
|
2953
|
+
column: ::Integer,
|
2954
|
+
include_decl: T::Boolean
|
2955
|
+
).returns(T::Array[::Spoom::LSP::Location])
|
2956
|
+
end
|
2957
|
+
def references(uri, line, column, include_decl = T.unsafe(nil)); end
|
2958
|
+
|
2959
|
+
# source://spoom//lib/spoom/sorbet/lsp.rb#37
|
2960
|
+
sig { params(message: ::Spoom::LSP::Message).returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
|
2961
|
+
def send(message); end
|
2962
|
+
|
2963
|
+
# source://spoom//lib/spoom/sorbet/lsp.rb#32
|
2964
|
+
sig { params(json_string: ::String).void }
|
2965
|
+
def send_raw(json_string); end
|
2966
|
+
|
2967
|
+
# source://spoom//lib/spoom/sorbet/lsp.rb#110
|
2968
|
+
sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::SignatureHelp]) }
|
2969
|
+
def signatures(uri, line, column); end
|
2970
|
+
|
2971
|
+
# source://spoom//lib/spoom/sorbet/lsp.rb#197
|
2972
|
+
sig { params(query: ::String).returns(T::Array[::Spoom::LSP::DocumentSymbol]) }
|
2973
|
+
def symbols(query); end
|
2974
|
+
|
2975
|
+
# source://spoom//lib/spoom/sorbet/lsp.rb#152
|
2976
|
+
sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::Location]) }
|
2977
|
+
def type_definitions(uri, line, column); end
|
2978
|
+
end
|
2979
|
+
|
2980
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#178
|
2981
|
+
class Spoom::LSP::Diagnostic < ::T::Struct
|
2982
|
+
include ::Spoom::LSP::PrintableSymbol
|
2983
|
+
|
2984
|
+
const :range, ::Spoom::LSP::Range
|
2985
|
+
const :code, ::Integer
|
2986
|
+
const :message, ::String
|
2987
|
+
const :informations, ::Object
|
2988
|
+
|
2989
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#202
|
2990
|
+
sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
|
2991
|
+
def accept_printer(printer); end
|
2992
|
+
|
2993
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#207
|
2994
|
+
sig { returns(::String) }
|
2995
|
+
def to_s; end
|
2996
|
+
|
2997
|
+
class << self
|
2998
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#191
|
2999
|
+
sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Diagnostic) }
|
3000
|
+
def from_json(json); end
|
3001
|
+
|
3002
|
+
# source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13
|
3003
|
+
def inherited(s); end
|
3004
|
+
end
|
3005
|
+
end
|
3006
|
+
|
3007
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#212
|
3008
|
+
class Spoom::LSP::DocumentSymbol < ::T::Struct
|
3009
|
+
include ::Spoom::LSP::PrintableSymbol
|
3010
|
+
|
3011
|
+
const :name, ::String
|
3012
|
+
const :detail, T.nilable(::String)
|
3013
|
+
const :kind, ::Integer
|
3014
|
+
const :location, T.nilable(::Spoom::LSP::Location)
|
3015
|
+
const :range, T.nilable(::Spoom::LSP::Range)
|
3016
|
+
const :children, T::Array[::Spoom::LSP::DocumentSymbol]
|
3017
|
+
|
3018
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#240
|
3019
|
+
sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
|
3020
|
+
def accept_printer(printer); end
|
3021
|
+
|
3022
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#272
|
3023
|
+
sig { returns(::String) }
|
3024
|
+
def kind_string; end
|
3025
|
+
|
3026
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#267
|
3027
|
+
sig { returns(::String) }
|
3028
|
+
def to_s; end
|
3029
|
+
|
3030
|
+
class << self
|
3031
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#227
|
3032
|
+
sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::DocumentSymbol) }
|
3033
|
+
def from_json(json); end
|
3034
|
+
|
3035
|
+
# source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13
|
3036
|
+
def inherited(s); end
|
3037
|
+
end
|
3038
|
+
end
|
3039
|
+
|
3040
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#276
|
3041
|
+
Spoom::LSP::DocumentSymbol::SYMBOL_KINDS = T.let(T.unsafe(nil), Hash)
|
3042
|
+
|
3043
|
+
# source://spoom//lib/spoom/sorbet/lsp/errors.rb#6
|
3044
|
+
class Spoom::LSP::Error < ::StandardError; end
|
3045
|
+
|
3046
|
+
# source://spoom//lib/spoom/sorbet/lsp/errors.rb#7
|
3047
|
+
class Spoom::LSP::Error::AlreadyOpen < ::Spoom::LSP::Error; end
|
3048
|
+
|
3049
|
+
# source://spoom//lib/spoom/sorbet/lsp/errors.rb#8
|
3050
|
+
class Spoom::LSP::Error::BadHeaders < ::Spoom::LSP::Error; end
|
3051
|
+
|
3052
|
+
# source://spoom//lib/spoom/sorbet/lsp/errors.rb#10
|
3053
|
+
class Spoom::LSP::Error::Diagnostics < ::Spoom::LSP::Error
|
3054
|
+
# source://spoom//lib/spoom/sorbet/lsp/errors.rb#32
|
3055
|
+
sig { params(uri: ::String, diagnostics: T::Array[::Spoom::LSP::Diagnostic]).void }
|
3056
|
+
def initialize(uri, diagnostics); end
|
3057
|
+
|
3058
|
+
# source://spoom//lib/spoom/sorbet/lsp/errors.rb#17
|
3059
|
+
sig { returns(T::Array[::Spoom::LSP::Diagnostic]) }
|
3060
|
+
def diagnostics; end
|
3061
|
+
|
3062
|
+
# source://spoom//lib/spoom/sorbet/lsp/errors.rb#14
|
3063
|
+
sig { returns(::String) }
|
3064
|
+
def uri; end
|
3065
|
+
|
3066
|
+
class << self
|
3067
|
+
# source://spoom//lib/spoom/sorbet/lsp/errors.rb#23
|
3068
|
+
sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Error::Diagnostics) }
|
3069
|
+
def from_json(json); end
|
3070
|
+
end
|
3071
|
+
end
|
3072
|
+
|
3073
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#19
|
3074
|
+
class Spoom::LSP::Hover < ::T::Struct
|
3075
|
+
include ::Spoom::LSP::PrintableSymbol
|
3076
|
+
|
3077
|
+
const :contents, ::String
|
3078
|
+
const :range, T.nilable(T::Range[T.untyped])
|
3079
|
+
|
3080
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#39
|
3081
|
+
sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
|
3082
|
+
def accept_printer(printer); end
|
3083
|
+
|
3084
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#45
|
3085
|
+
sig { returns(::String) }
|
3086
|
+
def to_s; end
|
3087
|
+
|
3088
|
+
class << self
|
3089
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#30
|
3090
|
+
sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Hover) }
|
3091
|
+
def from_json(json); end
|
3092
|
+
|
3093
|
+
# source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13
|
3094
|
+
def inherited(s); end
|
3095
|
+
end
|
3096
|
+
end
|
3097
|
+
|
3098
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#112
|
3099
|
+
class Spoom::LSP::Location < ::T::Struct
|
3100
|
+
include ::Spoom::LSP::PrintableSymbol
|
3101
|
+
|
3102
|
+
const :uri, ::String
|
3103
|
+
const :range, ::Spoom::LSP::Range
|
3104
|
+
|
3105
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#132
|
3106
|
+
sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
|
3107
|
+
def accept_printer(printer); end
|
3108
|
+
|
3109
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#138
|
3110
|
+
sig { returns(::String) }
|
3111
|
+
def to_s; end
|
3112
|
+
|
3113
|
+
class << self
|
3114
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#123
|
3115
|
+
sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Location) }
|
3116
|
+
def from_json(json); end
|
3117
|
+
|
3118
|
+
# source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13
|
3119
|
+
def inherited(s); end
|
3120
|
+
end
|
3121
|
+
end
|
3122
|
+
|
3123
|
+
# A general message as defined by JSON-RPC.
|
3124
|
+
#
|
3125
|
+
# The language server protocol always uses `"2.0"` as the `jsonrpc` version.
|
3126
|
+
#
|
3127
|
+
# source://spoom//lib/spoom/sorbet/lsp/base.rb#12
|
3128
|
+
class Spoom::LSP::Message
|
3129
|
+
# source://spoom//lib/spoom/sorbet/lsp/base.rb#16
|
3130
|
+
sig { void }
|
3131
|
+
def initialize; end
|
3132
|
+
|
3133
|
+
# source://spoom//lib/spoom/sorbet/lsp/base.rb#21
|
3134
|
+
sig { returns(T::Hash[T.untyped, T.untyped]) }
|
3135
|
+
def as_json; end
|
3136
|
+
|
3137
|
+
# source://spoom//lib/spoom/sorbet/lsp/base.rb#29
|
3138
|
+
sig { params(args: T.untyped).returns(::String) }
|
3139
|
+
def to_json(*args); end
|
3140
|
+
end
|
3141
|
+
|
3142
|
+
# A notification message.
|
3143
|
+
#
|
3144
|
+
# A processed notification message must not send a response back. They work like events.
|
3145
|
+
#
|
3146
|
+
# source://spoom//lib/spoom/sorbet/lsp/base.rb#58
|
3147
|
+
class Spoom::LSP::Notification < ::Spoom::LSP::Message
|
3148
|
+
# source://spoom//lib/spoom/sorbet/lsp/base.rb#68
|
3149
|
+
sig { params(method: ::String, params: T::Hash[T.untyped, T.untyped]).void }
|
3150
|
+
def initialize(method, params); end
|
3151
|
+
|
3152
|
+
# source://spoom//lib/spoom/sorbet/lsp/base.rb#62
|
3153
|
+
sig { returns(::String) }
|
3154
|
+
def method; end
|
3155
|
+
|
3156
|
+
# source://spoom//lib/spoom/sorbet/lsp/base.rb#65
|
3157
|
+
sig { returns(T::Hash[T.untyped, T.untyped]) }
|
3158
|
+
def params; end
|
3159
|
+
end
|
3160
|
+
|
3161
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#50
|
3162
|
+
class Spoom::LSP::Position < ::T::Struct
|
3163
|
+
include ::Spoom::LSP::PrintableSymbol
|
3164
|
+
|
3165
|
+
const :line, ::Integer
|
3166
|
+
const :char, ::Integer
|
3167
|
+
|
3168
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#70
|
3169
|
+
sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
|
3170
|
+
def accept_printer(printer); end
|
3171
|
+
|
3172
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#75
|
3173
|
+
sig { returns(::String) }
|
3174
|
+
def to_s; end
|
3175
|
+
|
3176
|
+
class << self
|
3177
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#61
|
3178
|
+
sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Position) }
|
3179
|
+
def from_json(json); end
|
3180
|
+
|
3181
|
+
# source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13
|
3182
|
+
def inherited(s); end
|
3183
|
+
end
|
3184
|
+
end
|
3185
|
+
|
3186
|
+
# @abstract Subclasses must implement the `abstract` methods below.
|
3187
|
+
#
|
3188
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#9
|
3189
|
+
module Spoom::LSP::PrintableSymbol
|
3190
|
+
interface!
|
3191
|
+
|
3192
|
+
# @abstract
|
3193
|
+
#
|
3194
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#16
|
3195
|
+
sig { abstract.params(printer: ::Spoom::LSP::SymbolPrinter).void }
|
3196
|
+
def accept_printer(printer); end
|
3197
|
+
end
|
3198
|
+
|
3199
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#80
|
3200
|
+
class Spoom::LSP::Range < ::T::Struct
|
3201
|
+
include ::Spoom::LSP::PrintableSymbol
|
3202
|
+
|
3203
|
+
const :start, ::Spoom::LSP::Position
|
3204
|
+
const :end, ::Spoom::LSP::Position
|
3205
|
+
|
3206
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#100
|
3207
|
+
sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
|
3208
|
+
def accept_printer(printer); end
|
3209
|
+
|
3210
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#107
|
3211
|
+
sig { returns(::String) }
|
3212
|
+
def to_s; end
|
3213
|
+
|
3214
|
+
class << self
|
3215
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#91
|
3216
|
+
sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Range) }
|
3217
|
+
def from_json(json); end
|
3218
|
+
|
3219
|
+
# source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13
|
3220
|
+
def inherited(s); end
|
3221
|
+
end
|
3222
|
+
end
|
3223
|
+
|
3224
|
+
# A request message to describe a request between the client and the server.
|
3225
|
+
#
|
3226
|
+
# Every processed request must send a response back to the sender of the request.
|
3227
|
+
#
|
3228
|
+
# source://spoom//lib/spoom/sorbet/lsp/base.rb#37
|
3229
|
+
class Spoom::LSP::Request < ::Spoom::LSP::Message
|
3230
|
+
# source://spoom//lib/spoom/sorbet/lsp/base.rb#47
|
3231
|
+
sig { params(id: ::Integer, method: ::String, params: T::Hash[T.untyped, T.untyped]).void }
|
3232
|
+
def initialize(id, method, params); end
|
3233
|
+
|
3234
|
+
# source://spoom//lib/spoom/sorbet/lsp/base.rb#41
|
3235
|
+
sig { returns(::Integer) }
|
3236
|
+
def id; end
|
3237
|
+
|
3238
|
+
# source://spoom//lib/spoom/sorbet/lsp/base.rb#44
|
3239
|
+
sig { returns(T::Hash[T.untyped, T.untyped]) }
|
3240
|
+
def params; end
|
3241
|
+
end
|
3242
|
+
|
3243
|
+
# source://spoom//lib/spoom/sorbet/lsp/errors.rb#40
|
3244
|
+
class Spoom::LSP::ResponseError < ::Spoom::LSP::Error
|
3245
|
+
# source://spoom//lib/spoom/sorbet/lsp/errors.rb#63
|
3246
|
+
sig { params(code: ::Integer, message: ::String, data: T::Hash[T.untyped, T.untyped]).void }
|
3247
|
+
def initialize(code, message, data); end
|
3248
|
+
|
3249
|
+
# source://spoom//lib/spoom/sorbet/lsp/errors.rb#44
|
3250
|
+
sig { returns(::Integer) }
|
3251
|
+
def code; end
|
3252
|
+
|
3253
|
+
# source://spoom//lib/spoom/sorbet/lsp/errors.rb#47
|
3254
|
+
sig { returns(T::Hash[T.untyped, T.untyped]) }
|
3255
|
+
def data; end
|
3256
|
+
|
3257
|
+
class << self
|
3258
|
+
# source://spoom//lib/spoom/sorbet/lsp/errors.rb#53
|
3259
|
+
sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::ResponseError) }
|
3260
|
+
def from_json(json); end
|
3261
|
+
end
|
3262
|
+
end
|
3263
|
+
|
3264
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#143
|
3265
|
+
class Spoom::LSP::SignatureHelp < ::T::Struct
|
3266
|
+
include ::Spoom::LSP::PrintableSymbol
|
3267
|
+
|
3268
|
+
const :label, T.nilable(::String)
|
3269
|
+
const :doc, ::Object
|
3270
|
+
const :params, T::Array[T.untyped]
|
3271
|
+
|
3272
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#165
|
3273
|
+
sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
|
3274
|
+
def accept_printer(printer); end
|
3275
|
+
|
3276
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#173
|
3277
|
+
sig { returns(::String) }
|
3278
|
+
def to_s; end
|
3279
|
+
|
3280
|
+
class << self
|
3281
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#155
|
3282
|
+
sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::SignatureHelp) }
|
3283
|
+
def from_json(json); end
|
3284
|
+
|
3285
|
+
# source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13
|
3286
|
+
def inherited(s); end
|
3287
|
+
end
|
3288
|
+
end
|
3289
|
+
|
3290
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#309
|
3291
|
+
class Spoom::LSP::SymbolPrinter < ::Spoom::Printer
|
3292
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#326
|
3293
|
+
sig do
|
3294
|
+
params(
|
3295
|
+
out: T.any(::IO, ::StringIO),
|
3296
|
+
colors: T::Boolean,
|
3297
|
+
indent_level: ::Integer,
|
3298
|
+
prefix: T.nilable(::String)
|
3299
|
+
).void
|
3300
|
+
end
|
3301
|
+
def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil), prefix: T.unsafe(nil)); end
|
3302
|
+
|
3303
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#348
|
3304
|
+
sig { params(uri: ::String).returns(::String) }
|
3305
|
+
def clean_uri(uri); end
|
3306
|
+
|
3307
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#316
|
3308
|
+
sig { returns(T.nilable(::String)) }
|
3309
|
+
def prefix; end
|
3310
|
+
|
3311
|
+
# @return [String, nil]
|
3312
|
+
#
|
3313
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#316
|
3314
|
+
def prefix=(_arg0); end
|
3315
|
+
|
3316
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#356
|
3317
|
+
sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void }
|
3318
|
+
def print_list(objects); end
|
3319
|
+
|
3320
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#336
|
3321
|
+
sig { params(object: T.nilable(::Spoom::LSP::PrintableSymbol)).void }
|
3322
|
+
def print_object(object); end
|
3323
|
+
|
3324
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#343
|
3325
|
+
sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void }
|
3326
|
+
def print_objects(objects); end
|
3327
|
+
|
3328
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#313
|
3329
|
+
sig { returns(T::Set[::Integer]) }
|
3330
|
+
def seen; end
|
3331
|
+
end
|
3332
|
+
|
3333
|
+
# source://spoom//lib/spoom/printer.rb#7
|
3334
|
+
class Spoom::Printer
|
3335
|
+
include ::Spoom::Colorize
|
3336
|
+
|
3337
|
+
# source://spoom//lib/spoom/printer.rb#17
|
3338
|
+
sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean, indent_level: ::Integer).void }
|
3339
|
+
def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end
|
3340
|
+
|
3341
|
+
# Colorize `string` with color if `@colors`
|
3342
|
+
#
|
3343
|
+
# source://spoom//lib/spoom/printer.rb#78
|
3344
|
+
sig { params(string: ::String, color: ::Spoom::Color).returns(::String) }
|
3345
|
+
def colorize(string, *color); end
|
3346
|
+
|
3347
|
+
# Decrease indent level
|
3348
|
+
#
|
3349
|
+
# source://spoom//lib/spoom/printer.rb#31
|
3350
|
+
sig { void }
|
3351
|
+
def dedent; end
|
3352
|
+
|
3353
|
+
# Increase indent level
|
3354
|
+
#
|
3355
|
+
# source://spoom//lib/spoom/printer.rb#25
|
3356
|
+
sig { void }
|
3357
|
+
def indent; end
|
3358
|
+
|
3359
|
+
# source://spoom//lib/spoom/printer.rb#14
|
3360
|
+
sig { returns(T.any(::IO, ::StringIO)) }
|
3361
|
+
def out; end
|
3362
|
+
|
3363
|
+
# @return [IO, StringIO]
|
3364
|
+
#
|
3365
|
+
# source://spoom//lib/spoom/printer.rb#14
|
3366
|
+
def out=(_arg0); end
|
3367
|
+
|
3368
|
+
# Print `string` into `out`
|
3369
|
+
#
|
3370
|
+
# source://spoom//lib/spoom/printer.rb#37
|
3371
|
+
sig { params(string: T.nilable(::String)).void }
|
3372
|
+
def print(string); end
|
3373
|
+
|
3374
|
+
# Print `string` colored with `color` into `out`
|
3375
|
+
#
|
3376
|
+
# Does not use colors unless `@colors`.
|
3377
|
+
#
|
3378
|
+
# source://spoom//lib/spoom/printer.rb#47
|
3379
|
+
sig { params(string: T.nilable(::String), color: ::Spoom::Color).void }
|
3380
|
+
def print_colored(string, *color); end
|
3381
|
+
|
3382
|
+
# Print `string` with indent and newline
|
3383
|
+
#
|
3384
|
+
# source://spoom//lib/spoom/printer.rb#62
|
3385
|
+
sig { params(string: T.nilable(::String)).void }
|
3386
|
+
def printl(string); end
|
3387
|
+
|
3388
|
+
# Print a new line into `out`
|
3389
|
+
#
|
3390
|
+
# source://spoom//lib/spoom/printer.rb#56
|
3391
|
+
sig { void }
|
3392
|
+
def printn; end
|
3393
|
+
|
3394
|
+
# Print an indent space into `out`
|
3395
|
+
#
|
3396
|
+
# source://spoom//lib/spoom/printer.rb#72
|
3397
|
+
sig { void }
|
3398
|
+
def printt; end
|
3399
|
+
end
|
3400
|
+
|
3401
|
+
# source://spoom//lib/spoom.rb#10
|
3402
|
+
Spoom::SPOOM_PATH = T.let(T.unsafe(nil), String)
|
3403
|
+
|
3404
|
+
# source://spoom//lib/spoom/sorbet/config.rb#5
|
3405
|
+
module Spoom::Sorbet; end
|
3406
|
+
|
3407
|
+
# source://spoom//lib/spoom/sorbet.rb#39
|
3408
|
+
Spoom::Sorbet::BIN_PATH = T.let(T.unsafe(nil), String)
|
3409
|
+
|
3410
|
+
# source://spoom//lib/spoom/sorbet.rb#36
|
3411
|
+
Spoom::Sorbet::CONFIG_PATH = T.let(T.unsafe(nil), String)
|
3412
|
+
|
3413
|
+
# Parse Sorbet config files
|
3414
|
+
#
|
3415
|
+
# Parses a Sorbet config file:
|
3416
|
+
#
|
3417
|
+
# ```ruby
|
3418
|
+
# config = Spoom::Sorbet::Config.parse_file("sorbet/config")
|
3419
|
+
# puts config.paths # "."
|
3420
|
+
# ```
|
3421
|
+
#
|
3422
|
+
# Parses a Sorbet config string:
|
3423
|
+
#
|
3424
|
+
# ```ruby
|
3425
|
+
# config = Spoom::Sorbet::Config.parse_string(<<~CONFIG)
|
3426
|
+
# a
|
3427
|
+
# --file=b
|
3428
|
+
# --ignore=c
|
3429
|
+
# CONFIG
|
3430
|
+
# puts config.paths # "a", "b"
|
3431
|
+
# puts config.ignore # "c"
|
3432
|
+
# ```
|
3433
|
+
#
|
3434
|
+
# source://spoom//lib/spoom/sorbet/config.rb#26
|
3435
|
+
class Spoom::Sorbet::Config
|
3436
|
+
# source://spoom//lib/spoom/sorbet/config.rb#38
|
3437
|
+
sig { void }
|
3438
|
+
def initialize; end
|
3439
|
+
|
3440
|
+
# @return [Array<String>]
|
3441
|
+
#
|
3442
|
+
# source://spoom//lib/spoom/sorbet/config.rb#32
|
3443
|
+
def allowed_extensions; end
|
3444
|
+
|
3445
|
+
# @return [Array<String>]
|
3446
|
+
#
|
3447
|
+
# source://spoom//lib/spoom/sorbet/config.rb#32
|
3448
|
+
def allowed_extensions=(_arg0); end
|
3449
|
+
|
3450
|
+
# source://spoom//lib/spoom/sorbet/config.rb#46
|
3451
|
+
sig { returns(::Spoom::Sorbet::Config) }
|
3452
|
+
def copy; end
|
3453
|
+
|
3454
|
+
# @return [Array<String>]
|
3455
|
+
#
|
3456
|
+
# source://spoom//lib/spoom/sorbet/config.rb#32
|
3457
|
+
def ignore; end
|
3458
|
+
|
3459
|
+
# @return [Array<String>]
|
3460
|
+
#
|
3461
|
+
# source://spoom//lib/spoom/sorbet/config.rb#32
|
3462
|
+
def ignore=(_arg0); end
|
3463
|
+
|
3464
|
+
# source://spoom//lib/spoom/sorbet/config.rb#35
|
3465
|
+
sig { returns(T::Boolean) }
|
3466
|
+
def no_stdlib; end
|
3467
|
+
|
3468
|
+
# @return [Boolean]
|
3469
|
+
#
|
3470
|
+
# source://spoom//lib/spoom/sorbet/config.rb#35
|
3471
|
+
def no_stdlib=(_arg0); end
|
3472
|
+
|
3473
|
+
# Returns self as a string of options that can be passed to Sorbet
|
3474
|
+
#
|
3475
|
+
# Example:
|
3476
|
+
# ~~~rb
|
3477
|
+
# config = Sorbet::Config.new
|
3478
|
+
# config.paths << "/foo"
|
3479
|
+
# config.paths << "/bar"
|
3480
|
+
# config.ignore << "/baz"
|
3481
|
+
# config.allowed_extensions << ".rb"
|
3482
|
+
#
|
3483
|
+
# puts config.options_string # "/foo /bar --ignore /baz --allowed-extension .rb"
|
3484
|
+
# ~~~
|
3485
|
+
#
|
3486
|
+
# source://spoom//lib/spoom/sorbet/config.rb#68
|
3487
|
+
sig { returns(::String) }
|
3488
|
+
def options_string; end
|
3489
|
+
|
3490
|
+
# source://spoom//lib/spoom/sorbet/config.rb#32
|
3491
|
+
sig { returns(T::Array[::String]) }
|
3492
|
+
def paths; end
|
3493
|
+
|
3494
|
+
# @return [Array<String>]
|
3495
|
+
#
|
3496
|
+
# source://spoom//lib/spoom/sorbet/config.rb#32
|
3497
|
+
def paths=(_arg0); end
|
3498
|
+
|
3499
|
+
class << self
|
3500
|
+
# source://spoom//lib/spoom/sorbet/config.rb#81
|
3501
|
+
sig { params(sorbet_config_path: ::String).returns(::Spoom::Sorbet::Config) }
|
3502
|
+
def parse_file(sorbet_config_path); end
|
3503
|
+
|
3504
|
+
# source://spoom//lib/spoom/sorbet/config.rb#86
|
3505
|
+
sig { params(sorbet_config: ::String).returns(::Spoom::Sorbet::Config) }
|
3506
|
+
def parse_string(sorbet_config); end
|
3507
|
+
|
3508
|
+
private
|
3509
|
+
|
3510
|
+
# source://spoom//lib/spoom/sorbet/config.rb#150
|
3511
|
+
sig { params(line: ::String).returns(::String) }
|
3512
|
+
def parse_option(line); end
|
3513
|
+
end
|
3514
|
+
end
|
3515
|
+
|
3516
|
+
# source://spoom//lib/spoom/sorbet/config.rb#29
|
3517
|
+
Spoom::Sorbet::Config::DEFAULT_ALLOWED_EXTENSIONS = T.let(T.unsafe(nil), Array)
|
3518
|
+
|
3519
|
+
# source://spoom//lib/spoom/sorbet.rb#14
|
3520
|
+
class Spoom::Sorbet::Error < ::StandardError
|
3521
|
+
# source://spoom//lib/spoom/sorbet.rb#29
|
3522
|
+
sig { params(message: ::String, result: ::Spoom::ExecResult).void }
|
3523
|
+
def initialize(message, result); end
|
3524
|
+
|
3525
|
+
# source://spoom//lib/spoom/sorbet.rb#21
|
3526
|
+
sig { returns(::Spoom::ExecResult) }
|
3527
|
+
def result; end
|
3528
|
+
end
|
3529
|
+
|
3530
|
+
# source://spoom//lib/spoom/sorbet.rb#17
|
3531
|
+
class Spoom::Sorbet::Error::Killed < ::Spoom::Sorbet::Error; end
|
3532
|
+
|
3533
|
+
# source://spoom//lib/spoom/sorbet.rb#18
|
3534
|
+
class Spoom::Sorbet::Error::Segfault < ::Spoom::Sorbet::Error; end
|
3535
|
+
|
3536
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#6
|
3537
|
+
module Spoom::Sorbet::Errors
|
3538
|
+
class << self
|
3539
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#13
|
3540
|
+
sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error]).returns(T::Array[::Spoom::Sorbet::Errors::Error]) }
|
3541
|
+
def sort_errors_by_code(errors); end
|
3542
|
+
end
|
3543
|
+
end
|
3544
|
+
|
3545
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#7
|
3546
|
+
Spoom::Sorbet::Errors::DEFAULT_ERROR_URL_BASE = T.let(T.unsafe(nil), String)
|
3547
|
+
|
3548
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#125
|
3549
|
+
class Spoom::Sorbet::Errors::Error
|
3550
|
+
include ::Comparable
|
3551
|
+
|
3552
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#151
|
3553
|
+
sig do
|
3554
|
+
params(
|
3555
|
+
file: T.nilable(::String),
|
3556
|
+
line: T.nilable(::Integer),
|
3557
|
+
message: T.nilable(::String),
|
3558
|
+
code: T.nilable(::Integer),
|
3559
|
+
more: T::Array[::String]
|
3560
|
+
).void
|
3561
|
+
end
|
3562
|
+
def initialize(file, line, message, code, more = T.unsafe(nil)); end
|
3563
|
+
|
3564
|
+
# By default errors are sorted by location
|
3565
|
+
#
|
3566
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#162
|
3567
|
+
sig { params(other: T.untyped).returns(::Integer) }
|
3568
|
+
def <=>(other); end
|
3569
|
+
|
3570
|
+
# @return [Integer, nil]
|
3571
|
+
#
|
3572
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#133
|
3573
|
+
def code; end
|
3574
|
+
|
3575
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#130
|
3576
|
+
sig { returns(T.nilable(::String)) }
|
3577
|
+
def file; end
|
3578
|
+
|
3579
|
+
# Other files associated with the error
|
3580
|
+
#
|
3581
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#140
|
3582
|
+
sig { returns(T::Set[::String]) }
|
3583
|
+
def files_from_error_sections; end
|
3584
|
+
|
3585
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#133
|
3586
|
+
sig { returns(T.nilable(::Integer)) }
|
3587
|
+
def line; end
|
3588
|
+
|
3589
|
+
# @return [String, nil]
|
3590
|
+
#
|
3591
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#130
|
3592
|
+
def message; end
|
3593
|
+
|
3594
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#136
|
3595
|
+
sig { returns(T::Array[::String]) }
|
3596
|
+
def more; end
|
3597
|
+
|
3598
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#169
|
3599
|
+
sig { returns(::String) }
|
3600
|
+
def to_s; end
|
3601
|
+
end
|
3602
|
+
|
3603
|
+
# Parse errors from Sorbet output
|
3604
|
+
#
|
3605
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#18
|
3606
|
+
class Spoom::Sorbet::Errors::Parser
|
3607
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#43
|
3608
|
+
sig { params(error_url_base: ::String).void }
|
3609
|
+
def initialize(error_url_base: T.unsafe(nil)); end
|
3610
|
+
|
3611
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#50
|
3612
|
+
sig { params(output: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) }
|
3613
|
+
def parse(output); end
|
3614
|
+
|
3615
|
+
private
|
3616
|
+
|
3617
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#114
|
3618
|
+
sig { params(line: ::String).void }
|
3619
|
+
def append_error(line); end
|
3620
|
+
|
3621
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#106
|
3622
|
+
sig { void }
|
3623
|
+
def close_error; end
|
3624
|
+
|
3625
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#73
|
3626
|
+
sig { params(error_url_base: ::String).returns(::Regexp) }
|
3627
|
+
def error_line_match_regexp(error_url_base); end
|
3628
|
+
|
3629
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#90
|
3630
|
+
sig { params(line: ::String).returns(T.nilable(::Spoom::Sorbet::Errors::Error)) }
|
3631
|
+
def match_error_line(line); end
|
3632
|
+
|
3633
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#99
|
3634
|
+
sig { params(error: ::Spoom::Sorbet::Errors::Error).void }
|
3635
|
+
def open_error(error); end
|
3636
|
+
|
3637
|
+
class << self
|
3638
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#36
|
3639
|
+
sig { params(output: ::String, error_url_base: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) }
|
3640
|
+
def parse_string(output, error_url_base: T.unsafe(nil)); end
|
3641
|
+
end
|
3642
|
+
end
|
3643
|
+
|
3644
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#21
|
3645
|
+
Spoom::Sorbet::Errors::Parser::HEADER = T.let(T.unsafe(nil), Array)
|
3646
|
+
|
3647
|
+
# source://spoom//lib/spoom/sorbet.rb#37
|
3648
|
+
Spoom::Sorbet::GEM_PATH = T.let(T.unsafe(nil), String)
|
3649
|
+
|
3650
|
+
# source://spoom//lib/spoom/sorbet.rb#38
|
3651
|
+
Spoom::Sorbet::GEM_VERSION = T.let(T.unsafe(nil), String)
|
3652
|
+
|
3653
|
+
# source://spoom//lib/spoom/sorbet.rb#41
|
3654
|
+
Spoom::Sorbet::KILLED_CODE = T.let(T.unsafe(nil), Integer)
|
3655
|
+
|
3656
|
+
# source://spoom//lib/spoom/sorbet/metrics.rb#8
|
3657
|
+
module Spoom::Sorbet::MetricsParser
|
3658
|
+
class << self
|
3659
|
+
# source://spoom//lib/spoom/sorbet/metrics.rb#15
|
3660
|
+
sig { params(path: ::String, prefix: ::String).returns(T::Hash[::String, ::Integer]) }
|
3661
|
+
def parse_file(path, prefix = T.unsafe(nil)); end
|
3662
|
+
|
3663
|
+
# source://spoom//lib/spoom/sorbet/metrics.rb#25
|
3664
|
+
sig { params(obj: T::Hash[::String, T.untyped], prefix: ::String).returns(T::Hash[::String, ::Integer]) }
|
3665
|
+
def parse_hash(obj, prefix = T.unsafe(nil)); end
|
3666
|
+
|
3667
|
+
# source://spoom//lib/spoom/sorbet/metrics.rb#20
|
3668
|
+
sig { params(string: ::String, prefix: ::String).returns(T::Hash[::String, ::Integer]) }
|
3669
|
+
def parse_string(string, prefix = T.unsafe(nil)); end
|
3670
|
+
end
|
3671
|
+
end
|
3672
|
+
|
3673
|
+
# source://spoom//lib/spoom/sorbet/metrics.rb#9
|
3674
|
+
Spoom::Sorbet::MetricsParser::DEFAULT_PREFIX = T.let(T.unsafe(nil), String)
|
3675
|
+
|
3676
|
+
# source://spoom//lib/spoom/sorbet.rb#42
|
3677
|
+
Spoom::Sorbet::SEGFAULT_CODE = T.let(T.unsafe(nil), Integer)
|
3678
|
+
|
3679
|
+
# source://spoom//lib/spoom/sorbet/sigils.rb#9
|
3680
|
+
module Spoom::Sorbet::Sigils
|
3681
|
+
class << self
|
3682
|
+
# changes the sigil in the file at the passed path to the specified new strictness
|
3683
|
+
#
|
3684
|
+
# source://spoom//lib/spoom/sorbet/sigils.rb#72
|
3685
|
+
sig { params(path: T.any(::Pathname, ::String), new_strictness: ::String).returns(T::Boolean) }
|
3686
|
+
def change_sigil_in_file(path, new_strictness); end
|
3687
|
+
|
3688
|
+
# changes the sigil to have a new strictness in a list of files
|
3689
|
+
#
|
3690
|
+
# source://spoom//lib/spoom/sorbet/sigils.rb#83
|
3691
|
+
sig { params(path_list: T::Array[::String], new_strictness: ::String).returns(T::Array[::String]) }
|
3692
|
+
def change_sigil_in_files(path_list, new_strictness); end
|
3693
|
+
|
3694
|
+
# returns a string containing the strictness of a sigil in a file at the passed path
|
3695
|
+
# * returns nil if no sigil
|
3696
|
+
#
|
3697
|
+
# source://spoom//lib/spoom/sorbet/sigils.rb#63
|
3698
|
+
sig { params(path: T.any(::Pathname, ::String)).returns(T.nilable(::String)) }
|
3699
|
+
def file_strictness(path); end
|
3700
|
+
|
3701
|
+
# returns the full sigil comment string for the passed strictness
|
3702
|
+
#
|
3703
|
+
# source://spoom//lib/spoom/sorbet/sigils.rb#38
|
3704
|
+
sig { params(strictness: ::String).returns(::String) }
|
3705
|
+
def sigil_string(strictness); end
|
3706
|
+
|
3707
|
+
# returns the strictness of a sigil in the passed file content string (nil if no sigil)
|
3708
|
+
#
|
3709
|
+
# source://spoom//lib/spoom/sorbet/sigils.rb#50
|
3710
|
+
sig { params(content: ::String).returns(T.nilable(::String)) }
|
3711
|
+
def strictness_in_content(content); end
|
3712
|
+
|
3713
|
+
# returns a string which is the passed content but with the sigil updated to a new strictness
|
3714
|
+
#
|
3715
|
+
# source://spoom//lib/spoom/sorbet/sigils.rb#56
|
3716
|
+
sig { params(content: ::String, new_strictness: ::String).returns(::String) }
|
3717
|
+
def update_sigil(content, new_strictness); end
|
3718
|
+
|
3719
|
+
# returns true if the passed string is a valid strictness (else false)
|
3720
|
+
#
|
3721
|
+
# source://spoom//lib/spoom/sorbet/sigils.rb#44
|
3722
|
+
sig { params(strictness: ::String).returns(T::Boolean) }
|
3723
|
+
def valid_strictness?(strictness); end
|
3724
|
+
end
|
3725
|
+
end
|
3726
|
+
|
3727
|
+
# source://spoom//lib/spoom/sorbet/sigils.rb#31
|
3728
|
+
Spoom::Sorbet::Sigils::SIGIL_REGEXP = T.let(T.unsafe(nil), Regexp)
|
3729
|
+
|
3730
|
+
# source://spoom//lib/spoom/sorbet/sigils.rb#13
|
3731
|
+
Spoom::Sorbet::Sigils::STRICTNESS_FALSE = T.let(T.unsafe(nil), String)
|
3732
|
+
|
3733
|
+
# source://spoom//lib/spoom/sorbet/sigils.rb#12
|
3734
|
+
Spoom::Sorbet::Sigils::STRICTNESS_IGNORE = T.let(T.unsafe(nil), String)
|
3735
|
+
|
3736
|
+
# source://spoom//lib/spoom/sorbet/sigils.rb#17
|
3737
|
+
Spoom::Sorbet::Sigils::STRICTNESS_INTERNAL = T.let(T.unsafe(nil), String)
|
3738
|
+
|
3739
|
+
# source://spoom//lib/spoom/sorbet/sigils.rb#15
|
3740
|
+
Spoom::Sorbet::Sigils::STRICTNESS_STRICT = T.let(T.unsafe(nil), String)
|
3741
|
+
|
3742
|
+
# source://spoom//lib/spoom/sorbet/sigils.rb#16
|
3743
|
+
Spoom::Sorbet::Sigils::STRICTNESS_STRONG = T.let(T.unsafe(nil), String)
|
3744
|
+
|
3745
|
+
# source://spoom//lib/spoom/sorbet/sigils.rb#14
|
3746
|
+
Spoom::Sorbet::Sigils::STRICTNESS_TRUE = T.let(T.unsafe(nil), String)
|
3747
|
+
|
3748
|
+
# source://spoom//lib/spoom/sorbet/sigils.rb#19
|
3749
|
+
Spoom::Sorbet::Sigils::VALID_STRICTNESS = T.let(T.unsafe(nil), Array)
|
3750
|
+
|
3751
|
+
# source://spoom//lib/spoom/timeline.rb#5
|
3752
|
+
class Spoom::Timeline
|
3753
|
+
# source://spoom//lib/spoom/timeline.rb#9
|
3754
|
+
sig { params(context: ::Spoom::Context, from: ::Time, to: ::Time).void }
|
3755
|
+
def initialize(context, from, to); end
|
3756
|
+
|
3757
|
+
# Return one commit for each date in `dates`
|
3758
|
+
#
|
3759
|
+
# source://spoom//lib/spoom/timeline.rb#36
|
3760
|
+
sig { params(dates: T::Array[::Time]).returns(T::Array[::Spoom::Git::Commit]) }
|
3761
|
+
def commits_for_dates(dates); end
|
3762
|
+
|
3763
|
+
# Return all months between `from` and `to`
|
3764
|
+
#
|
3765
|
+
# source://spoom//lib/spoom/timeline.rb#23
|
3766
|
+
sig { returns(T::Array[::Time]) }
|
3767
|
+
def months; end
|
3768
|
+
|
3769
|
+
# Return one commit for each month between `from` and `to`
|
3770
|
+
#
|
3771
|
+
# source://spoom//lib/spoom/timeline.rb#17
|
3772
|
+
sig { returns(T::Array[::Spoom::Git::Commit]) }
|
3773
|
+
def ticks; end
|
3774
|
+
end
|
3775
|
+
|
3776
|
+
# source://spoom//lib/spoom/version.rb#5
|
3777
|
+
Spoom::VERSION = T.let(T.unsafe(nil), String)
|