sorbet-result 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +8 -7
- data/sorbet/rbi/gems/{erb@4.0.4.rbi → erb@5.0.1.rbi} +93 -125
- data/sorbet/rbi/gems/rexml@3.4.1.rbi +5243 -0
- data/sorbet/rbi/gems/{spoom@1.6.1.rbi → spoom@1.6.3.rbi} +211 -500
- metadata +7 -11
- data/sorbet/rbi/gems/cgi@0.5.0.rbi +0 -2961
@@ -56,33 +56,30 @@ module Spoom::Cli::Helper
|
|
56
56
|
|
57
57
|
# : (String string) -> String
|
58
58
|
#
|
59
|
-
# source://spoom//lib/spoom/cli/helper.rb#
|
59
|
+
# source://spoom//lib/spoom/cli/helper.rb#149
|
60
60
|
sig { params(string: ::String).returns(::String) }
|
61
61
|
def blue(string); end
|
62
62
|
|
63
63
|
# Collect files from `paths`, defaulting to `exec_path`
|
64
|
-
# : (Array[String] paths) -> Array[String]
|
64
|
+
# : (Array[String] paths, ?include_rbi_files: bool) -> Array[String]
|
65
65
|
#
|
66
66
|
# source://spoom//lib/spoom/cli/helper.rb#85
|
67
|
-
|
68
|
-
|
69
|
-
def collect_files(paths); end
|
67
|
+
sig { params(paths: T::Array[::String], include_rbi_files: T::Boolean).returns(T::Array[::String]) }
|
68
|
+
def collect_files(paths, include_rbi_files: T.unsafe(nil)); end
|
70
69
|
|
71
70
|
# Is the `--color` option true?
|
72
71
|
# : -> bool
|
73
72
|
#
|
74
73
|
# @return [Boolean]
|
75
74
|
#
|
76
|
-
# source://spoom//lib/spoom/cli/helper.rb#
|
77
|
-
# Is the `--color` option true?
|
75
|
+
# source://spoom//lib/spoom/cli/helper.rb#113
|
78
76
|
sig { returns(T::Boolean) }
|
79
77
|
def color?; end
|
80
78
|
|
81
79
|
# Colorize a string if `color?`
|
82
80
|
# : (String string, *Color color) -> String
|
83
81
|
#
|
84
|
-
# source://spoom//lib/spoom/cli/helper.rb#
|
85
|
-
# Colorize a string if `color?`
|
82
|
+
# source://spoom//lib/spoom/cli/helper.rb#142
|
86
83
|
sig { params(string: ::String, color: ::Spoom::Color).returns(::String) }
|
87
84
|
def colorize(string, *color); end
|
88
85
|
|
@@ -90,7 +87,6 @@ module Spoom::Cli::Helper
|
|
90
87
|
# : -> Context
|
91
88
|
#
|
92
89
|
# source://spoom//lib/spoom/cli/helper.rb#58
|
93
|
-
# Returns the context at `--path` (by default the current working directory)
|
94
90
|
sig { returns(::Spoom::Context) }
|
95
91
|
def context; end
|
96
92
|
|
@@ -98,13 +94,12 @@ module Spoom::Cli::Helper
|
|
98
94
|
# : -> Context
|
99
95
|
#
|
100
96
|
# source://spoom//lib/spoom/cli/helper.rb#64
|
101
|
-
# Raise if `spoom` is not ran inside a context with a `sorbet/config` file
|
102
97
|
sig { returns(::Spoom::Context) }
|
103
98
|
def context_requiring_sorbet!; end
|
104
99
|
|
105
100
|
# : (String string) -> String
|
106
101
|
#
|
107
|
-
# source://spoom//lib/spoom/cli/helper.rb#
|
102
|
+
# source://spoom//lib/spoom/cli/helper.rb#154
|
108
103
|
sig { params(string: ::String).returns(::String) }
|
109
104
|
def cyan(string); end
|
110
105
|
|
@@ -112,31 +107,30 @@ module Spoom::Cli::Helper
|
|
112
107
|
# : -> String
|
113
108
|
#
|
114
109
|
# source://spoom//lib/spoom/cli/helper.rb#79
|
115
|
-
# Return the path specified through `--path`
|
116
110
|
sig { returns(::String) }
|
117
111
|
def exec_path; end
|
118
112
|
|
119
113
|
# : (String string) -> String
|
120
114
|
#
|
121
|
-
# source://spoom//lib/spoom/cli/helper.rb#
|
115
|
+
# source://spoom//lib/spoom/cli/helper.rb#159
|
122
116
|
sig { params(string: ::String).returns(::String) }
|
123
117
|
def gray(string); end
|
124
118
|
|
125
119
|
# : (String string) -> String
|
126
120
|
#
|
127
|
-
# source://spoom//lib/spoom/cli/helper.rb#
|
121
|
+
# source://spoom//lib/spoom/cli/helper.rb#164
|
128
122
|
sig { params(string: ::String).returns(::String) }
|
129
123
|
def green(string); end
|
130
124
|
|
131
125
|
# : (String string) -> String
|
132
126
|
#
|
133
|
-
# source://spoom//lib/spoom/cli/helper.rb#
|
127
|
+
# source://spoom//lib/spoom/cli/helper.rb#118
|
134
128
|
sig { params(string: ::String).returns(::String) }
|
135
129
|
def highlight(string); end
|
136
130
|
|
137
131
|
# : (String string) -> String
|
138
132
|
#
|
139
|
-
# source://spoom//lib/spoom/cli/helper.rb#
|
133
|
+
# source://spoom//lib/spoom/cli/helper.rb#169
|
140
134
|
sig { params(string: ::String).returns(::String) }
|
141
135
|
def red(string); end
|
142
136
|
|
@@ -144,7 +138,6 @@ module Spoom::Cli::Helper
|
|
144
138
|
# : (String message) -> void
|
145
139
|
#
|
146
140
|
# source://spoom//lib/spoom/cli/helper.rb#19
|
147
|
-
# Print `message` on `$stdout`
|
148
141
|
sig { params(message: ::String).void }
|
149
142
|
def say(message); end
|
150
143
|
|
@@ -154,8 +147,6 @@ module Spoom::Cli::Helper
|
|
154
147
|
# : (String message, ?status: String?, ?nl: bool) -> void
|
155
148
|
#
|
156
149
|
# source://spoom//lib/spoom/cli/helper.rb#32
|
157
|
-
# Print `message` on `$stderr`
|
158
|
-
# The message is prefixed by a status (default: `Error`).
|
159
150
|
sig { params(message: ::String, status: T.nilable(::String), nl: T::Boolean).void }
|
160
151
|
def say_error(message, status: T.unsafe(nil), nl: T.unsafe(nil)); end
|
161
152
|
|
@@ -165,14 +156,12 @@ module Spoom::Cli::Helper
|
|
165
156
|
# : (String message, ?status: String?, ?nl: bool) -> void
|
166
157
|
#
|
167
158
|
# source://spoom//lib/spoom/cli/helper.rb#46
|
168
|
-
# Print `message` on `$stderr`
|
169
|
-
# The message is prefixed by a status (default: `Warning`).
|
170
159
|
sig { params(message: ::String, status: T.nilable(::String), nl: T::Boolean).void }
|
171
160
|
def say_warning(message, status: T.unsafe(nil), nl: T.unsafe(nil)); end
|
172
161
|
|
173
162
|
# : (String string) -> String
|
174
163
|
#
|
175
|
-
# source://spoom//lib/spoom/cli/helper.rb#
|
164
|
+
# source://spoom//lib/spoom/cli/helper.rb#174
|
176
165
|
sig { params(string: ::String).returns(::String) }
|
177
166
|
def yellow(string); end
|
178
167
|
end
|
@@ -380,21 +369,21 @@ class Spoom::Cli::Srb::Sigs < ::Thor
|
|
380
369
|
include ::Spoom::Colorize
|
381
370
|
include ::Spoom::Cli::Helper
|
382
371
|
|
383
|
-
# source://spoom//lib/spoom/cli/srb/sigs.rb#
|
372
|
+
# source://spoom//lib/spoom/cli/srb/sigs.rb#198
|
384
373
|
def exec(context, command); end
|
385
374
|
|
386
|
-
# source://spoom//lib/spoom/cli/srb/sigs.rb#
|
375
|
+
# source://spoom//lib/spoom/cli/srb/sigs.rb#69
|
387
376
|
def export(output_path = T.unsafe(nil)); end
|
388
377
|
|
389
378
|
def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
|
390
379
|
|
391
|
-
# source://spoom//lib/spoom/cli/srb/sigs.rb#
|
380
|
+
# source://spoom//lib/spoom/cli/srb/sigs.rb#50
|
392
381
|
def strip(*paths); end
|
393
382
|
|
394
|
-
# source://spoom//lib/spoom/cli/srb/sigs.rb#
|
383
|
+
# source://spoom//lib/spoom/cli/srb/sigs.rb#175
|
395
384
|
def transform_files(files, &block); end
|
396
385
|
|
397
|
-
# source://spoom//lib/spoom/cli/srb/sigs.rb#
|
386
|
+
# source://spoom//lib/spoom/cli/srb/sigs.rb#21
|
398
387
|
def translate(*paths); end
|
399
388
|
end
|
400
389
|
|
@@ -403,15 +392,15 @@ class Spoom::Cli::Srb::Tc < ::Thor
|
|
403
392
|
include ::Spoom::Colorize
|
404
393
|
include ::Spoom::Cli::Helper
|
405
394
|
|
406
|
-
# source://spoom//lib/spoom/cli/srb/tc.rb#
|
395
|
+
# source://spoom//lib/spoom/cli/srb/tc.rb#147
|
407
396
|
def colorize_message(message); end
|
408
397
|
|
409
|
-
# source://spoom//lib/spoom/cli/srb/tc.rb#
|
398
|
+
# source://spoom//lib/spoom/cli/srb/tc.rb#138
|
410
399
|
def format_error(error, format); end
|
411
400
|
|
412
401
|
def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
|
413
402
|
|
414
|
-
# source://spoom//lib/spoom/cli/srb/tc.rb#
|
403
|
+
# source://spoom//lib/spoom/cli/srb/tc.rb#28
|
415
404
|
def tc(*paths_to_select); end
|
416
405
|
end
|
417
406
|
|
@@ -472,8 +461,6 @@ end
|
|
472
461
|
# It is used to manipulate files and run commands in the context of this directory.
|
473
462
|
#
|
474
463
|
# source://spoom//lib/spoom/context/bundle.rb#5
|
475
|
-
# An abstraction to a Ruby project context
|
476
|
-
# A context maps to a directory in the file system.
|
477
464
|
class Spoom::Context
|
478
465
|
include ::Spoom::Context::Bundle
|
479
466
|
include ::Spoom::Context::Exec
|
@@ -490,9 +477,6 @@ class Spoom::Context
|
|
490
477
|
# @return [Context] a new instance of Context
|
491
478
|
#
|
492
479
|
# source://spoom//lib/spoom/context.rb#47
|
493
|
-
# Create a new context about `absolute_path`
|
494
|
-
# The directory will not be created if it doesn't exist.
|
495
|
-
# Call `#make!` to create it.
|
496
480
|
sig { params(absolute_path: ::String).void }
|
497
481
|
def initialize(absolute_path); end
|
498
482
|
|
@@ -500,7 +484,6 @@ class Spoom::Context
|
|
500
484
|
# : String
|
501
485
|
#
|
502
486
|
# source://spoom//lib/spoom/context.rb#40
|
503
|
-
# The absolute path to the directory this context is about
|
504
487
|
sig { returns(::String) }
|
505
488
|
def absolute_path; end
|
506
489
|
|
@@ -512,9 +495,6 @@ class Spoom::Context
|
|
512
495
|
# : (?String? name) -> instance
|
513
496
|
#
|
514
497
|
# source://spoom//lib/spoom/context.rb#33
|
515
|
-
# Create a new context in the system's temporary directory
|
516
|
-
# `name` is used as prefix to the temporary directory name.
|
517
|
-
# The directory will be created if it doesn't exist.
|
518
498
|
sig { params(name: T.nilable(::String)).returns(T.attached_class) }
|
519
499
|
def mktmp!(name = T.unsafe(nil)); end
|
520
500
|
end
|
@@ -530,7 +510,6 @@ module Spoom::Context::Bundle
|
|
530
510
|
# : (String command, ?version: String?, ?capture_err: bool) -> ExecResult
|
531
511
|
#
|
532
512
|
# source://spoom//lib/spoom/context/bundle.rb#32
|
533
|
-
# Run a command with `bundle` in this context directory
|
534
513
|
sig { params(command: ::String, version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) }
|
535
514
|
def bundle(command, version: T.unsafe(nil), capture_err: T.unsafe(nil)); end
|
536
515
|
|
@@ -538,7 +517,6 @@ module Spoom::Context::Bundle
|
|
538
517
|
# : (String command, ?version: String?, ?capture_err: bool) -> ExecResult
|
539
518
|
#
|
540
519
|
# source://spoom//lib/spoom/context/bundle.rb#45
|
541
|
-
# Run a command `bundle exec` in this context directory
|
542
520
|
sig { params(command: ::String, version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) }
|
543
521
|
def bundle_exec(command, version: T.unsafe(nil), capture_err: T.unsafe(nil)); end
|
544
522
|
|
@@ -546,7 +524,6 @@ module Spoom::Context::Bundle
|
|
546
524
|
# : (?version: String?, ?capture_err: bool) -> ExecResult
|
547
525
|
#
|
548
526
|
# source://spoom//lib/spoom/context/bundle.rb#39
|
549
|
-
# Run `bundle install` in this context directory
|
550
527
|
sig { params(version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) }
|
551
528
|
def bundle_install!(version: T.unsafe(nil), capture_err: T.unsafe(nil)); end
|
552
529
|
|
@@ -556,8 +533,6 @@ module Spoom::Context::Bundle
|
|
556
533
|
# : (String gem) -> Gem::Version?
|
557
534
|
#
|
558
535
|
# source://spoom//lib/spoom/context/bundle.rb#61
|
559
|
-
# Get `gem` version from the `Gemfile.lock` content
|
560
|
-
# Returns `nil` if `gem` cannot be found in the Gemfile.
|
561
536
|
sig { params(gem: ::String).returns(T.nilable(::Gem::Version)) }
|
562
537
|
def gem_version_from_gemfile_lock(gem); end
|
563
538
|
|
@@ -571,7 +546,6 @@ module Spoom::Context::Bundle
|
|
571
546
|
# : -> String?
|
572
547
|
#
|
573
548
|
# source://spoom//lib/spoom/context/bundle.rb#14
|
574
|
-
# Read the contents of the Gemfile in this context directory
|
575
549
|
sig { returns(T.nilable(::String)) }
|
576
550
|
def read_gemfile; end
|
577
551
|
|
@@ -579,7 +553,6 @@ module Spoom::Context::Bundle
|
|
579
553
|
# : -> String?
|
580
554
|
#
|
581
555
|
# source://spoom//lib/spoom/context/bundle.rb#20
|
582
|
-
# Read the contents of the Gemfile.lock in this context directory
|
583
556
|
sig { returns(T.nilable(::String)) }
|
584
557
|
def read_gemfile_lock; end
|
585
558
|
|
@@ -587,7 +560,6 @@ module Spoom::Context::Bundle
|
|
587
560
|
# : (String contents, ?append: bool) -> void
|
588
561
|
#
|
589
562
|
# source://spoom//lib/spoom/context/bundle.rb#26
|
590
|
-
# Set the `contents` of the Gemfile in this context directory
|
591
563
|
sig { params(contents: ::String, append: T::Boolean).void }
|
592
564
|
def write_gemfile!(contents, append: T.unsafe(nil)); end
|
593
565
|
end
|
@@ -602,7 +574,6 @@ module Spoom::Context::Exec
|
|
602
574
|
# : (String command, ?capture_err: bool) -> ExecResult
|
603
575
|
#
|
604
576
|
# source://spoom//lib/spoom/context/exec.rb#32
|
605
|
-
# Run a command in this context directory
|
606
577
|
sig { params(command: ::String, capture_err: T::Boolean).returns(::Spoom::ExecResult) }
|
607
578
|
def exec(command, capture_err: T.unsafe(nil)); end
|
608
579
|
end
|
@@ -617,7 +588,6 @@ module Spoom::Context::FileSystem
|
|
617
588
|
# : (String relative_path) -> String
|
618
589
|
#
|
619
590
|
# source://spoom//lib/spoom/context/file_system.rb#14
|
620
|
-
# Returns the absolute path to `relative_path` in the context's directory
|
621
591
|
sig { params(relative_path: ::String).returns(::String) }
|
622
592
|
def absolute_path_to(relative_path); end
|
623
593
|
|
@@ -639,8 +609,6 @@ module Spoom::Context::FileSystem
|
|
639
609
|
# : -> void
|
640
610
|
#
|
641
611
|
# source://spoom//lib/spoom/context/file_system.rb#98
|
642
|
-
# Delete this context and its content
|
643
|
-
# Warning: it will `rm -rf` the context directory on the file system.
|
644
612
|
sig { void }
|
645
613
|
def destroy!; end
|
646
614
|
|
@@ -650,7 +618,6 @@ module Spoom::Context::FileSystem
|
|
650
618
|
# @return [Boolean]
|
651
619
|
#
|
652
620
|
# source://spoom//lib/spoom/context/file_system.rb#20
|
653
|
-
# Does the context directory at `absolute_path` exist and is a directory?
|
654
621
|
sig { returns(T::Boolean) }
|
655
622
|
def exist?; end
|
656
623
|
|
@@ -660,7 +627,6 @@ module Spoom::Context::FileSystem
|
|
660
627
|
# @return [Boolean]
|
661
628
|
#
|
662
629
|
# source://spoom//lib/spoom/context/file_system.rb#58
|
663
|
-
# Does `relative_path` point to an existing file in this context directory?
|
664
630
|
sig { params(relative_path: ::String).returns(T::Boolean) }
|
665
631
|
def file?(relative_path); end
|
666
632
|
|
@@ -668,7 +634,6 @@ module Spoom::Context::FileSystem
|
|
668
634
|
# : (?String pattern) -> Array[String]
|
669
635
|
#
|
670
636
|
# source://spoom//lib/spoom/context/file_system.rb#33
|
671
|
-
# List all files in this context matching `pattern`
|
672
637
|
sig { params(pattern: ::String).returns(T::Array[::String]) }
|
673
638
|
def glob(pattern = T.unsafe(nil)); end
|
674
639
|
|
@@ -676,7 +641,6 @@ module Spoom::Context::FileSystem
|
|
676
641
|
# : -> Array[String]
|
677
642
|
#
|
678
643
|
# source://spoom//lib/spoom/context/file_system.rb#41
|
679
|
-
# List all files at the top level of this context directory
|
680
644
|
sig { returns(T::Array[::String]) }
|
681
645
|
def list; end
|
682
646
|
|
@@ -684,7 +648,6 @@ module Spoom::Context::FileSystem
|
|
684
648
|
# : -> void
|
685
649
|
#
|
686
650
|
# source://spoom//lib/spoom/context/file_system.rb#26
|
687
|
-
# Create the context directory at `absolute_path`
|
688
651
|
sig { void }
|
689
652
|
def mkdir!; end
|
690
653
|
|
@@ -692,7 +655,6 @@ module Spoom::Context::FileSystem
|
|
692
655
|
# : (String from_relative_path, String to_relative_path) -> void
|
693
656
|
#
|
694
657
|
# source://spoom//lib/spoom/context/file_system.rb#88
|
695
|
-
# Move the file or directory from `from_relative_path` to `to_relative_path`
|
696
658
|
sig { params(from_relative_path: ::String, to_relative_path: ::String).void }
|
697
659
|
def move!(from_relative_path, to_relative_path); end
|
698
660
|
|
@@ -702,8 +664,6 @@ module Spoom::Context::FileSystem
|
|
702
664
|
# : (String relative_path) -> String
|
703
665
|
#
|
704
666
|
# source://spoom//lib/spoom/context/file_system.rb#66
|
705
|
-
# Return the contents of the file at `relative_path` in this context directory
|
706
|
-
# Will raise if the file doesn't exist.
|
707
667
|
sig { params(relative_path: ::String).returns(::String) }
|
708
668
|
def read(relative_path); end
|
709
669
|
|
@@ -711,7 +671,6 @@ module Spoom::Context::FileSystem
|
|
711
671
|
# : (String relative_path) -> void
|
712
672
|
#
|
713
673
|
# source://spoom//lib/spoom/context/file_system.rb#82
|
714
|
-
# Remove the path at `relative_path` (recursive + force) in this context directory
|
715
674
|
sig { params(relative_path: ::String).void }
|
716
675
|
def remove!(relative_path); end
|
717
676
|
|
@@ -721,8 +680,6 @@ module Spoom::Context::FileSystem
|
|
721
680
|
# : (String relative_path, ?String contents, ?append: bool) -> void
|
722
681
|
#
|
723
682
|
# source://spoom//lib/spoom/context/file_system.rb#74
|
724
|
-
# Write `contents` in the file at `relative_path` in this context directory
|
725
|
-
# Append to the file if `append` is true.
|
726
683
|
sig { params(relative_path: ::String, contents: ::String, append: T::Boolean).void }
|
727
684
|
def write!(relative_path, contents = T.unsafe(nil), append: T.unsafe(nil)); end
|
728
685
|
end
|
@@ -737,7 +694,6 @@ module Spoom::Context::Git
|
|
737
694
|
# : (String command) -> ExecResult
|
738
695
|
#
|
739
696
|
# source://spoom//lib/spoom/context/git.rb#38
|
740
|
-
# Run a command prefixed by `git` in this context directory
|
741
697
|
sig { params(command: ::String).returns(::Spoom::ExecResult) }
|
742
698
|
def git(command); end
|
743
699
|
|
@@ -745,7 +701,6 @@ module Spoom::Context::Git
|
|
745
701
|
# : (?ref: String) -> ExecResult
|
746
702
|
#
|
747
703
|
# source://spoom//lib/spoom/context/git.rb#57
|
748
|
-
# Run `git checkout` in this context directory
|
749
704
|
sig { params(ref: ::String).returns(::Spoom::ExecResult) }
|
750
705
|
def git_checkout!(ref: T.unsafe(nil)); end
|
751
706
|
|
@@ -753,7 +708,6 @@ module Spoom::Context::Git
|
|
753
708
|
# : (String branch_name, ?ref: String?) -> ExecResult
|
754
709
|
#
|
755
710
|
# source://spoom//lib/spoom/context/git.rb#63
|
756
|
-
# Run `git checkout -b <branch-name> <ref>` in this context directory
|
757
711
|
sig { params(branch_name: ::String, ref: T.nilable(::String)).returns(::Spoom::ExecResult) }
|
758
712
|
def git_checkout_new_branch!(branch_name, ref: T.unsafe(nil)); end
|
759
713
|
|
@@ -761,7 +715,6 @@ module Spoom::Context::Git
|
|
761
715
|
# : (?message: String, ?time: Time, ?allow_empty: bool) -> ExecResult
|
762
716
|
#
|
763
717
|
# source://spoom//lib/spoom/context/git.rb#73
|
764
|
-
# Run `git add . && git commit` in this context directory
|
765
718
|
sig { params(message: ::String, time: ::Time, allow_empty: T::Boolean).returns(::Spoom::ExecResult) }
|
766
719
|
def git_commit!(message: T.unsafe(nil), time: T.unsafe(nil), allow_empty: T.unsafe(nil)); end
|
767
720
|
|
@@ -769,7 +722,6 @@ module Spoom::Context::Git
|
|
769
722
|
# : -> String?
|
770
723
|
#
|
771
724
|
# source://spoom//lib/spoom/context/git.rb#84
|
772
|
-
# Get the current git branch in this context directory
|
773
725
|
sig { returns(T.nilable(::String)) }
|
774
726
|
def git_current_branch; end
|
775
727
|
|
@@ -777,7 +729,6 @@ module Spoom::Context::Git
|
|
777
729
|
# : (*String arg) -> ExecResult
|
778
730
|
#
|
779
731
|
# source://spoom//lib/spoom/context/git.rb#93
|
780
|
-
# Run `git diff` in this context directory
|
781
732
|
sig { params(arg: ::String).returns(::Spoom::ExecResult) }
|
782
733
|
def git_diff(*arg); end
|
783
734
|
|
@@ -788,9 +739,6 @@ module Spoom::Context::Git
|
|
788
739
|
# : (?branch: String?) -> ExecResult
|
789
740
|
#
|
790
741
|
# source://spoom//lib/spoom/context/git.rb#47
|
791
|
-
# Run `git init` in this context directory
|
792
|
-
# Warning: passing a branch will run `git init -b <branch>` which is only available in git 2.28+.
|
793
|
-
# In older versions, use `git_init!` followed by `git("checkout -b <branch>")`.
|
794
742
|
sig { params(branch: T.nilable(::String)).returns(::Spoom::ExecResult) }
|
795
743
|
def git_init!(branch: T.unsafe(nil)); end
|
796
744
|
|
@@ -798,7 +746,6 @@ module Spoom::Context::Git
|
|
798
746
|
# : (?short_sha: bool) -> Spoom::Git::Commit?
|
799
747
|
#
|
800
748
|
# source://spoom//lib/spoom/context/git.rb#99
|
801
|
-
# Get the last commit in the currently checked out branch
|
802
749
|
sig { params(short_sha: T::Boolean).returns(T.nilable(::Spoom::Git::Commit)) }
|
803
750
|
def git_last_commit(short_sha: T.unsafe(nil)); end
|
804
751
|
|
@@ -812,7 +759,6 @@ module Spoom::Context::Git
|
|
812
759
|
# : (String remote, String ref, ?force: bool) -> ExecResult
|
813
760
|
#
|
814
761
|
# source://spoom//lib/spoom/context/git.rb#116
|
815
|
-
# Run `git push <remote> <ref>` in this context directory
|
816
762
|
sig { params(remote: ::String, ref: ::String, force: T::Boolean).returns(::Spoom::ExecResult) }
|
817
763
|
def git_push!(remote, ref, force: T.unsafe(nil)); end
|
818
764
|
|
@@ -828,7 +774,6 @@ module Spoom::Context::Git
|
|
828
774
|
# @return [Boolean]
|
829
775
|
#
|
830
776
|
# source://spoom//lib/spoom/context/git.rb#127
|
831
|
-
# Is there uncommitted changes in this context directory?
|
832
777
|
sig { params(path: ::String).returns(T::Boolean) }
|
833
778
|
def git_workdir_clean?(path: T.unsafe(nil)); end
|
834
779
|
end
|
@@ -845,7 +790,6 @@ module Spoom::Context::Sorbet
|
|
845
790
|
# @return [Boolean]
|
846
791
|
#
|
847
792
|
# source://spoom//lib/spoom/context/sorbet.rb#106
|
848
|
-
# Does this context has a `sorbet/config` file?
|
849
793
|
sig { returns(T::Boolean) }
|
850
794
|
def has_sorbet_config?; end
|
851
795
|
|
@@ -853,7 +797,6 @@ module Spoom::Context::Sorbet
|
|
853
797
|
# : (String relative_path) -> String?
|
854
798
|
#
|
855
799
|
# source://spoom//lib/spoom/context/sorbet.rb#129
|
856
|
-
# Read the strictness sigil from the file at `relative_path` (returns `nil` if no sigil)
|
857
800
|
sig { params(relative_path: ::String).returns(T.nilable(::String)) }
|
858
801
|
def read_file_strictness(relative_path); end
|
859
802
|
|
@@ -861,7 +804,6 @@ module Spoom::Context::Sorbet
|
|
861
804
|
# : -> String
|
862
805
|
#
|
863
806
|
# source://spoom//lib/spoom/context/sorbet.rb#117
|
864
|
-
# Read the contents of `sorbet/config` in this context directory
|
865
807
|
sig { returns(::String) }
|
866
808
|
def read_sorbet_config; end
|
867
809
|
|
@@ -875,7 +817,6 @@ module Spoom::Context::Sorbet
|
|
875
817
|
# : -> Spoom::Git::Commit?
|
876
818
|
#
|
877
819
|
# source://spoom//lib/spoom/context/sorbet.rb#135
|
878
|
-
# Get the commit introducing the `sorbet/config` file
|
879
820
|
sig { returns(T.nilable(::Spoom::Git::Commit)) }
|
880
821
|
def sorbet_intro_commit; end
|
881
822
|
|
@@ -883,7 +824,6 @@ module Spoom::Context::Sorbet
|
|
883
824
|
# : -> Spoom::Git::Commit?
|
884
825
|
#
|
885
826
|
# source://spoom//lib/spoom/context/sorbet.rb#147
|
886
|
-
# Get the commit removing the `sorbet/config` file
|
887
827
|
sig { returns(T.nilable(::Spoom::Git::Commit)) }
|
888
828
|
def sorbet_removal_commit; end
|
889
829
|
|
@@ -891,7 +831,6 @@ module Spoom::Context::Sorbet
|
|
891
831
|
# : (*String arg, ?sorbet_bin: String?, ?capture_err: bool) -> ExecResult
|
892
832
|
#
|
893
833
|
# source://spoom//lib/spoom/context/sorbet.rb#14
|
894
|
-
# Run `bundle exec srb` in this context directory
|
895
834
|
sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) }
|
896
835
|
def srb(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end
|
897
836
|
|
@@ -899,7 +838,6 @@ module Spoom::Context::Sorbet
|
|
899
838
|
# : (?with_config: Spoom::Sorbet::Config?, ?include_rbis: bool) -> Array[String]
|
900
839
|
#
|
901
840
|
# source://spoom//lib/spoom/context/sorbet.rb#58
|
902
|
-
# List all files typechecked by Sorbet from its `config`
|
903
841
|
sig { params(with_config: T.nilable(::Spoom::Sorbet::Config), include_rbis: T::Boolean).returns(T::Array[::String]) }
|
904
842
|
def srb_files(with_config: T.unsafe(nil), include_rbis: T.unsafe(nil)); end
|
905
843
|
|
@@ -907,7 +845,6 @@ module Spoom::Context::Sorbet
|
|
907
845
|
# : (String strictness, ?with_config: Spoom::Sorbet::Config?, ?include_rbis: bool) -> Array[String]
|
908
846
|
#
|
909
847
|
# source://spoom//lib/spoom/context/sorbet.rb#91
|
910
|
-
# List all files typechecked by Sorbet from its `config` that matches `strictness`
|
911
848
|
sig do
|
912
849
|
params(
|
913
850
|
strictness: ::String,
|
@@ -945,7 +882,6 @@ module Spoom::Context::Sorbet
|
|
945
882
|
# : (String contents, ?append: bool) -> void
|
946
883
|
#
|
947
884
|
# source://spoom//lib/spoom/context/sorbet.rb#123
|
948
|
-
# Set the `contents` of `sorbet/config` in this context directory
|
949
885
|
sig { params(contents: ::String, append: T::Boolean).void }
|
950
886
|
def write_sorbet_config!(contents, append: T.unsafe(nil)); end
|
951
887
|
end
|
@@ -1001,7 +937,6 @@ class Spoom::Coverage::Cards::Card < ::Spoom::Coverage::Template
|
|
1001
937
|
# : String?
|
1002
938
|
#
|
1003
939
|
# source://spoom//lib/spoom/coverage/report.rb#94
|
1004
|
-
# @return [String, nil]
|
1005
940
|
def body; end
|
1006
941
|
|
1007
942
|
# : String?
|
@@ -1011,6 +946,8 @@ class Spoom::Coverage::Cards::Card < ::Spoom::Coverage::Template
|
|
1011
946
|
def title; end
|
1012
947
|
end
|
1013
948
|
|
949
|
+
# : String
|
950
|
+
#
|
1014
951
|
# source://spoom//lib/spoom/coverage/report.rb#91
|
1015
952
|
Spoom::Coverage::Cards::Card::TEMPLATE = T.let(T.unsafe(nil), String)
|
1016
953
|
|
@@ -1041,7 +978,7 @@ class Spoom::Coverage::Cards::Erb < ::Spoom::Coverage::Cards::Card
|
|
1041
978
|
def html; end
|
1042
979
|
end
|
1043
980
|
|
1044
|
-
# source://spoom//lib/spoom/coverage/report.rb#
|
981
|
+
# source://spoom//lib/spoom/coverage/report.rb#150
|
1045
982
|
class Spoom::Coverage::Cards::Map < ::Spoom::Coverage::Cards::Card
|
1046
983
|
# : (file_tree: FileTree, nodes_strictnesses: Hash[FileTree::Node, String?], nodes_strictness_scores: Hash[FileTree::Node, Float], ?title: String) -> void
|
1047
984
|
#
|
@@ -1094,10 +1031,12 @@ class Spoom::Coverage::Cards::Snapshot < ::Spoom::Coverage::Cards::Card
|
|
1094
1031
|
def snapshot; end
|
1095
1032
|
end
|
1096
1033
|
|
1034
|
+
# : String
|
1035
|
+
#
|
1097
1036
|
# source://spoom//lib/spoom/coverage/report.rb#123
|
1098
1037
|
Spoom::Coverage::Cards::Snapshot::TEMPLATE = T.let(T.unsafe(nil), String)
|
1099
1038
|
|
1100
|
-
# source://spoom//lib/spoom/coverage/report.rb#
|
1039
|
+
# source://spoom//lib/spoom/coverage/report.rb#214
|
1101
1040
|
class Spoom::Coverage::Cards::SorbetIntro < ::Spoom::Coverage::Cards::Erb
|
1102
1041
|
# : (?sorbet_intro_commit: String?, ?sorbet_intro_date: Time?) -> void
|
1103
1042
|
#
|
@@ -1114,7 +1053,7 @@ class Spoom::Coverage::Cards::SorbetIntro < ::Spoom::Coverage::Cards::Erb
|
|
1114
1053
|
def erb; end
|
1115
1054
|
end
|
1116
1055
|
|
1117
|
-
# source://spoom//lib/spoom/coverage/report.rb#
|
1056
|
+
# source://spoom//lib/spoom/coverage/report.rb#165
|
1118
1057
|
class Spoom::Coverage::Cards::Timeline < ::Spoom::Coverage::Cards::Card
|
1119
1058
|
# : (title: String, timeline: D3::Timeline) -> void
|
1120
1059
|
#
|
@@ -1125,7 +1064,7 @@ class Spoom::Coverage::Cards::Timeline < ::Spoom::Coverage::Cards::Card
|
|
1125
1064
|
def initialize(title:, timeline:); end
|
1126
1065
|
end
|
1127
1066
|
|
1128
|
-
# source://spoom//lib/spoom/coverage/report.rb#
|
1067
|
+
# source://spoom//lib/spoom/coverage/report.rb#178
|
1129
1068
|
class Spoom::Coverage::Cards::Timeline::Calls < ::Spoom::Coverage::Cards::Timeline
|
1130
1069
|
# : (snapshots: Array[Coverage::Snapshot], ?title: String) -> void
|
1131
1070
|
#
|
@@ -1136,7 +1075,7 @@ class Spoom::Coverage::Cards::Timeline::Calls < ::Spoom::Coverage::Cards::Timeli
|
|
1136
1075
|
def initialize(snapshots:, title: T.unsafe(nil)); end
|
1137
1076
|
end
|
1138
1077
|
|
1139
|
-
# source://spoom//lib/spoom/coverage/report.rb#
|
1078
|
+
# source://spoom//lib/spoom/coverage/report.rb#192
|
1140
1079
|
class Spoom::Coverage::Cards::Timeline::RBIs < ::Spoom::Coverage::Cards::Timeline
|
1141
1080
|
# : (snapshots: Array[Coverage::Snapshot], ?title: String) -> void
|
1142
1081
|
#
|
@@ -1147,7 +1086,7 @@ class Spoom::Coverage::Cards::Timeline::RBIs < ::Spoom::Coverage::Cards::Timelin
|
|
1147
1086
|
def initialize(snapshots:, title: T.unsafe(nil)); end
|
1148
1087
|
end
|
1149
1088
|
|
1150
|
-
# source://spoom//lib/spoom/coverage/report.rb#
|
1089
|
+
# source://spoom//lib/spoom/coverage/report.rb#206
|
1151
1090
|
class Spoom::Coverage::Cards::Timeline::Runtimes < ::Spoom::Coverage::Cards::Timeline
|
1152
1091
|
# : (snapshots: Array[Coverage::Snapshot], ?title: String) -> void
|
1153
1092
|
#
|
@@ -1158,7 +1097,7 @@ class Spoom::Coverage::Cards::Timeline::Runtimes < ::Spoom::Coverage::Cards::Tim
|
|
1158
1097
|
def initialize(snapshots:, title: T.unsafe(nil)); end
|
1159
1098
|
end
|
1160
1099
|
|
1161
|
-
# source://spoom//lib/spoom/coverage/report.rb#
|
1100
|
+
# source://spoom//lib/spoom/coverage/report.rb#171
|
1162
1101
|
class Spoom::Coverage::Cards::Timeline::Sigils < ::Spoom::Coverage::Cards::Timeline
|
1163
1102
|
# : (snapshots: Array[Coverage::Snapshot], ?title: String) -> void
|
1164
1103
|
#
|
@@ -1169,7 +1108,7 @@ class Spoom::Coverage::Cards::Timeline::Sigils < ::Spoom::Coverage::Cards::Timel
|
|
1169
1108
|
def initialize(snapshots:, title: T.unsafe(nil)); end
|
1170
1109
|
end
|
1171
1110
|
|
1172
|
-
# source://spoom//lib/spoom/coverage/report.rb#
|
1111
|
+
# source://spoom//lib/spoom/coverage/report.rb#185
|
1173
1112
|
class Spoom::Coverage::Cards::Timeline::Sigs < ::Spoom::Coverage::Cards::Timeline
|
1174
1113
|
# : (snapshots: Array[Coverage::Snapshot], ?title: String) -> void
|
1175
1114
|
#
|
@@ -1180,7 +1119,7 @@ class Spoom::Coverage::Cards::Timeline::Sigs < ::Spoom::Coverage::Cards::Timelin
|
|
1180
1119
|
def initialize(snapshots:, title: T.unsafe(nil)); end
|
1181
1120
|
end
|
1182
1121
|
|
1183
|
-
# source://spoom//lib/spoom/coverage/report.rb#
|
1122
|
+
# source://spoom//lib/spoom/coverage/report.rb#199
|
1184
1123
|
class Spoom::Coverage::Cards::Timeline::Versions < ::Spoom::Coverage::Cards::Timeline
|
1185
1124
|
# : (snapshots: Array[Coverage::Snapshot], ?title: String) -> void
|
1186
1125
|
#
|
@@ -1299,7 +1238,7 @@ class Spoom::Coverage::D3::CircleMap < ::Spoom::Coverage::D3::Base
|
|
1299
1238
|
end
|
1300
1239
|
end
|
1301
1240
|
|
1302
|
-
# source://spoom//lib/spoom/coverage/d3/circle_map.rb#
|
1241
|
+
# source://spoom//lib/spoom/coverage/d3/circle_map.rb#147
|
1303
1242
|
class Spoom::Coverage::D3::CircleMap::Sigils < ::Spoom::Coverage::D3::CircleMap
|
1304
1243
|
# : (String id, FileTree file_tree, Hash[FileTree::Node, String?] nodes_strictnesses, Hash[FileTree::Node, Float] nodes_scores) -> void
|
1305
1244
|
#
|
@@ -1372,7 +1311,7 @@ class Spoom::Coverage::D3::Pie < ::Spoom::Coverage::D3::Base
|
|
1372
1311
|
end
|
1373
1312
|
end
|
1374
1313
|
|
1375
|
-
# source://spoom//lib/spoom/coverage/d3/pie.rb#
|
1314
|
+
# source://spoom//lib/spoom/coverage/d3/pie.rb#138
|
1376
1315
|
class Spoom::Coverage::D3::Pie::Calls < ::Spoom::Coverage::D3::Pie
|
1377
1316
|
# : (String id, String title, Snapshot snapshot) -> void
|
1378
1317
|
#
|
@@ -1389,7 +1328,7 @@ class Spoom::Coverage::D3::Pie::Calls < ::Spoom::Coverage::D3::Pie
|
|
1389
1328
|
def tooltip; end
|
1390
1329
|
end
|
1391
1330
|
|
1392
|
-
# source://spoom//lib/spoom/coverage/d3/pie.rb#
|
1331
|
+
# source://spoom//lib/spoom/coverage/d3/pie.rb#121
|
1393
1332
|
class Spoom::Coverage::D3::Pie::Sigils < ::Spoom::Coverage::D3::Pie
|
1394
1333
|
# : (String id, String title, Snapshot snapshot) -> void
|
1395
1334
|
#
|
@@ -1406,7 +1345,7 @@ class Spoom::Coverage::D3::Pie::Sigils < ::Spoom::Coverage::D3::Pie
|
|
1406
1345
|
def tooltip; end
|
1407
1346
|
end
|
1408
1347
|
|
1409
|
-
# source://spoom//lib/spoom/coverage/d3/pie.rb#
|
1348
|
+
# source://spoom//lib/spoom/coverage/d3/pie.rb#155
|
1410
1349
|
class Spoom::Coverage::D3::Pie::Sigs < ::Spoom::Coverage::D3::Pie
|
1411
1350
|
# : (String id, String title, Snapshot snapshot) -> void
|
1412
1351
|
#
|
@@ -1506,7 +1445,7 @@ class Spoom::Coverage::D3::Timeline < ::Spoom::Coverage::D3::Base
|
|
1506
1445
|
end
|
1507
1446
|
end
|
1508
1447
|
|
1509
|
-
# source://spoom//lib/spoom/coverage/d3/timeline.rb#
|
1448
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#447
|
1510
1449
|
class Spoom::Coverage::D3::Timeline::Calls < ::Spoom::Coverage::D3::Timeline::Stacked
|
1511
1450
|
# : (String id, Array[Snapshot] snapshots) -> void
|
1512
1451
|
#
|
@@ -1523,7 +1462,7 @@ class Spoom::Coverage::D3::Timeline::Calls < ::Spoom::Coverage::D3::Timeline::St
|
|
1523
1462
|
def tooltip; end
|
1524
1463
|
end
|
1525
1464
|
|
1526
|
-
# source://spoom//lib/spoom/coverage/d3/timeline.rb#
|
1465
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#502
|
1527
1466
|
class Spoom::Coverage::D3::Timeline::RBIs < ::Spoom::Coverage::D3::Timeline::Stacked
|
1528
1467
|
# : (String id, Array[Snapshot] snapshots) -> void
|
1529
1468
|
#
|
@@ -1558,7 +1497,7 @@ class Spoom::Coverage::D3::Timeline::RBIs < ::Spoom::Coverage::D3::Timeline::Sta
|
|
1558
1497
|
def tooltip; end
|
1559
1498
|
end
|
1560
1499
|
|
1561
|
-
# source://spoom//lib/spoom/coverage/d3/timeline.rb#
|
1500
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#280
|
1562
1501
|
class Spoom::Coverage::D3::Timeline::Runtimes < ::Spoom::Coverage::D3::Timeline
|
1563
1502
|
# : (String id, Array[Snapshot] snapshots) -> void
|
1564
1503
|
#
|
@@ -1581,7 +1520,7 @@ class Spoom::Coverage::D3::Timeline::Runtimes < ::Spoom::Coverage::D3::Timeline
|
|
1581
1520
|
def tooltip; end
|
1582
1521
|
end
|
1583
1522
|
|
1584
|
-
# source://spoom//lib/spoom/coverage/d3/timeline.rb#
|
1523
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#421
|
1585
1524
|
class Spoom::Coverage::D3::Timeline::Sigils < ::Spoom::Coverage::D3::Timeline::Stacked
|
1586
1525
|
# : (String id, Array[Snapshot] snapshots) -> void
|
1587
1526
|
#
|
@@ -1598,7 +1537,7 @@ class Spoom::Coverage::D3::Timeline::Sigils < ::Spoom::Coverage::D3::Timeline::S
|
|
1598
1537
|
def tooltip; end
|
1599
1538
|
end
|
1600
1539
|
|
1601
|
-
# source://spoom//lib/spoom/coverage/d3/timeline.rb#
|
1540
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#473
|
1602
1541
|
class Spoom::Coverage::D3::Timeline::Sigs < ::Spoom::Coverage::D3::Timeline::Stacked
|
1603
1542
|
# : (String id, Array[Snapshot] snapshots) -> void
|
1604
1543
|
#
|
@@ -1640,7 +1579,7 @@ class Spoom::Coverage::D3::Timeline::Stacked < ::Spoom::Coverage::D3::Timeline
|
|
1640
1579
|
def script; end
|
1641
1580
|
end
|
1642
1581
|
|
1643
|
-
# source://spoom//lib/spoom/coverage/d3/timeline.rb#
|
1582
|
+
# source://spoom//lib/spoom/coverage/d3/timeline.rb#230
|
1644
1583
|
class Spoom::Coverage::D3::Timeline::Versions < ::Spoom::Coverage::D3::Timeline
|
1645
1584
|
# : (String id, Array[Snapshot] snapshots) -> void
|
1646
1585
|
#
|
@@ -1726,10 +1665,12 @@ class Spoom::Coverage::Page < ::Spoom::Coverage::Template
|
|
1726
1665
|
def title; end
|
1727
1666
|
end
|
1728
1667
|
|
1668
|
+
# : String
|
1669
|
+
#
|
1729
1670
|
# source://spoom//lib/spoom/coverage/report.rb#43
|
1730
1671
|
Spoom::Coverage::Page::TEMPLATE = T.let(T.unsafe(nil), String)
|
1731
1672
|
|
1732
|
-
# source://spoom//lib/spoom/coverage/report.rb#
|
1673
|
+
# source://spoom//lib/spoom/coverage/report.rb#234
|
1733
1674
|
class Spoom::Coverage::Report < ::Spoom::Coverage::Page
|
1734
1675
|
# : (project_name: String, palette: D3::ColorPalette, snapshots: Array[Snapshot], file_tree: FileTree, nodes_strictnesses: Hash[FileTree::Node, String?], nodes_strictness_scores: Hash[FileTree::Node, Float], ?sorbet_intro_commit: String?, ?sorbet_intro_date: Time?) -> void
|
1735
1676
|
#
|
@@ -1820,7 +1761,7 @@ end
|
|
1820
1761
|
# source://spoom//lib/spoom/coverage/snapshot.rb#28
|
1821
1762
|
Spoom::Coverage::Snapshot::STRICTNESSES = T.let(T.unsafe(nil), Array)
|
1822
1763
|
|
1823
|
-
# source://spoom//lib/spoom/coverage/snapshot.rb#
|
1764
|
+
# source://spoom//lib/spoom/coverage/snapshot.rb#91
|
1824
1765
|
class Spoom::Coverage::SnapshotPrinter < ::Spoom::Printer
|
1825
1766
|
# : (Snapshot snapshot) -> void
|
1826
1767
|
#
|
@@ -1855,7 +1796,6 @@ class Spoom::Coverage::Template
|
|
1855
1796
|
# @return [Template] a new instance of Template
|
1856
1797
|
#
|
1857
1798
|
# source://spoom//lib/spoom/coverage/report.rb#17
|
1858
|
-
# Create a new template from an Erb file path
|
1859
1799
|
sig { params(template: ::String).void }
|
1860
1800
|
def initialize(template:); end
|
1861
1801
|
|
@@ -1883,13 +1823,13 @@ module Spoom::Deadcode
|
|
1883
1823
|
class << self
|
1884
1824
|
# : (Context context) -> Array[singleton(Plugins::Base)]
|
1885
1825
|
#
|
1886
|
-
# source://spoom//lib/spoom/deadcode/plugins.rb#
|
1826
|
+
# source://spoom//lib/spoom/deadcode/plugins.rb#67
|
1887
1827
|
sig { params(context: ::Spoom::Context).returns(T::Array[T.class_of(Spoom::Deadcode::Plugins::Base)]) }
|
1888
1828
|
def load_custom_plugins(context); end
|
1889
1829
|
|
1890
1830
|
# : (Context context) -> Set[singleton(Plugins::Base)]
|
1891
1831
|
#
|
1892
|
-
# source://spoom//lib/spoom/deadcode/plugins.rb#
|
1832
|
+
# source://spoom//lib/spoom/deadcode/plugins.rb#53
|
1893
1833
|
sig { params(context: ::Spoom::Context).returns(T::Set[T.class_of(Spoom::Deadcode::Plugins::Base)]) }
|
1894
1834
|
def plugins_from_gemfile_lock(context); end
|
1895
1835
|
end
|
@@ -1922,7 +1862,6 @@ class Spoom::Deadcode::Definition < ::T::Struct
|
|
1922
1862
|
# @return [Boolean]
|
1923
1863
|
#
|
1924
1864
|
# source://spoom//lib/spoom/deadcode/definition.rb#71
|
1925
|
-
# Status
|
1926
1865
|
sig { returns(T::Boolean) }
|
1927
1866
|
def alive?; end
|
1928
1867
|
|
@@ -1931,7 +1870,6 @@ class Spoom::Deadcode::Definition < ::T::Struct
|
|
1931
1870
|
# @return [Boolean]
|
1932
1871
|
#
|
1933
1872
|
# source://spoom//lib/spoom/deadcode/definition.rb#39
|
1934
|
-
# Kind
|
1935
1873
|
sig { returns(T::Boolean) }
|
1936
1874
|
def attr_reader?; end
|
1937
1875
|
|
@@ -2000,7 +1938,6 @@ class Spoom::Deadcode::Definition < ::T::Struct
|
|
2000
1938
|
# : (*untyped args) -> String
|
2001
1939
|
#
|
2002
1940
|
# source://spoom//lib/spoom/deadcode/definition.rb#98
|
2003
|
-
# Utils
|
2004
1941
|
sig { params(args: T.untyped).returns(::String) }
|
2005
1942
|
def to_json(*args); end
|
2006
1943
|
|
@@ -2033,7 +1970,7 @@ end
|
|
2033
1970
|
|
2034
1971
|
# Custom engine to handle ERB templates as used by Rails
|
2035
1972
|
#
|
2036
|
-
# source://spoom//lib/spoom/deadcode/erb.rb#
|
1973
|
+
# source://spoom//lib/spoom/deadcode/erb.rb#29
|
2037
1974
|
class Spoom::Deadcode::ERB < ::Erubi::Engine
|
2038
1975
|
# : (untyped input, ?untyped properties) -> void
|
2039
1976
|
#
|
@@ -2122,7 +2059,6 @@ class Spoom::Deadcode::Index
|
|
2122
2059
|
# : (String name) -> Array[Definition]
|
2123
2060
|
#
|
2124
2061
|
# source://spoom//lib/spoom/deadcode/index.rb#210
|
2125
|
-
# Utils
|
2126
2062
|
sig { params(name: ::String).returns(T::Array[::Spoom::Deadcode::Definition]) }
|
2127
2063
|
def definitions_for_name(name); end
|
2128
2064
|
|
@@ -2132,8 +2068,6 @@ class Spoom::Deadcode::Index
|
|
2132
2068
|
# : -> void
|
2133
2069
|
#
|
2134
2070
|
# source://spoom//lib/spoom/deadcode/index.rb#118
|
2135
|
-
# Mark all definitions having a reference of the same name as `alive`
|
2136
|
-
# To be called once all the files have been indexed and all the definitions and references discovered.
|
2137
2071
|
sig { void }
|
2138
2072
|
def finalize!; end
|
2139
2073
|
|
@@ -2152,7 +2086,6 @@ class Spoom::Deadcode::Index
|
|
2152
2086
|
# : (String file, ?plugins: Array[Plugins::Base]) -> void
|
2153
2087
|
#
|
2154
2088
|
# source://spoom//lib/spoom/deadcode/index.rb#35
|
2155
|
-
# Indexing
|
2156
2089
|
sig { params(file: ::String, plugins: T::Array[::Spoom::Deadcode::Plugins::Base]).void }
|
2157
2090
|
def index_file(file, plugins: T.unsafe(nil)); end
|
2158
2091
|
|
@@ -2187,7 +2120,7 @@ class Spoom::Deadcode::Index
|
|
2187
2120
|
def references; end
|
2188
2121
|
end
|
2189
2122
|
|
2190
|
-
# source://spoom//lib/spoom/deadcode/index.rb#
|
2123
|
+
# source://spoom//lib/spoom/deadcode/index.rb#7
|
2191
2124
|
class Spoom::Deadcode::Index::Error < ::Spoom::Error
|
2192
2125
|
# : (String message, parent: Exception) -> void
|
2193
2126
|
#
|
@@ -2198,7 +2131,7 @@ class Spoom::Deadcode::Index::Error < ::Spoom::Error
|
|
2198
2131
|
def initialize(message, parent:); end
|
2199
2132
|
end
|
2200
2133
|
|
2201
|
-
# source://spoom//lib/spoom/deadcode/indexer.rb#
|
2134
|
+
# source://spoom//lib/spoom/deadcode/indexer.rb#6
|
2202
2135
|
class Spoom::Deadcode::Indexer < ::Spoom::Visitor
|
2203
2136
|
# : (String path, Index index, ?plugins: Array[Plugins::Base]) -> void
|
2204
2137
|
#
|
@@ -2233,13 +2166,15 @@ class Spoom::Deadcode::Indexer < ::Spoom::Visitor
|
|
2233
2166
|
def visit_call_node(node); end
|
2234
2167
|
end
|
2235
2168
|
|
2236
|
-
#
|
2169
|
+
# : Set[singleton(Plugins::Base)]
|
2170
|
+
#
|
2171
|
+
# source://spoom//lib/spoom/deadcode/plugins.rb#33
|
2237
2172
|
Spoom::Deadcode::PLUGINS_FOR_GEM = T.let(T.unsafe(nil), Hash)
|
2238
2173
|
|
2239
2174
|
# source://spoom//lib/spoom/deadcode/plugins/base.rb#8
|
2240
2175
|
module Spoom::Deadcode::Plugins; end
|
2241
2176
|
|
2242
|
-
# source://spoom//lib/spoom/deadcode/plugins/action_mailer.rb#
|
2177
|
+
# source://spoom//lib/spoom/deadcode/plugins/action_mailer.rb#7
|
2243
2178
|
class Spoom::Deadcode::Plugins::ActionMailer < ::Spoom::Deadcode::Plugins::Base
|
2244
2179
|
# : (Send send) -> void
|
2245
2180
|
#
|
@@ -2261,13 +2196,13 @@ end
|
|
2261
2196
|
class Spoom::Deadcode::Plugins::ActionPack < ::Spoom::Deadcode::Plugins::Base
|
2262
2197
|
# : (Model::Method definition) -> void
|
2263
2198
|
#
|
2264
|
-
# source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#
|
2199
|
+
# source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#27
|
2265
2200
|
sig { override.params(definition: ::Spoom::Model::Method).void }
|
2266
2201
|
def on_define_method(definition); end
|
2267
2202
|
|
2268
2203
|
# : (Send send) -> void
|
2269
2204
|
#
|
2270
|
-
# source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#
|
2205
|
+
# source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#36
|
2271
2206
|
sig { override.params(send: ::Spoom::Deadcode::Send).void }
|
2272
2207
|
def on_send(send); end
|
2273
2208
|
end
|
@@ -2291,18 +2226,22 @@ end
|
|
2291
2226
|
class Spoom::Deadcode::Plugins::ActiveRecord < ::Spoom::Deadcode::Plugins::Base
|
2292
2227
|
# : (Send send) -> void
|
2293
2228
|
#
|
2294
|
-
# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#
|
2229
|
+
# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#64
|
2295
2230
|
sig { override.params(send: ::Spoom::Deadcode::Send).void }
|
2296
2231
|
def on_send(send); end
|
2297
2232
|
end
|
2298
2233
|
|
2299
|
-
#
|
2234
|
+
# : Array[String]
|
2235
|
+
#
|
2236
|
+
# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#56
|
2300
2237
|
Spoom::Deadcode::Plugins::ActiveRecord::ARRAY_METHODS = T.let(T.unsafe(nil), Array)
|
2301
2238
|
|
2302
2239
|
# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#18
|
2303
2240
|
Spoom::Deadcode::Plugins::ActiveRecord::CALLBACKS = T.let(T.unsafe(nil), Array)
|
2304
2241
|
|
2305
|
-
#
|
2242
|
+
# : Array[String]
|
2243
|
+
#
|
2244
|
+
# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#44
|
2306
2245
|
Spoom::Deadcode::Plugins::ActiveRecord::CRUD_METHODS = T.let(T.unsafe(nil), Array)
|
2307
2246
|
|
2308
2247
|
# source://spoom//lib/spoom/deadcode/plugins/active_support.rb#7
|
@@ -2314,6 +2253,8 @@ class Spoom::Deadcode::Plugins::ActiveSupport < ::Spoom::Deadcode::Plugins::Base
|
|
2314
2253
|
def on_send(send); end
|
2315
2254
|
end
|
2316
2255
|
|
2256
|
+
# : Array[String]
|
2257
|
+
#
|
2317
2258
|
# source://spoom//lib/spoom/deadcode/plugins/active_support.rb#19
|
2318
2259
|
Spoom::Deadcode::Plugins::ActiveSupport::SETUP_AND_TEARDOWN_METHODS = T.let(T.unsafe(nil), Array)
|
2319
2260
|
|
@@ -2341,7 +2282,6 @@ class Spoom::Deadcode::Plugins::Base
|
|
2341
2282
|
# : (Model::Attr definition) -> void
|
2342
2283
|
#
|
2343
2284
|
# source://spoom//lib/spoom/deadcode/plugins/base.rb#155
|
2344
|
-
# Do not override this method, use `on_define_accessor` instead.
|
2345
2285
|
sig { params(definition: ::Spoom::Model::Attr).void }
|
2346
2286
|
def internal_on_define_accessor(definition); end
|
2347
2287
|
|
@@ -2349,7 +2289,6 @@ class Spoom::Deadcode::Plugins::Base
|
|
2349
2289
|
# : (Model::Class definition) -> void
|
2350
2290
|
#
|
2351
2291
|
# source://spoom//lib/spoom/deadcode/plugins/base.rb#179
|
2352
|
-
# Do not override this method, use `on_define_class` instead.
|
2353
2292
|
sig { params(definition: ::Spoom::Model::Class).void }
|
2354
2293
|
def internal_on_define_class(definition); end
|
2355
2294
|
|
@@ -2357,7 +2296,6 @@ class Spoom::Deadcode::Plugins::Base
|
|
2357
2296
|
# : (Model::Constant definition) -> void
|
2358
2297
|
#
|
2359
2298
|
# source://spoom//lib/spoom/deadcode/plugins/base.rb#209
|
2360
|
-
# Do not override this method, use `on_define_constant` instead.
|
2361
2299
|
sig { params(definition: ::Spoom::Model::Constant).void }
|
2362
2300
|
def internal_on_define_constant(definition); end
|
2363
2301
|
|
@@ -2365,7 +2303,6 @@ class Spoom::Deadcode::Plugins::Base
|
|
2365
2303
|
# : (Model::Method definition) -> void
|
2366
2304
|
#
|
2367
2305
|
# source://spoom//lib/spoom/deadcode/plugins/base.rb#235
|
2368
|
-
# Do not override this method, use `on_define_method` instead.
|
2369
2306
|
sig { params(definition: ::Spoom::Model::Method).void }
|
2370
2307
|
def internal_on_define_method(definition); end
|
2371
2308
|
|
@@ -2373,7 +2310,6 @@ class Spoom::Deadcode::Plugins::Base
|
|
2373
2310
|
# : (Model::Module definition) -> void
|
2374
2311
|
#
|
2375
2312
|
# source://spoom//lib/spoom/deadcode/plugins/base.rb#261
|
2376
|
-
# Do not override this method, use `on_define_module` instead.
|
2377
2313
|
sig { params(definition: ::Spoom::Model::Module).void }
|
2378
2314
|
def internal_on_define_module(definition); end
|
2379
2315
|
|
@@ -2393,17 +2329,6 @@ class Spoom::Deadcode::Plugins::Base
|
|
2393
2329
|
# : (Model::Attr definition) -> void
|
2394
2330
|
#
|
2395
2331
|
# source://spoom//lib/spoom/deadcode/plugins/base.rb#149
|
2396
|
-
# Called when an accessor is defined.
|
2397
|
-
# Will be called when the indexer processes a `attr_reader`, `attr_writer` or `attr_accessor` node.
|
2398
|
-
# Note that when this method is called, the definition for the node has already been added to the index.
|
2399
|
-
# It is still possible to ignore it from the plugin:
|
2400
|
-
# ~~~rb
|
2401
|
-
# class MyPlugin < Spoom::Deadcode::Plugins::Base
|
2402
|
-
# def on_define_accessor(definition)
|
2403
|
-
# @index.ignore(definition) if symbol_def.name == "foo"
|
2404
|
-
# end
|
2405
|
-
# end
|
2406
|
-
# ~~~
|
2407
2332
|
sig { params(definition: ::Spoom::Model::Attr).void }
|
2408
2333
|
def on_define_accessor(definition); end
|
2409
2334
|
|
@@ -2423,17 +2348,6 @@ class Spoom::Deadcode::Plugins::Base
|
|
2423
2348
|
# : (Model::Class definition) -> void
|
2424
2349
|
#
|
2425
2350
|
# source://spoom//lib/spoom/deadcode/plugins/base.rb#173
|
2426
|
-
# Called when a class is defined.
|
2427
|
-
# Will be called when the indexer processes a `class` node.
|
2428
|
-
# Note that when this method is called, the definition for the node has already been added to the index.
|
2429
|
-
# It is still possible to ignore it from the plugin:
|
2430
|
-
# ~~~rb
|
2431
|
-
# class MyPlugin < Spoom::Deadcode::Plugins::Base
|
2432
|
-
# def on_define_class(definition)
|
2433
|
-
# @index.ignore(definition) if definition.name == "Foo"
|
2434
|
-
# end
|
2435
|
-
# end
|
2436
|
-
# ~~~
|
2437
2351
|
sig { params(definition: ::Spoom::Model::Class).void }
|
2438
2352
|
def on_define_class(definition); end
|
2439
2353
|
|
@@ -2453,17 +2367,6 @@ class Spoom::Deadcode::Plugins::Base
|
|
2453
2367
|
# : (Model::Constant definition) -> void
|
2454
2368
|
#
|
2455
2369
|
# source://spoom//lib/spoom/deadcode/plugins/base.rb#203
|
2456
|
-
# Called when a constant is defined.
|
2457
|
-
# Will be called when the indexer processes a `CONST =` node.
|
2458
|
-
# Note that when this method is called, the definition for the node has already been added to the index.
|
2459
|
-
# It is still possible to ignore it from the plugin:
|
2460
|
-
# ~~~rb
|
2461
|
-
# class MyPlugin < Spoom::Deadcode::Plugins::Base
|
2462
|
-
# def on_define_constant(definition)
|
2463
|
-
# @index.ignore(definition) if definition.name == "FOO"
|
2464
|
-
# end
|
2465
|
-
# end
|
2466
|
-
# ~~~
|
2467
2370
|
sig { params(definition: ::Spoom::Model::Constant).void }
|
2468
2371
|
def on_define_constant(definition); end
|
2469
2372
|
|
@@ -2483,17 +2386,6 @@ class Spoom::Deadcode::Plugins::Base
|
|
2483
2386
|
# : (Model::Method definition) -> void
|
2484
2387
|
#
|
2485
2388
|
# source://spoom//lib/spoom/deadcode/plugins/base.rb#229
|
2486
|
-
# Called when a method is defined.
|
2487
|
-
# Will be called when the indexer processes a `def` or `defs` node.
|
2488
|
-
# Note that when this method is called, the definition for the node has already been added to the index.
|
2489
|
-
# It is still possible to ignore it from the plugin:
|
2490
|
-
# ~~~rb
|
2491
|
-
# class MyPlugin < Spoom::Deadcode::Plugins::Base
|
2492
|
-
# def on_define_method(definition)
|
2493
|
-
# @index.ignore(definition) if definition.name == "foo"
|
2494
|
-
# end
|
2495
|
-
# end
|
2496
|
-
# ~~~
|
2497
2389
|
sig { params(definition: ::Spoom::Model::Method).void }
|
2498
2390
|
def on_define_method(definition); end
|
2499
2391
|
|
@@ -2513,17 +2405,6 @@ class Spoom::Deadcode::Plugins::Base
|
|
2513
2405
|
# : (Model::Module definition) -> void
|
2514
2406
|
#
|
2515
2407
|
# source://spoom//lib/spoom/deadcode/plugins/base.rb#255
|
2516
|
-
# Called when a module is defined.
|
2517
|
-
# Will be called when the indexer processes a `module` node.
|
2518
|
-
# Note that when this method is called, the definition for the node has already been added to the index.
|
2519
|
-
# It is still possible to ignore it from the plugin:
|
2520
|
-
# ~~~rb
|
2521
|
-
# class MyPlugin < Spoom::Deadcode::Plugins::Base
|
2522
|
-
# def on_define_module(definition)
|
2523
|
-
# @index.ignore(definition) if definition.name == "Foo"
|
2524
|
-
# end
|
2525
|
-
# end
|
2526
|
-
# ~~~
|
2527
2408
|
sig { params(definition: ::Spoom::Model::Module).void }
|
2528
2409
|
def on_define_module(definition); end
|
2529
2410
|
|
@@ -2543,17 +2424,6 @@ class Spoom::Deadcode::Plugins::Base
|
|
2543
2424
|
# : (Send send) -> void
|
2544
2425
|
#
|
2545
2426
|
# source://spoom//lib/spoom/deadcode/plugins/base.rb#281
|
2546
|
-
# Called when a send is being processed
|
2547
|
-
# ~~~rb
|
2548
|
-
# class MyPlugin < Spoom::Deadcode::Plugins::Base
|
2549
|
-
# def on_send(send)
|
2550
|
-
# return unless send.name == "dsl_method"
|
2551
|
-
# return if send.args.empty?
|
2552
|
-
# method_name = send.args.first.slice.delete_prefix(":")
|
2553
|
-
# @index.reference_method(method_name, send.node, send.loc)
|
2554
|
-
# end
|
2555
|
-
# end
|
2556
|
-
# ~~~
|
2557
2427
|
sig { params(send: ::Spoom::Deadcode::Send).void }
|
2558
2428
|
def on_send(send); end
|
2559
2429
|
|
@@ -2562,7 +2432,6 @@ class Spoom::Deadcode::Plugins::Base
|
|
2562
2432
|
# : (String name) -> String
|
2563
2433
|
#
|
2564
2434
|
# source://spoom//lib/spoom/deadcode/plugins/base.rb#349
|
2565
|
-
# Plugin utils
|
2566
2435
|
sig { params(name: ::String).returns(::String) }
|
2567
2436
|
def camelize(name); end
|
2568
2437
|
|
@@ -2631,7 +2500,6 @@ class Spoom::Deadcode::Plugins::Base
|
|
2631
2500
|
# @return [Boolean]
|
2632
2501
|
#
|
2633
2502
|
# source://spoom//lib/spoom/deadcode/plugins/base.rb#290
|
2634
|
-
# DSL support
|
2635
2503
|
sig { params(definition: ::Spoom::Model::Namespace, superclass_name: ::String).returns(T::Boolean) }
|
2636
2504
|
def subclass_of?(definition, superclass_name); end
|
2637
2505
|
|
@@ -2652,17 +2520,6 @@ class Spoom::Deadcode::Plugins::Base
|
|
2652
2520
|
# : (*(String | Regexp) names) -> void
|
2653
2521
|
#
|
2654
2522
|
# source://spoom//lib/spoom/deadcode/plugins/base.rb#49
|
2655
|
-
# Mark classes directly subclassing a class matching `names` as ignored.
|
2656
|
-
# Names can be either strings or regexps:
|
2657
|
-
# ~~~rb
|
2658
|
-
# class MyPlugin < Spoom::Deadcode::Plugins::Base
|
2659
|
-
# ignore_classes_inheriting_from(
|
2660
|
-
# "Foo",
|
2661
|
-
# "Bar",
|
2662
|
-
# /Baz.*/,
|
2663
|
-
# )
|
2664
|
-
# end
|
2665
|
-
# ~~~
|
2666
2523
|
sig { params(names: T.any(::Regexp, ::String)).void }
|
2667
2524
|
def ignore_classes_inheriting_from(*names); end
|
2668
2525
|
|
@@ -2682,17 +2539,6 @@ class Spoom::Deadcode::Plugins::Base
|
|
2682
2539
|
# : (*(String | Regexp) names) -> void
|
2683
2540
|
#
|
2684
2541
|
# source://spoom//lib/spoom/deadcode/plugins/base.rb#31
|
2685
|
-
# Mark classes matching `names` as ignored.
|
2686
|
-
# Names can be either strings or regexps:
|
2687
|
-
# ~~~rb
|
2688
|
-
# class MyPlugin < Spoom::Deadcode::Plugins::Base
|
2689
|
-
# ignore_class_names(
|
2690
|
-
# "Foo",
|
2691
|
-
# "Bar",
|
2692
|
-
# /Baz.*/,
|
2693
|
-
# )
|
2694
|
-
# end
|
2695
|
-
# ~~~
|
2696
2542
|
sig { params(names: T.any(::Regexp, ::String)).void }
|
2697
2543
|
def ignore_classes_named(*names); end
|
2698
2544
|
|
@@ -2712,17 +2558,6 @@ class Spoom::Deadcode::Plugins::Base
|
|
2712
2558
|
# : (*(String | Regexp) names) -> void
|
2713
2559
|
#
|
2714
2560
|
# source://spoom//lib/spoom/deadcode/plugins/base.rb#67
|
2715
|
-
# Mark constants matching `names` as ignored.
|
2716
|
-
# Names can be either strings or regexps:
|
2717
|
-
# ~~~rb
|
2718
|
-
# class MyPlugin < Spoom::Deadcode::Plugins::Base
|
2719
|
-
# ignore_class_names(
|
2720
|
-
# "FOO",
|
2721
|
-
# "BAR",
|
2722
|
-
# /BAZ.*/,
|
2723
|
-
# )
|
2724
|
-
# end
|
2725
|
-
# ~~~
|
2726
2561
|
sig { params(names: T.any(::Regexp, ::String)).void }
|
2727
2562
|
def ignore_constants_named(*names); end
|
2728
2563
|
|
@@ -2742,17 +2577,6 @@ class Spoom::Deadcode::Plugins::Base
|
|
2742
2577
|
# : (*(String | Regexp) names) -> void
|
2743
2578
|
#
|
2744
2579
|
# source://spoom//lib/spoom/deadcode/plugins/base.rb#85
|
2745
|
-
# Mark methods matching `names` as ignored.
|
2746
|
-
# Names can be either strings or regexps:
|
2747
|
-
# ~~~rb
|
2748
|
-
# class MyPlugin < Spoom::Deadcode::Plugins::Base
|
2749
|
-
# ignore_method_names(
|
2750
|
-
# "foo",
|
2751
|
-
# "bar",
|
2752
|
-
# /baz.*/,
|
2753
|
-
# )
|
2754
|
-
# end
|
2755
|
-
# ~~~
|
2756
2580
|
sig { params(names: T.any(::Regexp, ::String)).void }
|
2757
2581
|
def ignore_methods_named(*names); end
|
2758
2582
|
|
@@ -2772,17 +2596,6 @@ class Spoom::Deadcode::Plugins::Base
|
|
2772
2596
|
# : (*(String | Regexp) names) -> void
|
2773
2597
|
#
|
2774
2598
|
# source://spoom//lib/spoom/deadcode/plugins/base.rb#103
|
2775
|
-
# Mark modules matching `names` as ignored.
|
2776
|
-
# Names can be either strings or regexps:
|
2777
|
-
# ~~~rb
|
2778
|
-
# class MyPlugin < Spoom::Deadcode::Plugins::Base
|
2779
|
-
# ignore_class_names(
|
2780
|
-
# "Foo",
|
2781
|
-
# "Bar",
|
2782
|
-
# /Baz.*/,
|
2783
|
-
# )
|
2784
|
-
# end
|
2785
|
-
# ~~~
|
2786
2599
|
sig { params(names: T.any(::Regexp, ::String)).void }
|
2787
2600
|
def ignore_modules_named(*names); end
|
2788
2601
|
|
@@ -2826,7 +2639,7 @@ class Spoom::Deadcode::Plugins::Minitest < ::Spoom::Deadcode::Plugins::Base
|
|
2826
2639
|
def on_send(send); end
|
2827
2640
|
end
|
2828
2641
|
|
2829
|
-
# source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#
|
2642
|
+
# source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#7
|
2830
2643
|
class Spoom::Deadcode::Plugins::Namespaces < ::Spoom::Deadcode::Plugins::Base
|
2831
2644
|
# : (Model::Class definition) -> void
|
2832
2645
|
#
|
@@ -2897,6 +2710,8 @@ class Spoom::Deadcode::Plugins::Rubocop < ::Spoom::Deadcode::Plugins::Base
|
|
2897
2710
|
def on_define_method(definition); end
|
2898
2711
|
end
|
2899
2712
|
|
2713
|
+
# : Set[String]
|
2714
|
+
#
|
2900
2715
|
# source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#8
|
2901
2716
|
Spoom::Deadcode::Plugins::Rubocop::RUBOCOP_CONSTANTS = T.let(T.unsafe(nil), Set)
|
2902
2717
|
|
@@ -2917,7 +2732,7 @@ class Spoom::Deadcode::Plugins::Ruby < ::Spoom::Deadcode::Plugins::Base
|
|
2917
2732
|
def reference_symbol_as_constant(send, node); end
|
2918
2733
|
end
|
2919
2734
|
|
2920
|
-
# source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#
|
2735
|
+
# source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#7
|
2921
2736
|
class Spoom::Deadcode::Plugins::Sorbet < ::Spoom::Deadcode::Plugins::Base
|
2922
2737
|
# : (Model::Constant definition) -> void
|
2923
2738
|
#
|
@@ -2979,13 +2794,13 @@ end
|
|
2979
2794
|
# source://spoom//lib/spoom/deadcode/remover.rb#7
|
2980
2795
|
class Spoom::Deadcode::Remover::Error < ::Spoom::Error; end
|
2981
2796
|
|
2982
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
2797
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#366
|
2983
2798
|
class Spoom::Deadcode::Remover::NodeContext
|
2984
2799
|
# : (String source, Hash[Integer, Prism::Comment] comments, Prism::Node node, Array[Prism::Node] nesting) -> void
|
2985
2800
|
#
|
2986
2801
|
# @return [NodeContext] a new instance of NodeContext
|
2987
2802
|
#
|
2988
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
2803
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#377
|
2989
2804
|
sig do
|
2990
2805
|
params(
|
2991
2806
|
source: ::String,
|
@@ -2998,49 +2813,48 @@ class Spoom::Deadcode::Remover::NodeContext
|
|
2998
2813
|
|
2999
2814
|
# : (Prism::Node node) -> Array[Prism::Comment]
|
3000
2815
|
#
|
3001
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
2816
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#491
|
3002
2817
|
sig { params(node: ::Prism::Node).returns(T::Array[::Prism::Comment]) }
|
3003
2818
|
def attached_comments(node); end
|
3004
2819
|
|
3005
2820
|
# : -> Prism::CallNode?
|
3006
2821
|
#
|
3007
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
2822
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#519
|
3008
2823
|
sig { returns(T.nilable(::Prism::CallNode)) }
|
3009
2824
|
def attached_sig; end
|
3010
2825
|
|
3011
2826
|
# : -> Array[Prism::Node]
|
3012
2827
|
#
|
3013
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
2828
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#506
|
3014
2829
|
sig { returns(T::Array[::Prism::Node]) }
|
3015
2830
|
def attached_sigs; end
|
3016
2831
|
|
3017
2832
|
# : Hash[Integer, Prism::Comment]
|
3018
2833
|
#
|
3019
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
2834
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#368
|
3020
2835
|
sig { returns(T::Hash[::Integer, ::Prism::Comment]) }
|
3021
2836
|
def comments; end
|
3022
2837
|
|
3023
2838
|
# : (Integer start_line, Integer end_line) -> Array[Prism::Comment]
|
3024
2839
|
#
|
3025
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
2840
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#479
|
3026
2841
|
sig { params(start_line: ::Integer, end_line: ::Integer).returns(T::Array[::Prism::Comment]) }
|
3027
2842
|
def comments_between_lines(start_line, end_line); end
|
3028
2843
|
|
3029
2844
|
# : Array[Prism::Node]
|
3030
2845
|
#
|
3031
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
2846
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#374
|
3032
2847
|
sig { returns(T::Array[::Prism::Node]) }
|
3033
2848
|
def nesting; end
|
3034
2849
|
|
3035
2850
|
# : Array[Prism::Node]
|
3036
2851
|
#
|
3037
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
3038
|
-
# @return [Array<Prism::Node>]
|
2852
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#374
|
3039
2853
|
def nesting=(_arg0); end
|
3040
2854
|
|
3041
2855
|
# : -> Prism::Node?
|
3042
2856
|
#
|
3043
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
2857
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#429
|
3044
2858
|
sig { returns(T.nilable(::Prism::Node)) }
|
3045
2859
|
def next_node; end
|
3046
2860
|
|
@@ -3048,13 +2862,13 @@ class Spoom::Deadcode::Remover::NodeContext
|
|
3048
2862
|
#
|
3049
2863
|
# @raise [Error]
|
3050
2864
|
#
|
3051
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
2865
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#418
|
3052
2866
|
sig { returns(T::Array[::Prism::Node]) }
|
3053
2867
|
def next_nodes; end
|
3054
2868
|
|
3055
2869
|
# : Prism::Node
|
3056
2870
|
#
|
3057
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
2871
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#371
|
3058
2872
|
sig { returns(::Prism::Node) }
|
3059
2873
|
def node; end
|
3060
2874
|
|
@@ -3062,7 +2876,7 @@ class Spoom::Deadcode::Remover::NodeContext
|
|
3062
2876
|
#
|
3063
2877
|
# @raise [Error]
|
3064
2878
|
#
|
3065
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
2879
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#393
|
3066
2880
|
sig { returns(::Spoom::Deadcode::Remover::NodeContext) }
|
3067
2881
|
def parent_context; end
|
3068
2882
|
|
@@ -3070,13 +2884,13 @@ class Spoom::Deadcode::Remover::NodeContext
|
|
3070
2884
|
#
|
3071
2885
|
# @raise [Error]
|
3072
2886
|
#
|
3073
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
2887
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#385
|
3074
2888
|
sig { returns(::Prism::Node) }
|
3075
2889
|
def parent_node; end
|
3076
2890
|
|
3077
2891
|
# : -> Prism::Node?
|
3078
2892
|
#
|
3079
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
2893
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#413
|
3080
2894
|
sig { returns(T.nilable(::Prism::Node)) }
|
3081
2895
|
def previous_node; end
|
3082
2896
|
|
@@ -3084,13 +2898,13 @@ class Spoom::Deadcode::Remover::NodeContext
|
|
3084
2898
|
#
|
3085
2899
|
# @raise [Error]
|
3086
2900
|
#
|
3087
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
2901
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#402
|
3088
2902
|
sig { returns(T::Array[::Prism::Node]) }
|
3089
2903
|
def previous_nodes; end
|
3090
2904
|
|
3091
2905
|
# : -> NodeContext?
|
3092
2906
|
#
|
3093
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
2907
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#434
|
3094
2908
|
sig { returns(T.nilable(::Spoom::Deadcode::Remover::NodeContext)) }
|
3095
2909
|
def sclass_context; end
|
3096
2910
|
|
@@ -3098,7 +2912,7 @@ class Spoom::Deadcode::Remover::NodeContext
|
|
3098
2912
|
#
|
3099
2913
|
# @return [Boolean]
|
3100
2914
|
#
|
3101
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
2915
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#467
|
3102
2916
|
sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) }
|
3103
2917
|
def sorbet_extend_sig?(node); end
|
3104
2918
|
|
@@ -3106,43 +2920,43 @@ class Spoom::Deadcode::Remover::NodeContext
|
|
3106
2920
|
#
|
3107
2921
|
# @return [Boolean]
|
3108
2922
|
#
|
3109
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
2923
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#462
|
3110
2924
|
sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) }
|
3111
2925
|
def sorbet_signature?(node); end
|
3112
2926
|
end
|
3113
2927
|
|
3114
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
2928
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#534
|
3115
2929
|
class Spoom::Deadcode::Remover::NodeFinder < ::Spoom::Visitor
|
3116
2930
|
# : (Location location, Definition::Kind? kind) -> void
|
3117
2931
|
#
|
3118
2932
|
# @return [NodeFinder] a new instance of NodeFinder
|
3119
2933
|
#
|
3120
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
2934
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#599
|
3121
2935
|
sig { params(location: ::Spoom::Location, kind: T.nilable(::Spoom::Deadcode::Definition::Kind)).void }
|
3122
2936
|
def initialize(location, kind); end
|
3123
2937
|
|
3124
2938
|
# : Prism::Node?
|
3125
2939
|
#
|
3126
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
2940
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#593
|
3127
2941
|
sig { returns(T.nilable(::Prism::Node)) }
|
3128
2942
|
def node; end
|
3129
2943
|
|
3130
2944
|
# : Array[Prism::Node]
|
3131
2945
|
#
|
3132
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
2946
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#596
|
3133
2947
|
sig { returns(T::Array[::Prism::Node]) }
|
3134
2948
|
def nodes_nesting; end
|
3135
2949
|
|
3136
2950
|
# : (Prism::Node? node) -> void
|
3137
2951
|
#
|
3138
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
2952
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#609
|
3139
2953
|
sig { override.params(node: T.nilable(::Prism::Node)).void }
|
3140
2954
|
def visit(node); end
|
3141
2955
|
|
3142
2956
|
class << self
|
3143
2957
|
# : (String source, Location location, Definition::Kind? kind) -> NodeContext
|
3144
2958
|
#
|
3145
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
2959
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#537
|
3146
2960
|
sig do
|
3147
2961
|
params(
|
3148
2962
|
source: ::String,
|
@@ -3156,7 +2970,7 @@ class Spoom::Deadcode::Remover::NodeFinder < ::Spoom::Visitor
|
|
3156
2970
|
#
|
3157
2971
|
# @return [Boolean]
|
3158
2972
|
#
|
3159
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
2973
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#568
|
3160
2974
|
sig { params(node: ::Prism::Node, kind: ::Spoom::Deadcode::Definition::Kind).returns(T::Boolean) }
|
3161
2975
|
def node_match_kind?(node, kind); end
|
3162
2976
|
end
|
@@ -3194,13 +3008,13 @@ class Spoom::Deadcode::Remover::NodeRemover
|
|
3194
3008
|
|
3195
3009
|
# : (NodeContext context) -> void
|
3196
3010
|
#
|
3197
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
3011
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#151
|
3198
3012
|
sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void }
|
3199
3013
|
def delete_attr_accessor(context); end
|
3200
3014
|
|
3201
3015
|
# : (Integer start_char, Integer end_char) -> void
|
3202
3016
|
#
|
3203
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
3017
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#325
|
3204
3018
|
sig { params(start_char: ::Integer, end_char: ::Integer).void }
|
3205
3019
|
def delete_chars(start_char, end_char); end
|
3206
3020
|
|
@@ -3212,19 +3026,19 @@ class Spoom::Deadcode::Remover::NodeRemover
|
|
3212
3026
|
|
3213
3027
|
# : (Integer start_line, Integer end_line) -> void
|
3214
3028
|
#
|
3215
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
3029
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#318
|
3216
3030
|
sig { params(start_line: ::Integer, end_line: ::Integer).void }
|
3217
3031
|
def delete_lines(start_line, end_line); end
|
3218
3032
|
|
3219
3033
|
# : (NodeContext context) -> void
|
3220
3034
|
#
|
3221
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
3035
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#255
|
3222
3036
|
sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void }
|
3223
3037
|
def delete_node_and_comments_and_sigs(context); end
|
3224
3038
|
|
3225
3039
|
# : (Prism::Node node, NodeContext send_context, was_removed: bool) -> void
|
3226
3040
|
#
|
3227
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
3041
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#212
|
3228
3042
|
sig do
|
3229
3043
|
params(
|
3230
3044
|
node: ::Prism::Node,
|
@@ -3236,13 +3050,13 @@ class Spoom::Deadcode::Remover::NodeRemover
|
|
3236
3050
|
|
3237
3051
|
# : (Integer start_char, Integer end_char, String replacement) -> void
|
3238
3052
|
#
|
3239
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
3053
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#330
|
3240
3054
|
sig { params(start_char: ::Integer, end_char: ::Integer, replacement: ::String).void }
|
3241
3055
|
def replace_chars(start_char, end_char, replacement); end
|
3242
3056
|
|
3243
3057
|
# : (Prism::CallNode node, name: String, kind: Definition::Kind?) -> String
|
3244
3058
|
#
|
3245
|
-
# source://spoom//lib/spoom/deadcode/remover.rb#
|
3059
|
+
# source://spoom//lib/spoom/deadcode/remover.rb#335
|
3246
3060
|
sig do
|
3247
3061
|
params(
|
3248
3062
|
node: ::Prism::CallNode,
|
@@ -3325,12 +3139,6 @@ class Spoom::FileCollector
|
|
3325
3139
|
# @return [FileCollector] a new instance of FileCollector
|
3326
3140
|
#
|
3327
3141
|
# source://spoom//lib/spoom/file_collector.rb#18
|
3328
|
-
# Initialize a new file collector
|
3329
|
-
# If `allow_extensions` is empty, all files are collected.
|
3330
|
-
# If `allow_extensions` is an array of extensions, only files with one of these extensions are collected.
|
3331
|
-
# If `allow_mime_types` is empty, all files are collected.
|
3332
|
-
# If `allow_mime_types` is an array of mimetypes, files without an extension are collected if their mimetype is in
|
3333
|
-
# the list.
|
3334
3142
|
sig do
|
3335
3143
|
params(
|
3336
3144
|
allow_extensions: T::Array[::String],
|
@@ -3419,8 +3227,6 @@ class Spoom::FileTree
|
|
3419
3227
|
# : (String path) -> Node
|
3420
3228
|
#
|
3421
3229
|
# source://spoom//lib/spoom/file_tree.rb#23
|
3422
|
-
# Add a `path` to the tree
|
3423
|
-
# This will create all nodes until the root of `path`.
|
3424
3230
|
sig { params(path: ::String).returns(::Spoom::FileTree::Node) }
|
3425
3231
|
def add_path(path); end
|
3426
3232
|
|
@@ -3428,7 +3234,6 @@ class Spoom::FileTree
|
|
3428
3234
|
# : (T::Enumerable[String] paths) -> void
|
3429
3235
|
#
|
3430
3236
|
# source://spoom//lib/spoom/file_tree.rb#15
|
3431
|
-
# Add all `paths` to the tree
|
3432
3237
|
sig { params(paths: T::Enumerable[::String]).void }
|
3433
3238
|
def add_paths(paths); end
|
3434
3239
|
|
@@ -3436,7 +3241,6 @@ class Spoom::FileTree
|
|
3436
3241
|
# : -> Array[Node]
|
3437
3242
|
#
|
3438
3243
|
# source://spoom//lib/spoom/file_tree.rb#43
|
3439
|
-
# All the nodes in this tree
|
3440
3244
|
sig { returns(T::Array[::Spoom::FileTree::Node]) }
|
3441
3245
|
def nodes; end
|
3442
3246
|
|
@@ -3444,7 +3248,6 @@ class Spoom::FileTree
|
|
3444
3248
|
# : (Context context) -> Hash[Node, Float]
|
3445
3249
|
#
|
3446
3250
|
# source://spoom//lib/spoom/file_tree.rb#57
|
3447
|
-
# Return a map of typing scores for each node in the tree
|
3448
3251
|
sig { params(context: ::Spoom::Context).returns(T::Hash[::Spoom::FileTree::Node, ::Float]) }
|
3449
3252
|
def nodes_strictness_scores(context); end
|
3450
3253
|
|
@@ -3452,7 +3255,6 @@ class Spoom::FileTree
|
|
3452
3255
|
# : -> Array[String]
|
3453
3256
|
#
|
3454
3257
|
# source://spoom//lib/spoom/file_tree.rb#51
|
3455
|
-
# All the paths in this tree
|
3456
3258
|
sig { returns(T::Array[::String]) }
|
3457
3259
|
def paths; end
|
3458
3260
|
|
@@ -3460,7 +3262,6 @@ class Spoom::FileTree
|
|
3460
3262
|
# : (Context context) -> Hash[String, Float]
|
3461
3263
|
#
|
3462
3264
|
# source://spoom//lib/spoom/file_tree.rb#65
|
3463
|
-
# Return a map of typing scores for each path in the tree
|
3464
3265
|
sig { params(context: ::Spoom::Context).returns(T::Hash[::String, ::Float]) }
|
3465
3266
|
def paths_strictness_scores(context); end
|
3466
3267
|
|
@@ -3474,14 +3275,13 @@ class Spoom::FileTree
|
|
3474
3275
|
# : -> Array[Node]
|
3475
3276
|
#
|
3476
3277
|
# source://spoom//lib/spoom/file_tree.rb#37
|
3477
|
-
# All root nodes
|
3478
3278
|
sig { returns(T::Array[::Spoom::FileTree::Node]) }
|
3479
3279
|
def roots; end
|
3480
3280
|
end
|
3481
3281
|
|
3482
3282
|
# A visitor that collects all the nodes in a tree
|
3483
3283
|
#
|
3484
|
-
# source://spoom//lib/spoom/file_tree.rb#
|
3284
|
+
# source://spoom//lib/spoom/file_tree.rb#119
|
3485
3285
|
class Spoom::FileTree::CollectNodes < ::Spoom::FileTree::Visitor
|
3486
3286
|
# : -> void
|
3487
3287
|
#
|
@@ -3506,7 +3306,7 @@ end
|
|
3506
3306
|
|
3507
3307
|
# A visitor that collects the typing score of each node in a tree
|
3508
3308
|
#
|
3509
|
-
# source://spoom//lib/spoom/file_tree.rb#
|
3309
|
+
# source://spoom//lib/spoom/file_tree.rb#160
|
3510
3310
|
class Spoom::FileTree::CollectScores < ::Spoom::FileTree::CollectStrictnesses
|
3511
3311
|
# : (Context context) -> void
|
3512
3312
|
#
|
@@ -3545,7 +3345,7 @@ end
|
|
3545
3345
|
|
3546
3346
|
# A visitor that collects the strictness of each node in a tree
|
3547
3347
|
#
|
3548
|
-
# source://spoom//lib/spoom/file_tree.rb#
|
3348
|
+
# source://spoom//lib/spoom/file_tree.rb#138
|
3549
3349
|
class Spoom::FileTree::CollectStrictnesses < ::Spoom::FileTree::Visitor
|
3550
3350
|
# : (Context context) -> void
|
3551
3351
|
#
|
@@ -3570,7 +3370,7 @@ end
|
|
3570
3370
|
|
3571
3371
|
# A node representing either a file or a directory inside a FileTree
|
3572
3372
|
#
|
3573
|
-
# source://spoom//lib/spoom/file_tree.rb#
|
3373
|
+
# source://spoom//lib/spoom/file_tree.rb#76
|
3574
3374
|
class Spoom::FileTree::Node < ::T::Struct
|
3575
3375
|
const :parent, T.nilable(::Spoom::FileTree::Node)
|
3576
3376
|
const :name, ::String
|
@@ -3580,7 +3380,6 @@ class Spoom::FileTree::Node < ::T::Struct
|
|
3580
3380
|
# : -> String
|
3581
3381
|
#
|
3582
3382
|
# source://spoom//lib/spoom/file_tree.rb#88
|
3583
|
-
# Full path to this node from root
|
3584
3383
|
sig { returns(::String) }
|
3585
3384
|
def path; end
|
3586
3385
|
|
@@ -3594,8 +3393,7 @@ end
|
|
3594
3393
|
#
|
3595
3394
|
# See `FileTree#print`
|
3596
3395
|
#
|
3597
|
-
# source://spoom//lib/spoom/file_tree.rb#
|
3598
|
-
# An internal class used to print a FileTree
|
3396
|
+
# source://spoom//lib/spoom/file_tree.rb#204
|
3599
3397
|
class Spoom::FileTree::Printer < ::Spoom::FileTree::Visitor
|
3600
3398
|
# : (Hash[FileTree::Node, String?] strictnesses, ?out: (IO | StringIO), ?colors: bool) -> void
|
3601
3399
|
#
|
@@ -3675,7 +3473,6 @@ class Spoom::Git::Commit < ::T::Struct
|
|
3675
3473
|
# : (String string) -> Commit?
|
3676
3474
|
#
|
3677
3475
|
# source://spoom//lib/spoom/context/git.rb#10
|
3678
|
-
# Parse a line formatted as `%h %at` into a `Commit`
|
3679
3476
|
sig { params(string: ::String).returns(T.nilable(::Spoom::Git::Commit)) }
|
3680
3477
|
def parse_line(string); end
|
3681
3478
|
end
|
@@ -3729,7 +3526,6 @@ class Spoom::LSP::Client
|
|
3729
3526
|
# @raise [Error::AlreadyOpen]
|
3730
3527
|
#
|
3731
3528
|
# source://spoom//lib/spoom/sorbet/lsp.rb#70
|
3732
|
-
# LSP requests
|
3733
3529
|
sig { params(workspace_path: ::String).void }
|
3734
3530
|
def open(workspace_path); end
|
3735
3531
|
|
@@ -3877,7 +3673,7 @@ class Spoom::LSP::Error::AlreadyOpen < ::Spoom::LSP::Error; end
|
|
3877
3673
|
# source://spoom//lib/spoom/sorbet/lsp/errors.rb#8
|
3878
3674
|
class Spoom::LSP::Error::BadHeaders < ::Spoom::LSP::Error; end
|
3879
3675
|
|
3880
|
-
# source://spoom//lib/spoom/sorbet/lsp/errors.rb#
|
3676
|
+
# source://spoom//lib/spoom/sorbet/lsp/errors.rb#10
|
3881
3677
|
class Spoom::LSP::Error::Diagnostics < ::Spoom::LSP::Error
|
3882
3678
|
# : (String uri, Array[Diagnostic] diagnostics) -> void
|
3883
3679
|
#
|
@@ -3975,7 +3771,6 @@ end
|
|
3975
3771
|
# The language server protocol always uses `"2.0"` as the `jsonrpc` version.
|
3976
3772
|
#
|
3977
3773
|
# source://spoom//lib/spoom/sorbet/lsp/base.rb#12
|
3978
|
-
# A general message as defined by JSON-RPC.
|
3979
3774
|
class Spoom::LSP::Message
|
3980
3775
|
# : -> void
|
3981
3776
|
#
|
@@ -4002,8 +3797,7 @@ end
|
|
4002
3797
|
#
|
4003
3798
|
# A processed notification message must not send a response back. They work like events.
|
4004
3799
|
#
|
4005
|
-
# source://spoom//lib/spoom/sorbet/lsp/base.rb#
|
4006
|
-
# A notification message.
|
3800
|
+
# source://spoom//lib/spoom/sorbet/lsp/base.rb#54
|
4007
3801
|
class Spoom::LSP::Notification < ::Spoom::LSP::Message
|
4008
3802
|
# : (String method, Hash[untyped, untyped] params) -> void
|
4009
3803
|
#
|
@@ -4105,8 +3899,7 @@ end
|
|
4105
3899
|
#
|
4106
3900
|
# Every processed request must send a response back to the sender of the request.
|
4107
3901
|
#
|
4108
|
-
# source://spoom//lib/spoom/sorbet/lsp/base.rb#
|
4109
|
-
# A request message to describe a request between the client and the server.
|
3902
|
+
# source://spoom//lib/spoom/sorbet/lsp/base.rb#35
|
4110
3903
|
class Spoom::LSP::Request < ::Spoom::LSP::Message
|
4111
3904
|
# : (Integer id, String method, Hash[untyped, untyped] params) -> void
|
4112
3905
|
#
|
@@ -4129,7 +3922,7 @@ class Spoom::LSP::Request < ::Spoom::LSP::Message
|
|
4129
3922
|
def params; end
|
4130
3923
|
end
|
4131
3924
|
|
4132
|
-
# source://spoom//lib/spoom/sorbet/lsp/errors.rb#
|
3925
|
+
# source://spoom//lib/spoom/sorbet/lsp/errors.rb#36
|
4133
3926
|
class Spoom::LSP::ResponseError < ::Spoom::LSP::Error
|
4134
3927
|
# : (Integer code, String message, Hash[untyped, untyped] data) -> void
|
4135
3928
|
#
|
@@ -4192,13 +3985,13 @@ class Spoom::LSP::SignatureHelp < ::T::Struct
|
|
4192
3985
|
end
|
4193
3986
|
end
|
4194
3987
|
|
4195
|
-
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#
|
3988
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#292
|
4196
3989
|
class Spoom::LSP::SymbolPrinter < ::Spoom::Printer
|
4197
3990
|
# : (?out: (IO | StringIO), ?colors: bool, ?indent_level: Integer, ?prefix: String?) -> void
|
4198
3991
|
#
|
4199
3992
|
# @return [SymbolPrinter] a new instance of SymbolPrinter
|
4200
3993
|
#
|
4201
|
-
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#
|
3994
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#300
|
4202
3995
|
sig do
|
4203
3996
|
params(
|
4204
3997
|
out: T.any(::IO, ::StringIO),
|
@@ -4211,43 +4004,42 @@ class Spoom::LSP::SymbolPrinter < ::Spoom::Printer
|
|
4211
4004
|
|
4212
4005
|
# : (String uri) -> String
|
4213
4006
|
#
|
4214
|
-
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#
|
4007
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#322
|
4215
4008
|
sig { params(uri: ::String).returns(::String) }
|
4216
4009
|
def clean_uri(uri); end
|
4217
4010
|
|
4218
4011
|
# : String?
|
4219
4012
|
#
|
4220
|
-
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#
|
4013
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#297
|
4221
4014
|
sig { returns(T.nilable(::String)) }
|
4222
4015
|
def prefix; end
|
4223
4016
|
|
4224
4017
|
# : String?
|
4225
4018
|
#
|
4226
|
-
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#
|
4227
|
-
# @return [String, nil]
|
4019
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#297
|
4228
4020
|
def prefix=(_arg0); end
|
4229
4021
|
|
4230
4022
|
# : (Array[PrintableSymbol] objects) -> void
|
4231
4023
|
#
|
4232
|
-
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#
|
4024
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#330
|
4233
4025
|
sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void }
|
4234
4026
|
def print_list(objects); end
|
4235
4027
|
|
4236
4028
|
# : (PrintableSymbol? object) -> void
|
4237
4029
|
#
|
4238
|
-
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#
|
4030
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#310
|
4239
4031
|
sig { params(object: T.nilable(::Spoom::LSP::PrintableSymbol)).void }
|
4240
4032
|
def print_object(object); end
|
4241
4033
|
|
4242
4034
|
# : (Array[PrintableSymbol] objects) -> void
|
4243
4035
|
#
|
4244
|
-
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#
|
4036
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#317
|
4245
4037
|
sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void }
|
4246
4038
|
def print_objects(objects); end
|
4247
4039
|
|
4248
4040
|
# : Set[Integer]
|
4249
4041
|
#
|
4250
|
-
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#
|
4042
|
+
# source://spoom//lib/spoom/sorbet/lsp/structures.rb#294
|
4251
4043
|
sig { returns(T::Set[::Integer]) }
|
4252
4044
|
def seen; end
|
4253
4045
|
end
|
@@ -4282,13 +4074,11 @@ class Spoom::Location
|
|
4282
4074
|
# : Integer?
|
4283
4075
|
#
|
4284
4076
|
# source://spoom//lib/spoom/location.rb#58
|
4285
|
-
# @return [Integer, nil]
|
4286
4077
|
def end_column; end
|
4287
4078
|
|
4288
4079
|
# : Integer?
|
4289
4080
|
#
|
4290
4081
|
# source://spoom//lib/spoom/location.rb#58
|
4291
|
-
# @return [Integer, nil]
|
4292
4082
|
def end_line; end
|
4293
4083
|
|
4294
4084
|
# : String
|
@@ -4308,7 +4098,6 @@ class Spoom::Location
|
|
4308
4098
|
# : Integer?
|
4309
4099
|
#
|
4310
4100
|
# source://spoom//lib/spoom/location.rb#58
|
4311
|
-
# @return [Integer, nil]
|
4312
4101
|
def start_column; end
|
4313
4102
|
|
4314
4103
|
# : Integer?
|
@@ -4361,8 +4150,6 @@ class Spoom::Model
|
|
4361
4150
|
# @raise [Error]
|
4362
4151
|
#
|
4363
4152
|
# source://spoom//lib/spoom/model/model.rb#244
|
4364
|
-
# Get a symbol by it's full name
|
4365
|
-
# Raises an error if the symbol is not found
|
4366
4153
|
sig { params(full_name: ::String).returns(::Spoom::Model::Symbol) }
|
4367
4154
|
def [](full_name); end
|
4368
4155
|
|
@@ -4378,8 +4165,6 @@ class Spoom::Model
|
|
4378
4165
|
# : (String full_name) -> Symbol
|
4379
4166
|
#
|
4380
4167
|
# source://spoom//lib/spoom/model/model.rb#255
|
4381
|
-
# Register a new symbol by it's full name
|
4382
|
-
# If the symbol already exists, it will be returned.
|
4383
4168
|
sig { params(full_name: ::String).returns(::Spoom::Model::Symbol) }
|
4384
4169
|
def register_symbol(full_name); end
|
4385
4170
|
|
@@ -4405,7 +4190,6 @@ class Spoom::Model
|
|
4405
4190
|
# : Hash[String, Symbol]
|
4406
4191
|
#
|
4407
4192
|
# source://spoom//lib/spoom/model/model.rb#229
|
4408
|
-
# All the symbols registered in this model
|
4409
4193
|
sig { returns(T::Hash[::String, ::Spoom::Model::Symbol]) }
|
4410
4194
|
def symbols; end
|
4411
4195
|
|
@@ -4442,7 +4226,7 @@ class Spoom::Model::AttrWriter < ::Spoom::Model::Attr; end
|
|
4442
4226
|
|
4443
4227
|
# Populate a Model by visiting the nodes from a Ruby file
|
4444
4228
|
#
|
4445
|
-
# source://spoom//lib/spoom/model/builder.rb#
|
4229
|
+
# source://spoom//lib/spoom/model/builder.rb#7
|
4446
4230
|
class Spoom::Model::Builder < ::Spoom::Model::NamespaceVisitor
|
4447
4231
|
# : (Model model, String file, ?comments: Array[Prism::Comment]) -> void
|
4448
4232
|
#
|
@@ -4454,49 +4238,49 @@ class Spoom::Model::Builder < ::Spoom::Model::NamespaceVisitor
|
|
4454
4238
|
|
4455
4239
|
# : (Prism::CallNode node) -> void
|
4456
4240
|
#
|
4457
|
-
# source://spoom//lib/spoom/model/builder.rb#
|
4241
|
+
# source://spoom//lib/spoom/model/builder.rb#162
|
4458
4242
|
sig { override.params(node: ::Prism::CallNode).void }
|
4459
4243
|
def visit_call_node(node); end
|
4460
4244
|
|
4461
4245
|
# : (Prism::ClassNode node) -> void
|
4462
4246
|
#
|
4463
|
-
# source://spoom//lib/spoom/model/builder.rb#
|
4247
|
+
# source://spoom//lib/spoom/model/builder.rb#26
|
4464
4248
|
sig { override.params(node: ::Prism::ClassNode).void }
|
4465
4249
|
def visit_class_node(node); end
|
4466
4250
|
|
4467
4251
|
# : (Prism::ConstantPathWriteNode node) -> void
|
4468
4252
|
#
|
4469
|
-
# source://spoom//lib/spoom/model/builder.rb#
|
4253
|
+
# source://spoom//lib/spoom/model/builder.rb#79
|
4470
4254
|
sig { override.params(node: ::Prism::ConstantPathWriteNode).void }
|
4471
4255
|
def visit_constant_path_write_node(node); end
|
4472
4256
|
|
4473
4257
|
# : (Prism::ConstantWriteNode node) -> void
|
4474
4258
|
#
|
4475
|
-
# source://spoom//lib/spoom/model/builder.rb#
|
4259
|
+
# source://spoom//lib/spoom/model/builder.rb#102
|
4476
4260
|
sig { override.params(node: ::Prism::ConstantWriteNode).void }
|
4477
4261
|
def visit_constant_write_node(node); end
|
4478
4262
|
|
4479
4263
|
# : (Prism::DefNode node) -> void
|
4480
4264
|
#
|
4481
|
-
# source://spoom//lib/spoom/model/builder.rb#
|
4265
|
+
# source://spoom//lib/spoom/model/builder.rb#141
|
4482
4266
|
sig { override.params(node: ::Prism::DefNode).void }
|
4483
4267
|
def visit_def_node(node); end
|
4484
4268
|
|
4485
4269
|
# : (Prism::ModuleNode node) -> void
|
4486
4270
|
#
|
4487
|
-
# source://spoom//lib/spoom/model/builder.rb#
|
4271
|
+
# source://spoom//lib/spoom/model/builder.rb#61
|
4488
4272
|
sig { override.params(node: ::Prism::ModuleNode).void }
|
4489
4273
|
def visit_module_node(node); end
|
4490
4274
|
|
4491
4275
|
# : (Prism::MultiWriteNode node) -> void
|
4492
4276
|
#
|
4493
|
-
# source://spoom//lib/spoom/model/builder.rb#
|
4277
|
+
# source://spoom//lib/spoom/model/builder.rb#118
|
4494
4278
|
sig { override.params(node: ::Prism::MultiWriteNode).void }
|
4495
4279
|
def visit_multi_write_node(node); end
|
4496
4280
|
|
4497
4281
|
# : (Prism::SingletonClassNode node) -> void
|
4498
4282
|
#
|
4499
|
-
# source://spoom//lib/spoom/model/builder.rb#
|
4283
|
+
# source://spoom//lib/spoom/model/builder.rb#43
|
4500
4284
|
sig { override.params(node: ::Prism::SingletonClassNode).void }
|
4501
4285
|
def visit_singleton_class_node(node); end
|
4502
4286
|
|
@@ -4504,30 +4288,30 @@ class Spoom::Model::Builder < ::Spoom::Model::NamespaceVisitor
|
|
4504
4288
|
|
4505
4289
|
# : -> Array[Sig]
|
4506
4290
|
#
|
4507
|
-
# source://spoom//lib/spoom/model/builder.rb#
|
4291
|
+
# source://spoom//lib/spoom/model/builder.rb#253
|
4508
4292
|
sig { returns(T::Array[::Spoom::Model::Sig]) }
|
4509
4293
|
def collect_sigs; end
|
4510
4294
|
|
4511
4295
|
# : -> Visibility
|
4512
4296
|
#
|
4513
|
-
# source://spoom//lib/spoom/model/builder.rb#
|
4297
|
+
# source://spoom//lib/spoom/model/builder.rb#248
|
4514
4298
|
sig { returns(::Spoom::Model::Visibility) }
|
4515
4299
|
def current_visibility; end
|
4516
4300
|
|
4517
4301
|
# : (Prism::Node node) -> Array[Comment]
|
4518
4302
|
#
|
4519
|
-
# source://spoom//lib/spoom/model/builder.rb#
|
4303
|
+
# source://spoom//lib/spoom/model/builder.rb#265
|
4520
4304
|
sig { params(node: ::Prism::Node).returns(T::Array[::Spoom::Model::Comment]) }
|
4521
4305
|
def node_comments(node); end
|
4522
4306
|
|
4523
4307
|
# : (Prism::Node node) -> Location
|
4524
4308
|
#
|
4525
|
-
# source://spoom//lib/spoom/model/builder.rb#
|
4309
|
+
# source://spoom//lib/spoom/model/builder.rb#260
|
4526
4310
|
sig { params(node: ::Prism::Node).returns(::Spoom::Location) }
|
4527
4311
|
def node_location(node); end
|
4528
4312
|
end
|
4529
4313
|
|
4530
|
-
# source://spoom//lib/spoom/model/model.rb#
|
4314
|
+
# source://spoom//lib/spoom/model/model.rb#132
|
4531
4315
|
class Spoom::Model::Class < ::Spoom::Model::Namespace
|
4532
4316
|
# : (Symbol symbol, owner: Namespace?, location: Location, ?superclass_name: String?, ?comments: Array[Comment]) -> void
|
4533
4317
|
#
|
@@ -4554,7 +4338,6 @@ class Spoom::Model::Class < ::Spoom::Model::Namespace
|
|
4554
4338
|
# : String?
|
4555
4339
|
#
|
4556
4340
|
# source://spoom//lib/spoom/model/model.rb#134
|
4557
|
-
# @return [String, nil]
|
4558
4341
|
def superclass_name=(_arg0); end
|
4559
4342
|
end
|
4560
4343
|
|
@@ -4581,7 +4364,7 @@ class Spoom::Model::Comment
|
|
4581
4364
|
def string; end
|
4582
4365
|
end
|
4583
4366
|
|
4584
|
-
# source://spoom//lib/spoom/model/model.rb#
|
4367
|
+
# source://spoom//lib/spoom/model/model.rb#146
|
4585
4368
|
class Spoom::Model::Constant < ::Spoom::Model::SymbolDef
|
4586
4369
|
# : (Symbol symbol, owner: Namespace?, location: Location, value: String, ?comments: Array[Comment]) -> void
|
4587
4370
|
#
|
@@ -4748,8 +4531,6 @@ end
|
|
4748
4531
|
# Methods could be accessors, instance or class methods, aliases, etc.
|
4749
4532
|
#
|
4750
4533
|
# source://spoom//lib/spoom/model/reference.rb#10
|
4751
|
-
# A reference to something that looks like a constant or a method
|
4752
|
-
# Constants could be classes, modules, or actual constants.
|
4753
4534
|
class Spoom::Model::Reference < ::T::Struct
|
4754
4535
|
const :kind, ::Spoom::Model::Reference::Kind
|
4755
4536
|
const :name, ::String
|
@@ -4799,7 +4580,7 @@ end
|
|
4799
4580
|
|
4800
4581
|
# Visit a file to collect all the references to constants and methods
|
4801
4582
|
#
|
4802
|
-
# source://spoom//lib/spoom/model/references_visitor.rb#
|
4583
|
+
# source://spoom//lib/spoom/model/references_visitor.rb#7
|
4803
4584
|
class Spoom::Model::ReferencesVisitor < ::Spoom::Visitor
|
4804
4585
|
# : (String file) -> void
|
4805
4586
|
#
|
@@ -4997,9 +4778,6 @@ class Spoom::Model::SingletonClass < ::Spoom::Model::Namespace; end
|
|
4997
4778
|
# e.g. `foo` method can be defined both as a method and as an attribute accessor.
|
4998
4779
|
#
|
4999
4780
|
# source://spoom//lib/spoom/model/model.rb#27
|
5000
|
-
# A Symbol is a uniquely named entity in the Ruby codebase
|
5001
|
-
# A symbol can have multiple definitions, e.g. a class can be reopened.
|
5002
|
-
# Sometimes a symbol can have multiple definitions of different types,
|
5003
4781
|
class Spoom::Model::Symbol
|
5004
4782
|
# : (String full_name) -> void
|
5005
4783
|
#
|
@@ -5013,7 +4791,6 @@ class Spoom::Model::Symbol
|
|
5013
4791
|
# : Array[SymbolDef]
|
5014
4792
|
#
|
5015
4793
|
# source://spoom//lib/spoom/model/model.rb#34
|
5016
|
-
# The definitions of this symbol (where it exists in the code)
|
5017
4794
|
sig { returns(T::Array[::Spoom::Model::SymbolDef]) }
|
5018
4795
|
def definitions; end
|
5019
4796
|
|
@@ -5021,7 +4798,6 @@ class Spoom::Model::Symbol
|
|
5021
4798
|
# : String
|
5022
4799
|
#
|
5023
4800
|
# source://spoom//lib/spoom/model/model.rb#30
|
5024
|
-
# The full, unique name of this symbol
|
5025
4801
|
sig { returns(::String) }
|
5026
4802
|
def full_name; end
|
5027
4803
|
|
@@ -5029,7 +4805,6 @@ class Spoom::Model::Symbol
|
|
5029
4805
|
# : -> String
|
5030
4806
|
#
|
5031
4807
|
# source://spoom//lib/spoom/model/model.rb#44
|
5032
|
-
# The short name of this symbol
|
5033
4808
|
sig { returns(::String) }
|
5034
4809
|
def name; end
|
5035
4810
|
|
@@ -5048,8 +4823,6 @@ end
|
|
5048
4823
|
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
5049
4824
|
#
|
5050
4825
|
# source://spoom//lib/spoom/model/model.rb#66
|
5051
|
-
# A SymbolDef is a definition of a Symbol
|
5052
|
-
# It can be a class, module, constant, method, etc.
|
5053
4826
|
class Spoom::Model::SymbolDef
|
5054
4827
|
abstract!
|
5055
4828
|
|
@@ -5072,7 +4845,6 @@ class Spoom::Model::SymbolDef
|
|
5072
4845
|
# : Array[Comment]
|
5073
4846
|
#
|
5074
4847
|
# source://spoom//lib/spoom/model/model.rb#85
|
5075
|
-
# The comments associated with this definition
|
5076
4848
|
sig { returns(T::Array[::Spoom::Model::Comment]) }
|
5077
4849
|
def comments; end
|
5078
4850
|
|
@@ -5080,7 +4852,6 @@ class Spoom::Model::SymbolDef
|
|
5080
4852
|
# : -> String
|
5081
4853
|
#
|
5082
4854
|
# source://spoom//lib/spoom/model/model.rb#100
|
5083
|
-
# The full name of the symbol this definition belongs to
|
5084
4855
|
sig { returns(::String) }
|
5085
4856
|
def full_name; end
|
5086
4857
|
|
@@ -5088,7 +4859,6 @@ class Spoom::Model::SymbolDef
|
|
5088
4859
|
# : Location
|
5089
4860
|
#
|
5090
4861
|
# source://spoom//lib/spoom/model/model.rb#81
|
5091
|
-
# The actual code location of this definition
|
5092
4862
|
sig { returns(::Spoom::Location) }
|
5093
4863
|
def location; end
|
5094
4864
|
|
@@ -5096,7 +4866,6 @@ class Spoom::Model::SymbolDef
|
|
5096
4866
|
# : -> String
|
5097
4867
|
#
|
5098
4868
|
# source://spoom//lib/spoom/model/model.rb#106
|
5099
|
-
# The short name of the symbol this definition belongs to
|
5100
4869
|
sig { returns(::String) }
|
5101
4870
|
def name; end
|
5102
4871
|
|
@@ -5104,7 +4873,6 @@ class Spoom::Model::SymbolDef
|
|
5104
4873
|
# : Namespace?
|
5105
4874
|
#
|
5106
4875
|
# source://spoom//lib/spoom/model/model.rb#77
|
5107
|
-
# The enclosing namespace this definition belongs to
|
5108
4876
|
sig { returns(T.nilable(::Spoom::Model::Namespace)) }
|
5109
4877
|
def owner; end
|
5110
4878
|
|
@@ -5112,12 +4880,11 @@ class Spoom::Model::SymbolDef
|
|
5112
4880
|
# : Symbol
|
5113
4881
|
#
|
5114
4882
|
# source://spoom//lib/spoom/model/model.rb#73
|
5115
|
-
# The symbol this definition belongs to
|
5116
4883
|
sig { returns(::Spoom::Model::Symbol) }
|
5117
4884
|
def symbol; end
|
5118
4885
|
end
|
5119
4886
|
|
5120
|
-
# source://spoom//lib/spoom/model/model.rb#
|
4887
|
+
# source://spoom//lib/spoom/model/model.rb#54
|
5121
4888
|
class Spoom::Model::UnresolvedSymbol < ::Spoom::Model::Symbol
|
5122
4889
|
# : -> String
|
5123
4890
|
#
|
@@ -5144,8 +4911,6 @@ class Spoom::ParseError < ::Spoom::Error; end
|
|
5144
4911
|
# It can be used to represent a hierarchy of classes or modules, the dependencies between gems, etc.
|
5145
4912
|
#
|
5146
4913
|
# source://spoom//lib/spoom/poset.rb#9
|
5147
|
-
# A Poset is a set of elements with a partial order relation.
|
5148
|
-
# The partial order relation is a binary relation that is reflexive, antisymmetric, and transitive.
|
5149
4914
|
class Spoom::Poset
|
5150
4915
|
extend T::Generic
|
5151
4916
|
|
@@ -5167,8 +4932,6 @@ class Spoom::Poset
|
|
5167
4932
|
# @raise [Error]
|
5168
4933
|
#
|
5169
4934
|
# source://spoom//lib/spoom/poset.rb#25
|
5170
|
-
# Get the POSet element for a given value
|
5171
|
-
# Raises if the element is not found
|
5172
4935
|
sig { params(value: E).returns(Spoom::Poset::Element[E]) }
|
5173
4936
|
def [](value); end
|
5174
4937
|
|
@@ -5180,10 +4943,6 @@ class Spoom::Poset
|
|
5180
4943
|
# : (E from, E to) -> void
|
5181
4944
|
#
|
5182
4945
|
# source://spoom//lib/spoom/poset.rb#53
|
5183
|
-
# Add a direct edge from one element to another
|
5184
|
-
# Transitive edges (transitive closure) are automatically computed.
|
5185
|
-
# Adds the elements if they don't exist.
|
5186
|
-
# If the direct edge already exists, nothing is done.
|
5187
4946
|
sig { params(from: E, to: E).void }
|
5188
4947
|
def add_direct_edge(from, to); end
|
5189
4948
|
|
@@ -5191,7 +4950,6 @@ class Spoom::Poset
|
|
5191
4950
|
# : (E value) -> Element[E]
|
5192
4951
|
#
|
5193
4952
|
# source://spoom//lib/spoom/poset.rb#34
|
5194
|
-
# Add an element to the POSet
|
5195
4953
|
sig { params(value: E).returns(Spoom::Poset::Element[E]) }
|
5196
4954
|
def add_element(value); end
|
5197
4955
|
|
@@ -5201,7 +4959,6 @@ class Spoom::Poset
|
|
5201
4959
|
# @return [Boolean]
|
5202
4960
|
#
|
5203
4961
|
# source://spoom//lib/spoom/poset.rb#100
|
5204
|
-
# Is there a direct edge from `from` to `to`?
|
5205
4962
|
sig { params(from: E, to: E).returns(T::Boolean) }
|
5206
4963
|
def direct_edge?(from, to); end
|
5207
4964
|
|
@@ -5211,7 +4968,6 @@ class Spoom::Poset
|
|
5211
4968
|
# @return [Boolean]
|
5212
4969
|
#
|
5213
4970
|
# source://spoom//lib/spoom/poset.rb#91
|
5214
|
-
# Is there an edge (direct or indirect) from `from` to `to`?
|
5215
4971
|
sig { params(from: E, to: E).returns(T::Boolean) }
|
5216
4972
|
def edge?(from, to); end
|
5217
4973
|
|
@@ -5221,7 +4977,6 @@ class Spoom::Poset
|
|
5221
4977
|
# @return [Boolean]
|
5222
4978
|
#
|
5223
4979
|
# source://spoom//lib/spoom/poset.rb#43
|
5224
|
-
# Is the given value a element in the POSet?
|
5225
4980
|
sig { params(value: E).returns(T::Boolean) }
|
5226
4981
|
def element?(value); end
|
5227
4982
|
|
@@ -5229,7 +4984,6 @@ class Spoom::Poset
|
|
5229
4984
|
# : (?direct: bool, ?transitive: bool) -> void
|
5230
4985
|
#
|
5231
4986
|
# source://spoom//lib/spoom/poset.rb#106
|
5232
|
-
# Show the POSet as a DOT graph using xdot (used for debugging)
|
5233
4987
|
sig { params(direct: T::Boolean, transitive: T::Boolean).void }
|
5234
4988
|
def show_dot(direct: T.unsafe(nil), transitive: T.unsafe(nil)); end
|
5235
4989
|
|
@@ -5237,7 +4991,6 @@ class Spoom::Poset
|
|
5237
4991
|
# : (?direct: bool, ?transitive: bool) -> String
|
5238
4992
|
#
|
5239
4993
|
# source://spoom//lib/spoom/poset.rb#115
|
5240
|
-
# Return the POSet as a DOT graph
|
5241
4994
|
sig { params(direct: T::Boolean, transitive: T::Boolean).returns(::String) }
|
5242
4995
|
def to_dot(direct: T.unsafe(nil), transitive: T.unsafe(nil)); end
|
5243
4996
|
end
|
@@ -5269,7 +5022,6 @@ class Spoom::Poset::Element
|
|
5269
5022
|
# : -> Array[E]
|
5270
5023
|
#
|
5271
5024
|
# source://spoom//lib/spoom/poset.rb#178
|
5272
|
-
# Direct and indirect ancestors of this element
|
5273
5025
|
sig { returns(T::Array[E]) }
|
5274
5026
|
def ancestors; end
|
5275
5027
|
|
@@ -5277,7 +5029,6 @@ class Spoom::Poset::Element
|
|
5277
5029
|
# : -> Array[E]
|
5278
5030
|
#
|
5279
5031
|
# source://spoom//lib/spoom/poset.rb#184
|
5280
|
-
# Direct children of this element
|
5281
5032
|
sig { returns(T::Array[E]) }
|
5282
5033
|
def children; end
|
5283
5034
|
|
@@ -5285,7 +5036,6 @@ class Spoom::Poset::Element
|
|
5285
5036
|
# : -> Array[E]
|
5286
5037
|
#
|
5287
5038
|
# source://spoom//lib/spoom/poset.rb#190
|
5288
|
-
# Direct and indirect descendants of this element
|
5289
5039
|
sig { returns(T::Array[E]) }
|
5290
5040
|
def descendants; end
|
5291
5041
|
|
@@ -5293,15 +5043,12 @@ class Spoom::Poset::Element
|
|
5293
5043
|
# : Set[Element[E]]
|
5294
5044
|
#
|
5295
5045
|
# source://spoom//lib/spoom/poset.rb#147
|
5296
|
-
# Edges (direct and indirect) from this element to other elements in the same POSet
|
5297
|
-
# @return [Set<Element[E]>]
|
5298
5046
|
def dfroms; end
|
5299
5047
|
|
5300
5048
|
# Edges (direct and indirect) from this element to other elements in the same POSet
|
5301
5049
|
# : Set[Element[E]]
|
5302
5050
|
#
|
5303
5051
|
# source://spoom//lib/spoom/poset.rb#147
|
5304
|
-
# Edges (direct and indirect) from this element to other elements in the same POSet
|
5305
5052
|
sig { returns(T::Set[Spoom::Poset::Element[E]]) }
|
5306
5053
|
def dtos; end
|
5307
5054
|
|
@@ -5309,15 +5056,12 @@ class Spoom::Poset::Element
|
|
5309
5056
|
# : Set[Element[E]]
|
5310
5057
|
#
|
5311
5058
|
# source://spoom//lib/spoom/poset.rb#147
|
5312
|
-
# Edges (direct and indirect) from this element to other elements in the same POSet
|
5313
|
-
# @return [Set<Element[E]>]
|
5314
5059
|
def froms; end
|
5315
5060
|
|
5316
5061
|
# Direct parents of this element
|
5317
5062
|
# : -> Array[E]
|
5318
5063
|
#
|
5319
5064
|
# source://spoom//lib/spoom/poset.rb#172
|
5320
|
-
# Direct parents of this element
|
5321
5065
|
sig { returns(T::Array[E]) }
|
5322
5066
|
def parents; end
|
5323
5067
|
|
@@ -5325,15 +5069,12 @@ class Spoom::Poset::Element
|
|
5325
5069
|
# : Set[Element[E]]
|
5326
5070
|
#
|
5327
5071
|
# source://spoom//lib/spoom/poset.rb#147
|
5328
|
-
# Edges (direct and indirect) from this element to other elements in the same POSet
|
5329
|
-
# @return [Set<Element[E]>]
|
5330
5072
|
def tos; end
|
5331
5073
|
|
5332
5074
|
# The value held by this element
|
5333
5075
|
# : E
|
5334
5076
|
#
|
5335
5077
|
# source://spoom//lib/spoom/poset.rb#143
|
5336
|
-
# The value held by this element
|
5337
5078
|
sig { returns(E) }
|
5338
5079
|
def value; end
|
5339
5080
|
end
|
@@ -5357,7 +5098,6 @@ class Spoom::Printer
|
|
5357
5098
|
# : (String string, *Spoom::Color color) -> String
|
5358
5099
|
#
|
5359
5100
|
# source://spoom//lib/spoom/printer.rb#75
|
5360
|
-
# Colorize `string` with color if `@colors`
|
5361
5101
|
sig { params(string: ::String, color: ::Spoom::Color).returns(::String) }
|
5362
5102
|
def colorize(string, *color); end
|
5363
5103
|
|
@@ -5365,7 +5105,6 @@ class Spoom::Printer
|
|
5365
5105
|
# : -> void
|
5366
5106
|
#
|
5367
5107
|
# source://spoom//lib/spoom/printer.rb#28
|
5368
|
-
# Decrease indent level
|
5369
5108
|
sig { void }
|
5370
5109
|
def dedent; end
|
5371
5110
|
|
@@ -5373,7 +5112,6 @@ class Spoom::Printer
|
|
5373
5112
|
# : -> void
|
5374
5113
|
#
|
5375
5114
|
# source://spoom//lib/spoom/printer.rb#22
|
5376
|
-
# Increase indent level
|
5377
5115
|
sig { void }
|
5378
5116
|
def indent; end
|
5379
5117
|
|
@@ -5386,14 +5124,12 @@ class Spoom::Printer
|
|
5386
5124
|
# : (IO | StringIO)
|
5387
5125
|
#
|
5388
5126
|
# source://spoom//lib/spoom/printer.rb#11
|
5389
|
-
# @return [IO, StringIO]
|
5390
5127
|
def out=(_arg0); end
|
5391
5128
|
|
5392
5129
|
# Print `string` into `out`
|
5393
5130
|
# : (String? string) -> void
|
5394
5131
|
#
|
5395
5132
|
# source://spoom//lib/spoom/printer.rb#34
|
5396
|
-
# Print `string` into `out`
|
5397
5133
|
sig { params(string: T.nilable(::String)).void }
|
5398
5134
|
def print(string); end
|
5399
5135
|
|
@@ -5403,8 +5139,6 @@ class Spoom::Printer
|
|
5403
5139
|
# : (String? string, *Color color) -> void
|
5404
5140
|
#
|
5405
5141
|
# source://spoom//lib/spoom/printer.rb#44
|
5406
|
-
# Print `string` colored with `color` into `out`
|
5407
|
-
# Does not use colors unless `@colors`.
|
5408
5142
|
sig { params(string: T.nilable(::String), color: ::Spoom::Color).void }
|
5409
5143
|
def print_colored(string, *color); end
|
5410
5144
|
|
@@ -5412,7 +5146,6 @@ class Spoom::Printer
|
|
5412
5146
|
# : (String? string) -> void
|
5413
5147
|
#
|
5414
5148
|
# source://spoom//lib/spoom/printer.rb#59
|
5415
|
-
# Print `string` with indent and newline
|
5416
5149
|
sig { params(string: T.nilable(::String)).void }
|
5417
5150
|
def printl(string); end
|
5418
5151
|
|
@@ -5420,7 +5153,6 @@ class Spoom::Printer
|
|
5420
5153
|
# : -> void
|
5421
5154
|
#
|
5422
5155
|
# source://spoom//lib/spoom/printer.rb#53
|
5423
|
-
# Print a new line into `out`
|
5424
5156
|
sig { void }
|
5425
5157
|
def printn; end
|
5426
5158
|
|
@@ -5428,11 +5160,12 @@ class Spoom::Printer
|
|
5428
5160
|
# : -> void
|
5429
5161
|
#
|
5430
5162
|
# source://spoom//lib/spoom/printer.rb#69
|
5431
|
-
# Print an indent space into `out`
|
5432
5163
|
sig { void }
|
5433
5164
|
def printt; end
|
5434
5165
|
end
|
5435
5166
|
|
5167
|
+
# : String
|
5168
|
+
#
|
5436
5169
|
# source://spoom//lib/spoom.rb#8
|
5437
5170
|
Spoom::SPOOM_PATH = T.let(T.unsafe(nil), String)
|
5438
5171
|
|
@@ -5504,7 +5237,6 @@ class Spoom::Sorbet::Assertions::AssignNode
|
|
5504
5237
|
# : Prism::Node
|
5505
5238
|
#
|
5506
5239
|
# source://spoom//lib/spoom/sorbet/assertions.rb#130
|
5507
|
-
# @return [Prism::Node]
|
5508
5240
|
def type; end
|
5509
5241
|
|
5510
5242
|
# : Prism::Node
|
@@ -5547,7 +5279,6 @@ class Spoom::Sorbet::Assertions::Locator < ::Spoom::Visitor
|
|
5547
5279
|
# @return [Boolean]
|
5548
5280
|
#
|
5549
5281
|
# source://spoom//lib/spoom/sorbet/assertions.rb#223
|
5550
|
-
# Is this node a `T` or `::T` constant?
|
5551
5282
|
sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) }
|
5552
5283
|
def t?(node); end
|
5553
5284
|
|
@@ -5557,7 +5288,6 @@ class Spoom::Sorbet::Assertions::Locator < ::Spoom::Visitor
|
|
5557
5288
|
# @return [Boolean]
|
5558
5289
|
#
|
5559
5290
|
# source://spoom//lib/spoom/sorbet/assertions.rb#236
|
5560
|
-
# Is this node a `T.let` or `T.cast`?
|
5561
5291
|
sig { params(node: ::Prism::CallNode).returns(T::Boolean) }
|
5562
5292
|
def t_annotation?(node); end
|
5563
5293
|
|
@@ -5697,10 +5427,12 @@ class Spoom::Sorbet::Assertions::Locator < ::Spoom::Visitor
|
|
5697
5427
|
def visit_multi_write_node(node); end
|
5698
5428
|
end
|
5699
5429
|
|
5430
|
+
# : Array[Symbol]
|
5431
|
+
#
|
5700
5432
|
# source://spoom//lib/spoom/sorbet/assertions.rb#147
|
5701
5433
|
Spoom::Sorbet::Assertions::Locator::ANNOTATION_METHODS = T.let(T.unsafe(nil), Array)
|
5702
5434
|
|
5703
|
-
# source://spoom//lib/spoom/sorbet/assertions.rb#
|
5435
|
+
# source://spoom//lib/spoom/sorbet/assertions.rb#251
|
5704
5436
|
class Spoom::Sorbet::Assertions::Locator::HeredocVisitor < ::Spoom::Visitor
|
5705
5437
|
# : -> void
|
5706
5438
|
#
|
@@ -5723,6 +5455,8 @@ class Spoom::Sorbet::Assertions::Locator::HeredocVisitor < ::Spoom::Visitor
|
|
5723
5455
|
def visit(node); end
|
5724
5456
|
end
|
5725
5457
|
|
5458
|
+
# : String
|
5459
|
+
#
|
5726
5460
|
# source://spoom//lib/spoom/sorbet.rb#33
|
5727
5461
|
Spoom::Sorbet::BIN_PATH = T.let(T.unsafe(nil), String)
|
5728
5462
|
|
@@ -5751,19 +5485,6 @@ Spoom::Sorbet::CONFIG_PATH = T.let(T.unsafe(nil), String)
|
|
5751
5485
|
# ```
|
5752
5486
|
#
|
5753
5487
|
# source://spoom//lib/spoom/sorbet/config.rb#26
|
5754
|
-
# Parse Sorbet config files
|
5755
|
-
# Parses a Sorbet config file:
|
5756
|
-
# ```ruby
|
5757
|
-
# config = Spoom::Sorbet::Config.parse_file("sorbet/config")
|
5758
|
-
# puts config.paths # "."
|
5759
|
-
# Parses a Sorbet config string:
|
5760
|
-
# config = Spoom::Sorbet::Config.parse_string(<<~CONFIG)
|
5761
|
-
# a
|
5762
|
-
# --file=b
|
5763
|
-
# --ignore=c
|
5764
|
-
# CONFIG
|
5765
|
-
# puts config.paths # "a", "b"
|
5766
|
-
# puts config.ignore # "c"
|
5767
5488
|
class Spoom::Sorbet::Config
|
5768
5489
|
# : -> void
|
5769
5490
|
#
|
@@ -5776,13 +5497,11 @@ class Spoom::Sorbet::Config
|
|
5776
5497
|
# : Array[String]
|
5777
5498
|
#
|
5778
5499
|
# source://spoom//lib/spoom/sorbet/config.rb#30
|
5779
|
-
# @return [Array<String>]
|
5780
5500
|
def allowed_extensions; end
|
5781
5501
|
|
5782
5502
|
# : Array[String]
|
5783
5503
|
#
|
5784
5504
|
# source://spoom//lib/spoom/sorbet/config.rb#30
|
5785
|
-
# @return [Array<String>]
|
5786
5505
|
def allowed_extensions=(_arg0); end
|
5787
5506
|
|
5788
5507
|
# : -> Config
|
@@ -5794,13 +5513,11 @@ class Spoom::Sorbet::Config
|
|
5794
5513
|
# : Array[String]
|
5795
5514
|
#
|
5796
5515
|
# source://spoom//lib/spoom/sorbet/config.rb#30
|
5797
|
-
# @return [Array<String>]
|
5798
5516
|
def ignore; end
|
5799
5517
|
|
5800
5518
|
# : Array[String]
|
5801
5519
|
#
|
5802
5520
|
# source://spoom//lib/spoom/sorbet/config.rb#30
|
5803
|
-
# @return [Array<String>]
|
5804
5521
|
def ignore=(_arg0); end
|
5805
5522
|
|
5806
5523
|
# : bool
|
@@ -5812,7 +5529,6 @@ class Spoom::Sorbet::Config
|
|
5812
5529
|
# : bool
|
5813
5530
|
#
|
5814
5531
|
# source://spoom//lib/spoom/sorbet/config.rb#33
|
5815
|
-
# @return [Boolean]
|
5816
5532
|
def no_stdlib=(_arg0); end
|
5817
5533
|
|
5818
5534
|
# Returns self as a string of options that can be passed to Sorbet
|
@@ -5830,16 +5546,6 @@ class Spoom::Sorbet::Config
|
|
5830
5546
|
# : -> String
|
5831
5547
|
#
|
5832
5548
|
# source://spoom//lib/spoom/sorbet/config.rb#66
|
5833
|
-
# Returns self as a string of options that can be passed to Sorbet
|
5834
|
-
# Example:
|
5835
|
-
# ~~~rb
|
5836
|
-
# config = Sorbet::Config.new
|
5837
|
-
# config.paths << "/foo"
|
5838
|
-
# config.paths << "/bar"
|
5839
|
-
# config.ignore << "/baz"
|
5840
|
-
# config.allowed_extensions << ".rb"
|
5841
|
-
# puts config.options_string # "/foo /bar --ignore /baz --allowed-extension .rb"
|
5842
|
-
# ~~~
|
5843
5549
|
sig { returns(::String) }
|
5844
5550
|
def options_string; end
|
5845
5551
|
|
@@ -5852,7 +5558,6 @@ class Spoom::Sorbet::Config
|
|
5852
5558
|
# : Array[String]
|
5853
5559
|
#
|
5854
5560
|
# source://spoom//lib/spoom/sorbet/config.rb#30
|
5855
|
-
# @return [Array<String>]
|
5856
5561
|
def paths=(_arg0); end
|
5857
5562
|
|
5858
5563
|
class << self
|
@@ -5878,6 +5583,8 @@ class Spoom::Sorbet::Config
|
|
5878
5583
|
end
|
5879
5584
|
end
|
5880
5585
|
|
5586
|
+
# : Array[String]
|
5587
|
+
#
|
5881
5588
|
# source://spoom//lib/spoom/sorbet/config.rb#27
|
5882
5589
|
Spoom::Sorbet::Config::DEFAULT_ALLOWED_EXTENSIONS = T.let(T.unsafe(nil), Array)
|
5883
5590
|
|
@@ -5904,21 +5611,27 @@ class Spoom::Sorbet::Error::Killed < ::Spoom::Sorbet::Error; end
|
|
5904
5611
|
# source://spoom//lib/spoom/sorbet.rb#17
|
5905
5612
|
class Spoom::Sorbet::Error::Segfault < ::Spoom::Sorbet::Error; end
|
5906
5613
|
|
5907
|
-
# source://spoom//lib/spoom/sorbet/errors.rb#
|
5614
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#8
|
5908
5615
|
module Spoom::Sorbet::Errors
|
5909
5616
|
class << self
|
5910
5617
|
# : (Array[Error] errors) -> Array[Error]
|
5911
5618
|
#
|
5912
|
-
# source://spoom//lib/spoom/sorbet/errors.rb#
|
5619
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#13
|
5913
5620
|
sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error]).returns(T::Array[::Spoom::Sorbet::Errors::Error]) }
|
5914
5621
|
def sort_errors_by_code(errors); end
|
5622
|
+
|
5623
|
+
# : (Array[Error]) -> REXML::Document
|
5624
|
+
#
|
5625
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#18
|
5626
|
+
sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error]).returns(::REXML::Document) }
|
5627
|
+
def to_junit_xml(errors); end
|
5915
5628
|
end
|
5916
5629
|
end
|
5917
5630
|
|
5918
|
-
# source://spoom//lib/spoom/sorbet/errors.rb#
|
5631
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#9
|
5919
5632
|
Spoom::Sorbet::Errors::DEFAULT_ERROR_URL_BASE = T.let(T.unsafe(nil), String)
|
5920
5633
|
|
5921
|
-
# source://spoom//lib/spoom/sorbet/errors.rb#
|
5634
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#149
|
5922
5635
|
class Spoom::Sorbet::Errors::Error
|
5923
5636
|
include ::Comparable
|
5924
5637
|
|
@@ -5926,7 +5639,7 @@ class Spoom::Sorbet::Errors::Error
|
|
5926
5639
|
#
|
5927
5640
|
# @return [Error] a new instance of Error
|
5928
5641
|
#
|
5929
|
-
# source://spoom//lib/spoom/sorbet/errors.rb#
|
5642
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#166
|
5930
5643
|
sig do
|
5931
5644
|
params(
|
5932
5645
|
file: T.nilable(::String),
|
@@ -5941,71 +5654,73 @@ class Spoom::Sorbet::Errors::Error
|
|
5941
5654
|
# By default errors are sorted by location
|
5942
5655
|
# : (untyped other) -> Integer
|
5943
5656
|
#
|
5944
|
-
# source://spoom//lib/spoom/sorbet/errors.rb#
|
5945
|
-
# By default errors are sorted by location
|
5657
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#177
|
5946
5658
|
sig { params(other: T.untyped).returns(::Integer) }
|
5947
5659
|
def <=>(other); end
|
5948
5660
|
|
5949
5661
|
# : Integer?
|
5950
5662
|
#
|
5951
|
-
# source://spoom//lib/spoom/sorbet/errors.rb#
|
5952
|
-
# @return [Integer, nil]
|
5663
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#156
|
5953
5664
|
def code; end
|
5954
5665
|
|
5955
5666
|
# : String?
|
5956
5667
|
#
|
5957
|
-
# source://spoom//lib/spoom/sorbet/errors.rb#
|
5668
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#153
|
5958
5669
|
sig { returns(T.nilable(::String)) }
|
5959
5670
|
def file; end
|
5960
5671
|
|
5961
5672
|
# Other files associated with the error
|
5962
5673
|
# : Set[String]
|
5963
5674
|
#
|
5964
|
-
# source://spoom//lib/spoom/sorbet/errors.rb#
|
5965
|
-
# Other files associated with the error
|
5675
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#163
|
5966
5676
|
sig { returns(T::Set[::String]) }
|
5967
5677
|
def files_from_error_sections; end
|
5968
5678
|
|
5969
5679
|
# : Integer?
|
5970
5680
|
#
|
5971
|
-
# source://spoom//lib/spoom/sorbet/errors.rb#
|
5681
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#156
|
5972
5682
|
sig { returns(T.nilable(::Integer)) }
|
5973
5683
|
def line; end
|
5974
5684
|
|
5975
5685
|
# : String?
|
5976
5686
|
#
|
5977
|
-
# source://spoom//lib/spoom/sorbet/errors.rb#
|
5978
|
-
# @return [String, nil]
|
5687
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#153
|
5979
5688
|
def message; end
|
5980
5689
|
|
5981
5690
|
# : Array[String]
|
5982
5691
|
#
|
5983
|
-
# source://spoom//lib/spoom/sorbet/errors.rb#
|
5692
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#159
|
5984
5693
|
sig { returns(T::Array[::String]) }
|
5985
5694
|
def more; end
|
5986
5695
|
|
5696
|
+
# : -> REXML::Element
|
5697
|
+
#
|
5698
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#189
|
5699
|
+
sig { returns(::REXML::Element) }
|
5700
|
+
def to_junit_xml_element; end
|
5701
|
+
|
5987
5702
|
# : -> String
|
5988
5703
|
#
|
5989
|
-
# source://spoom//lib/spoom/sorbet/errors.rb#
|
5704
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#184
|
5990
5705
|
sig { returns(::String) }
|
5991
5706
|
def to_s; end
|
5992
5707
|
end
|
5993
5708
|
|
5994
5709
|
# Parse errors from Sorbet output
|
5995
5710
|
#
|
5996
|
-
# source://spoom//lib/spoom/sorbet/errors.rb#
|
5711
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#47
|
5997
5712
|
class Spoom::Sorbet::Errors::Parser
|
5998
5713
|
# : (?error_url_base: String) -> void
|
5999
5714
|
#
|
6000
5715
|
# @return [Parser] a new instance of Parser
|
6001
5716
|
#
|
6002
|
-
# source://spoom//lib/spoom/sorbet/errors.rb#
|
5717
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#67
|
6003
5718
|
sig { params(error_url_base: ::String).void }
|
6004
5719
|
def initialize(error_url_base: T.unsafe(nil)); end
|
6005
5720
|
|
6006
5721
|
# : (String output) -> Array[Error]
|
6007
5722
|
#
|
6008
|
-
# source://spoom//lib/spoom/sorbet/errors.rb#
|
5723
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#74
|
6009
5724
|
sig { params(output: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) }
|
6010
5725
|
def parse(output); end
|
6011
5726
|
|
@@ -6015,7 +5730,7 @@ class Spoom::Sorbet::Errors::Parser
|
|
6015
5730
|
#
|
6016
5731
|
# @raise [ParseError]
|
6017
5732
|
#
|
6018
|
-
# source://spoom//lib/spoom/sorbet/errors.rb#
|
5733
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#138
|
6019
5734
|
sig { params(line: ::String).void }
|
6020
5735
|
def append_error(line); end
|
6021
5736
|
|
@@ -6023,19 +5738,19 @@ class Spoom::Sorbet::Errors::Parser
|
|
6023
5738
|
#
|
6024
5739
|
# @raise [ParseError]
|
6025
5740
|
#
|
6026
|
-
# source://spoom//lib/spoom/sorbet/errors.rb#
|
5741
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#130
|
6027
5742
|
sig { void }
|
6028
5743
|
def close_error; end
|
6029
5744
|
|
6030
5745
|
# : (String error_url_base) -> Regexp
|
6031
5746
|
#
|
6032
|
-
# source://spoom//lib/spoom/sorbet/errors.rb#
|
5747
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#97
|
6033
5748
|
sig { params(error_url_base: ::String).returns(::Regexp) }
|
6034
5749
|
def error_line_match_regexp(error_url_base); end
|
6035
5750
|
|
6036
5751
|
# : (String line) -> Error?
|
6037
5752
|
#
|
6038
|
-
# source://spoom//lib/spoom/sorbet/errors.rb#
|
5753
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#114
|
6039
5754
|
sig { params(line: ::String).returns(T.nilable(::Spoom::Sorbet::Errors::Error)) }
|
6040
5755
|
def match_error_line(line); end
|
6041
5756
|
|
@@ -6043,28 +5758,32 @@ class Spoom::Sorbet::Errors::Parser
|
|
6043
5758
|
#
|
6044
5759
|
# @raise [ParseError]
|
6045
5760
|
#
|
6046
|
-
# source://spoom//lib/spoom/sorbet/errors.rb#
|
5761
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#123
|
6047
5762
|
sig { params(error: ::Spoom::Sorbet::Errors::Error).void }
|
6048
5763
|
def open_error(error); end
|
6049
5764
|
|
6050
5765
|
class << self
|
6051
5766
|
# : (String output, ?error_url_base: String) -> Array[Error]
|
6052
5767
|
#
|
6053
|
-
# source://spoom//lib/spoom/sorbet/errors.rb#
|
5768
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#60
|
6054
5769
|
sig { params(output: ::String, error_url_base: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) }
|
6055
5770
|
def parse_string(output, error_url_base: T.unsafe(nil)); end
|
6056
5771
|
end
|
6057
5772
|
end
|
6058
5773
|
|
6059
|
-
# source://spoom//lib/spoom/sorbet/errors.rb#
|
5774
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#50
|
6060
5775
|
Spoom::Sorbet::Errors::Parser::HEADER = T.let(T.unsafe(nil), Array)
|
6061
5776
|
|
6062
|
-
# source://spoom//lib/spoom/sorbet/errors.rb#
|
5777
|
+
# source://spoom//lib/spoom/sorbet/errors.rb#48
|
6063
5778
|
class Spoom::Sorbet::Errors::Parser::ParseError < ::Spoom::Error; end
|
6064
5779
|
|
5780
|
+
# : String
|
5781
|
+
#
|
6065
5782
|
# source://spoom//lib/spoom/sorbet.rb#31
|
6066
5783
|
Spoom::Sorbet::GEM_PATH = T.let(T.unsafe(nil), String)
|
6067
5784
|
|
5785
|
+
# : String
|
5786
|
+
#
|
6068
5787
|
# source://spoom//lib/spoom/sorbet.rb#32
|
6069
5788
|
Spoom::Sorbet::GEM_VERSION = T.let(T.unsafe(nil), String)
|
6070
5789
|
|
@@ -6106,16 +5825,14 @@ module Spoom::Sorbet::Sigils
|
|
6106
5825
|
# changes the sigil in the file at the passed path to the specified new strictness
|
6107
5826
|
# : ((String | Pathname) path, String new_strictness) -> bool
|
6108
5827
|
#
|
6109
|
-
# source://spoom//lib/spoom/sorbet/sigils.rb#
|
6110
|
-
# changes the sigil in the file at the passed path to the specified new strictness
|
5828
|
+
# source://spoom//lib/spoom/sorbet/sigils.rb#65
|
6111
5829
|
sig { params(path: T.any(::Pathname, ::String), new_strictness: ::String).returns(T::Boolean) }
|
6112
5830
|
def change_sigil_in_file(path, new_strictness); end
|
6113
5831
|
|
6114
5832
|
# changes the sigil to have a new strictness in a list of files
|
6115
5833
|
# : (Array[String] path_list, String new_strictness) -> Array[String]
|
6116
5834
|
#
|
6117
|
-
# source://spoom//lib/spoom/sorbet/sigils.rb#
|
6118
|
-
# changes the sigil to have a new strictness in a list of files
|
5835
|
+
# source://spoom//lib/spoom/sorbet/sigils.rb#76
|
6119
5836
|
sig { params(path_list: T::Array[::String], new_strictness: ::String).returns(T::Array[::String]) }
|
6120
5837
|
def change_sigil_in_files(path_list, new_strictness); end
|
6121
5838
|
|
@@ -6123,33 +5840,28 @@ module Spoom::Sorbet::Sigils
|
|
6123
5840
|
# * returns nil if no sigil
|
6124
5841
|
# : ((String | Pathname) path) -> String?
|
6125
5842
|
#
|
6126
|
-
# source://spoom//lib/spoom/sorbet/sigils.rb#
|
6127
|
-
# returns a string containing the strictness of a sigil in a file at the passed path
|
6128
|
-
# * returns nil if no sigil
|
5843
|
+
# source://spoom//lib/spoom/sorbet/sigils.rb#56
|
6129
5844
|
sig { params(path: T.any(::Pathname, ::String)).returns(T.nilable(::String)) }
|
6130
5845
|
def file_strictness(path); end
|
6131
5846
|
|
6132
5847
|
# returns the full sigil comment string for the passed strictness
|
6133
5848
|
# : (String strictness) -> String
|
6134
5849
|
#
|
6135
|
-
# source://spoom//lib/spoom/sorbet/sigils.rb#
|
6136
|
-
# returns the full sigil comment string for the passed strictness
|
5850
|
+
# source://spoom//lib/spoom/sorbet/sigils.rb#31
|
6137
5851
|
sig { params(strictness: ::String).returns(::String) }
|
6138
5852
|
def sigil_string(strictness); end
|
6139
5853
|
|
6140
5854
|
# returns the strictness of a sigil in the passed file content string (nil if no sigil)
|
6141
5855
|
# : (String content) -> String?
|
6142
5856
|
#
|
6143
|
-
# source://spoom//lib/spoom/sorbet/sigils.rb#
|
6144
|
-
# returns the strictness of a sigil in the passed file content string (nil if no sigil)
|
5857
|
+
# source://spoom//lib/spoom/sorbet/sigils.rb#43
|
6145
5858
|
sig { params(content: ::String).returns(T.nilable(::String)) }
|
6146
5859
|
def strictness_in_content(content); end
|
6147
5860
|
|
6148
5861
|
# returns a string which is the passed content but with the sigil updated to a new strictness
|
6149
5862
|
# : (String content, String new_strictness) -> String
|
6150
5863
|
#
|
6151
|
-
# source://spoom//lib/spoom/sorbet/sigils.rb#
|
6152
|
-
# returns a string which is the passed content but with the sigil updated to a new strictness
|
5864
|
+
# source://spoom//lib/spoom/sorbet/sigils.rb#49
|
6153
5865
|
sig { params(content: ::String, new_strictness: ::String).returns(::String) }
|
6154
5866
|
def update_sigil(content, new_strictness); end
|
6155
5867
|
|
@@ -6158,14 +5870,15 @@ module Spoom::Sorbet::Sigils
|
|
6158
5870
|
#
|
6159
5871
|
# @return [Boolean]
|
6160
5872
|
#
|
6161
|
-
# source://spoom//lib/spoom/sorbet/sigils.rb#
|
6162
|
-
# returns true if the passed string is a valid strictness (else false)
|
5873
|
+
# source://spoom//lib/spoom/sorbet/sigils.rb#37
|
6163
5874
|
sig { params(strictness: ::String).returns(T::Boolean) }
|
6164
5875
|
def valid_strictness?(strictness); end
|
6165
5876
|
end
|
6166
5877
|
end
|
6167
5878
|
|
6168
|
-
#
|
5879
|
+
# : Array[String]
|
5880
|
+
#
|
5881
|
+
# source://spoom//lib/spoom/sorbet/sigils.rb#26
|
6169
5882
|
Spoom::Sorbet::Sigils::SIGIL_REGEXP = T.let(T.unsafe(nil), Regexp)
|
6170
5883
|
|
6171
5884
|
# source://spoom//lib/spoom/sorbet/sigils.rb#11
|
@@ -6248,7 +5961,7 @@ class Spoom::Sorbet::Sigs::RBIToRBSTranslator
|
|
6248
5961
|
|
6249
5962
|
# : (RBI::Sig sig, RBI::Attr node, positional_names: bool) -> String
|
6250
5963
|
#
|
6251
|
-
# source://spoom//lib/spoom/sorbet/sigs.rb#
|
5964
|
+
# source://spoom//lib/spoom/sorbet/sigs.rb#178
|
6252
5965
|
sig { params(sig: ::RBI::Sig, node: ::RBI::Attr, positional_names: T::Boolean).returns(::String) }
|
6253
5966
|
def translate_attr_sig(sig, node, positional_names: T.unsafe(nil)); end
|
6254
5967
|
|
@@ -6260,12 +5973,12 @@ class Spoom::Sorbet::Sigs::RBIToRBSTranslator
|
|
6260
5973
|
end
|
6261
5974
|
end
|
6262
5975
|
|
6263
|
-
# source://spoom//lib/spoom/sorbet/sigs.rb#
|
5976
|
+
# source://spoom//lib/spoom/sorbet/sigs.rb#187
|
6264
5977
|
class Spoom::Sorbet::Sigs::RBSToRBITranslator
|
6265
5978
|
class << self
|
6266
5979
|
# : (RBI::RBSComment comment, (RBI::Method | RBI::Attr) node) -> String?
|
6267
5980
|
#
|
6268
|
-
# source://spoom//lib/spoom/sorbet/sigs.rb#
|
5981
|
+
# source://spoom//lib/spoom/sorbet/sigs.rb#192
|
6269
5982
|
sig { params(comment: ::RBI::RBSComment, node: T.any(::RBI::Attr, ::RBI::Method)).returns(T.nilable(::String)) }
|
6270
5983
|
def translate(comment, node); end
|
6271
5984
|
|
@@ -6273,13 +5986,13 @@ class Spoom::Sorbet::Sigs::RBSToRBITranslator
|
|
6273
5986
|
|
6274
5987
|
# : (RBI::RBSComment comment, RBI::Attr node) -> String
|
6275
5988
|
#
|
6276
|
-
# source://spoom//lib/spoom/sorbet/sigs.rb#
|
5989
|
+
# source://spoom//lib/spoom/sorbet/sigs.rb#235
|
6277
5990
|
sig { params(comment: ::RBI::RBSComment, node: ::RBI::Attr).returns(::String) }
|
6278
5991
|
def translate_attr_sig(comment, node); end
|
6279
5992
|
|
6280
5993
|
# : (RBI::RBSComment rbs_comment, RBI::Method node) -> String
|
6281
5994
|
#
|
6282
|
-
# source://spoom//lib/spoom/sorbet/sigs.rb#
|
5995
|
+
# source://spoom//lib/spoom/sorbet/sigs.rb#206
|
6283
5996
|
sig { params(rbs_comment: ::RBI::RBSComment, node: ::RBI::Method).returns(::String) }
|
6284
5997
|
def translate_method_sig(rbs_comment, node); end
|
6285
5998
|
end
|
@@ -6287,29 +6000,30 @@ end
|
|
6287
6000
|
|
6288
6001
|
# From https://github.com/Shopify/ruby-lsp/blob/9154bfc6ef/lib/ruby_lsp/document.rb#L127
|
6289
6002
|
#
|
6290
|
-
# source://spoom//lib/spoom/sorbet/sigs.rb#
|
6003
|
+
# source://spoom//lib/spoom/sorbet/sigs.rb#255
|
6291
6004
|
class Spoom::Sorbet::Sigs::Scanner
|
6292
6005
|
# : (String source) -> void
|
6293
6006
|
#
|
6294
6007
|
# @return [Scanner] a new instance of Scanner
|
6295
6008
|
#
|
6296
|
-
# source://spoom//lib/spoom/sorbet/sigs.rb#
|
6009
|
+
# source://spoom//lib/spoom/sorbet/sigs.rb#259
|
6297
6010
|
sig { params(source: ::String).void }
|
6298
6011
|
def initialize(source); end
|
6299
6012
|
|
6300
6013
|
# Finds the character index inside the source string for a given line and column
|
6301
6014
|
# : (Integer line, Integer character) -> Integer
|
6302
6015
|
#
|
6303
|
-
# source://spoom//lib/spoom/sorbet/sigs.rb#
|
6304
|
-
# Finds the character index inside the source string for a given line and column
|
6016
|
+
# source://spoom//lib/spoom/sorbet/sigs.rb#267
|
6305
6017
|
sig { params(line: ::Integer, character: ::Integer).returns(::Integer) }
|
6306
6018
|
def find_char_position(line, character); end
|
6307
6019
|
end
|
6308
6020
|
|
6309
|
-
#
|
6021
|
+
# : Integer
|
6022
|
+
#
|
6023
|
+
# source://spoom//lib/spoom/sorbet/sigs.rb#256
|
6310
6024
|
Spoom::Sorbet::Sigs::Scanner::LINE_BREAK = T.let(T.unsafe(nil), Integer)
|
6311
6025
|
|
6312
|
-
# source://spoom//lib/spoom/sorbet/sigs.rb#
|
6026
|
+
# source://spoom//lib/spoom/sorbet/sigs.rb#88
|
6313
6027
|
class Spoom::Sorbet::Sigs::SigsLocator < ::RBI::Visitor
|
6314
6028
|
# : -> void
|
6315
6029
|
#
|
@@ -6352,7 +6066,6 @@ class Spoom::Timeline
|
|
6352
6066
|
# : (Array[Time] dates) -> Array[Git::Commit]
|
6353
6067
|
#
|
6354
6068
|
# source://spoom//lib/spoom/timeline.rb#34
|
6355
|
-
# Return one commit for each date in `dates`
|
6356
6069
|
sig { params(dates: T::Array[::Time]).returns(T::Array[::Spoom::Git::Commit]) }
|
6357
6070
|
def commits_for_dates(dates); end
|
6358
6071
|
|
@@ -6360,7 +6073,6 @@ class Spoom::Timeline
|
|
6360
6073
|
# : -> Array[Time]
|
6361
6074
|
#
|
6362
6075
|
# source://spoom//lib/spoom/timeline.rb#21
|
6363
|
-
# Return all months between `from` and `to`
|
6364
6076
|
sig { returns(T::Array[::Time]) }
|
6365
6077
|
def months; end
|
6366
6078
|
|
@@ -6368,7 +6080,6 @@ class Spoom::Timeline
|
|
6368
6080
|
# : -> Array[Git::Commit]
|
6369
6081
|
#
|
6370
6082
|
# source://spoom//lib/spoom/timeline.rb#15
|
6371
|
-
# Return one commit for each month between `from` and `to`
|
6372
6083
|
sig { returns(T::Array[::Spoom::Git::Commit]) }
|
6373
6084
|
def ticks; end
|
6374
6085
|
end
|
@@ -6376,7 +6087,7 @@ end
|
|
6376
6087
|
# source://spoom//lib/spoom/version.rb#5
|
6377
6088
|
Spoom::VERSION = T.let(T.unsafe(nil), String)
|
6378
6089
|
|
6379
|
-
# source://spoom//lib/spoom/visitor.rb#
|
6090
|
+
# source://spoom//lib/spoom/visitor.rb#7
|
6380
6091
|
class Spoom::Visitor < ::Prism::Visitor
|
6381
6092
|
# : (Prism::AliasGlobalVariableNode node) -> void
|
6382
6093
|
#
|