packwerk 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +7 -0
  2. data/.github/ISSUE_TEMPLATE/bug_report.md +27 -0
  3. data/.github/probots.yml +2 -0
  4. data/.github/pull_request_template.md +27 -0
  5. data/.github/workflows/ci.yml +50 -0
  6. data/.gitignore +12 -0
  7. data/.rubocop.yml +46 -0
  8. data/.ruby-version +1 -0
  9. data/CODEOWNERS +1 -0
  10. data/CODE_OF_CONDUCT.md +76 -0
  11. data/CONTRIBUTING.md +17 -0
  12. data/Gemfile +22 -0
  13. data/Gemfile.lock +236 -0
  14. data/LICENSE.md +7 -0
  15. data/README.md +73 -0
  16. data/Rakefile +13 -0
  17. data/TROUBLESHOOT.md +67 -0
  18. data/USAGE.md +250 -0
  19. data/bin/console +15 -0
  20. data/bin/setup +8 -0
  21. data/dev.yml +32 -0
  22. data/docs/cohesion.png +0 -0
  23. data/exe/packwerk +6 -0
  24. data/lib/packwerk.rb +44 -0
  25. data/lib/packwerk/application_validator.rb +343 -0
  26. data/lib/packwerk/association_inspector.rb +44 -0
  27. data/lib/packwerk/checking_deprecated_references.rb +40 -0
  28. data/lib/packwerk/cli.rb +238 -0
  29. data/lib/packwerk/configuration.rb +82 -0
  30. data/lib/packwerk/const_node_inspector.rb +44 -0
  31. data/lib/packwerk/constant_discovery.rb +60 -0
  32. data/lib/packwerk/constant_name_inspector.rb +22 -0
  33. data/lib/packwerk/dependency_checker.rb +28 -0
  34. data/lib/packwerk/deprecated_references.rb +92 -0
  35. data/lib/packwerk/file_processor.rb +43 -0
  36. data/lib/packwerk/files_for_processing.rb +67 -0
  37. data/lib/packwerk/formatters/progress_formatter.rb +46 -0
  38. data/lib/packwerk/generators/application_validation.rb +62 -0
  39. data/lib/packwerk/generators/configuration_file.rb +69 -0
  40. data/lib/packwerk/generators/inflections_file.rb +43 -0
  41. data/lib/packwerk/generators/root_package.rb +37 -0
  42. data/lib/packwerk/generators/templates/inflections.yml +6 -0
  43. data/lib/packwerk/generators/templates/package.yml +17 -0
  44. data/lib/packwerk/generators/templates/packwerk +23 -0
  45. data/lib/packwerk/generators/templates/packwerk.yml.erb +23 -0
  46. data/lib/packwerk/generators/templates/packwerk_validator_test.rb +11 -0
  47. data/lib/packwerk/graph.rb +74 -0
  48. data/lib/packwerk/inflections/custom.rb +33 -0
  49. data/lib/packwerk/inflections/default.rb +73 -0
  50. data/lib/packwerk/inflector.rb +41 -0
  51. data/lib/packwerk/node.rb +259 -0
  52. data/lib/packwerk/node_processor.rb +49 -0
  53. data/lib/packwerk/node_visitor.rb +22 -0
  54. data/lib/packwerk/offense.rb +44 -0
  55. data/lib/packwerk/output_styles.rb +41 -0
  56. data/lib/packwerk/package.rb +56 -0
  57. data/lib/packwerk/package_set.rb +59 -0
  58. data/lib/packwerk/parsed_constant_definitions.rb +62 -0
  59. data/lib/packwerk/parsers.rb +23 -0
  60. data/lib/packwerk/parsers/erb.rb +66 -0
  61. data/lib/packwerk/parsers/factory.rb +34 -0
  62. data/lib/packwerk/parsers/ruby.rb +42 -0
  63. data/lib/packwerk/privacy_checker.rb +45 -0
  64. data/lib/packwerk/reference.rb +6 -0
  65. data/lib/packwerk/reference_extractor.rb +81 -0
  66. data/lib/packwerk/reference_lister.rb +23 -0
  67. data/lib/packwerk/run_context.rb +103 -0
  68. data/lib/packwerk/sanity_checker.rb +10 -0
  69. data/lib/packwerk/spring_command.rb +28 -0
  70. data/lib/packwerk/updating_deprecated_references.rb +51 -0
  71. data/lib/packwerk/version.rb +6 -0
  72. data/lib/packwerk/violation_type.rb +13 -0
  73. data/library.yml +6 -0
  74. data/packwerk.gemspec +58 -0
  75. data/service.yml +6 -0
  76. data/shipit.rubygems.yml +1 -0
  77. data/sorbet/config +2 -0
  78. data/sorbet/rbi/gems/actioncable@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +840 -0
  79. data/sorbet/rbi/gems/actionmailbox@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +571 -0
  80. data/sorbet/rbi/gems/actionmailer@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +568 -0
  81. data/sorbet/rbi/gems/actionpack@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +5216 -0
  82. data/sorbet/rbi/gems/actiontext@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +663 -0
  83. data/sorbet/rbi/gems/actionview@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +2504 -0
  84. data/sorbet/rbi/gems/activejob@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +635 -0
  85. data/sorbet/rbi/gems/activemodel@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +1201 -0
  86. data/sorbet/rbi/gems/activerecord@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +8011 -0
  87. data/sorbet/rbi/gems/activestorage@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +904 -0
  88. data/sorbet/rbi/gems/activesupport@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +3888 -0
  89. data/sorbet/rbi/gems/ast@2.4.1.rbi +54 -0
  90. data/sorbet/rbi/gems/better_html@1.0.15.rbi +317 -0
  91. data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
  92. data/sorbet/rbi/gems/byebug@11.1.3.rbi +8 -0
  93. data/sorbet/rbi/gems/coderay@1.1.3.rbi +8 -0
  94. data/sorbet/rbi/gems/colorize@0.8.1.rbi +40 -0
  95. data/sorbet/rbi/gems/commander@4.5.2.rbi +8 -0
  96. data/sorbet/rbi/gems/concurrent-ruby@1.1.6.rbi +1966 -0
  97. data/sorbet/rbi/gems/constant_resolver@0.1.5.rbi +26 -0
  98. data/sorbet/rbi/gems/crass@1.0.6.rbi +138 -0
  99. data/sorbet/rbi/gems/erubi@1.9.0.rbi +39 -0
  100. data/sorbet/rbi/gems/globalid@0.4.2.rbi +178 -0
  101. data/sorbet/rbi/gems/highline@2.0.3.rbi +8 -0
  102. data/sorbet/rbi/gems/html_tokenizer@0.0.7.rbi +46 -0
  103. data/sorbet/rbi/gems/i18n@1.8.2.rbi +633 -0
  104. data/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi +8 -0
  105. data/sorbet/rbi/gems/loofah@2.5.0.rbi +272 -0
  106. data/sorbet/rbi/gems/m@1.5.1.rbi +108 -0
  107. data/sorbet/rbi/gems/mail@2.7.1.rbi +2490 -0
  108. data/sorbet/rbi/gems/marcel@0.3.3.rbi +30 -0
  109. data/sorbet/rbi/gems/method_source@1.0.0.rbi +76 -0
  110. data/sorbet/rbi/gems/mimemagic@0.3.5.rbi +47 -0
  111. data/sorbet/rbi/gems/mini_mime@1.0.2.rbi +71 -0
  112. data/sorbet/rbi/gems/mini_portile2@2.4.0.rbi +8 -0
  113. data/sorbet/rbi/gems/minitest@5.14.0.rbi +542 -0
  114. data/sorbet/rbi/gems/mocha@1.11.2.rbi +964 -0
  115. data/sorbet/rbi/gems/nio4r@2.5.2.rbi +89 -0
  116. data/sorbet/rbi/gems/nokogiri@1.10.9.rbi +1608 -0
  117. data/sorbet/rbi/gems/parallel@1.19.1.rbi +8 -0
  118. data/sorbet/rbi/gems/parlour@4.0.1.rbi +561 -0
  119. data/sorbet/rbi/gems/parser@2.7.1.4.rbi +1632 -0
  120. data/sorbet/rbi/gems/pry@0.13.1.rbi +8 -0
  121. data/sorbet/rbi/gems/rack-test@1.1.0.rbi +335 -0
  122. data/sorbet/rbi/gems/rack@2.2.2.rbi +1730 -0
  123. data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +123 -0
  124. data/sorbet/rbi/gems/rails-html-sanitizer@1.3.0.rbi +213 -0
  125. data/sorbet/rbi/gems/rails@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +8 -0
  126. data/sorbet/rbi/gems/railties@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +869 -0
  127. data/sorbet/rbi/gems/rainbow@3.0.0.rbi +155 -0
  128. data/sorbet/rbi/gems/rake@13.0.1.rbi +841 -0
  129. data/sorbet/rbi/gems/rexml@3.2.4.rbi +8 -0
  130. data/sorbet/rbi/gems/rubocop-performance@1.5.2.rbi +8 -0
  131. data/sorbet/rbi/gems/rubocop-shopify@1.0.2.rbi +8 -0
  132. data/sorbet/rbi/gems/rubocop-sorbet@0.3.7.rbi +8 -0
  133. data/sorbet/rbi/gems/rubocop@0.82.0.rbi +8 -0
  134. data/sorbet/rbi/gems/ruby-progressbar@1.10.1.rbi +8 -0
  135. data/sorbet/rbi/gems/smart_properties@1.15.0.rbi +168 -0
  136. data/sorbet/rbi/gems/spoom@1.0.4.rbi +418 -0
  137. data/sorbet/rbi/gems/spring@2.1.0.rbi +160 -0
  138. data/sorbet/rbi/gems/sprockets-rails@3.2.1.rbi +431 -0
  139. data/sorbet/rbi/gems/sprockets@4.0.0.rbi +1132 -0
  140. data/sorbet/rbi/gems/tapioca@0.4.5.rbi +518 -0
  141. data/sorbet/rbi/gems/thor@1.0.1.rbi +892 -0
  142. data/sorbet/rbi/gems/tzinfo@2.0.2.rbi +547 -0
  143. data/sorbet/rbi/gems/unicode-display_width@1.7.0.rbi +8 -0
  144. data/sorbet/rbi/gems/websocket-driver@0.7.1.rbi +438 -0
  145. data/sorbet/rbi/gems/websocket-extensions@0.1.4.rbi +71 -0
  146. data/sorbet/rbi/gems/zeitwerk@2.3.0.rbi +8 -0
  147. data/sorbet/tapioca/require.rb +25 -0
  148. data/static/packwerk-check-demo.png +0 -0
  149. data/static/packwerk_check.gif +0 -0
  150. data/static/packwerk_check_violation.gif +0 -0
  151. data/static/packwerk_update.gif +0 -0
  152. data/static/packwerk_validate.gif +0 -0
  153. metadata +341 -0
@@ -0,0 +1,8 @@
1
+ # DO NOT EDIT MANUALLY
2
+ # This is an autogenerated file for types exported from the `rexml` gem.
3
+ # Please instead update this file by running `dev typecheck update`.
4
+
5
+ # typed: true
6
+
7
+ # THIS IS AN EMPTY RBI FILE.
8
+ # see https://github.com/Shopify/tapioca/blob/master/README.md#manual-gem-requires
@@ -0,0 +1,8 @@
1
+ # DO NOT EDIT MANUALLY
2
+ # This is an autogenerated file for types exported from the `rubocop-performance` gem.
3
+ # Please instead update this file by running `dev typecheck update`.
4
+
5
+ # typed: true
6
+
7
+ # THIS IS AN EMPTY RBI FILE.
8
+ # see https://github.com/Shopify/tapioca/blob/master/README.md#manual-gem-requires
@@ -0,0 +1,8 @@
1
+ # DO NOT EDIT MANUALLY
2
+ # This is an autogenerated file for types exported from the `rubocop-shopify` gem.
3
+ # Please instead update this file by running `dev typecheck update`.
4
+
5
+ # typed: true
6
+
7
+ # THIS IS AN EMPTY RBI FILE.
8
+ # see https://github.com/Shopify/tapioca/blob/master/README.md#manual-gem-requires
@@ -0,0 +1,8 @@
1
+ # DO NOT EDIT MANUALLY
2
+ # This is an autogenerated file for types exported from the `rubocop-sorbet` gem.
3
+ # Please instead update this file by running `dev typecheck update`.
4
+
5
+ # typed: true
6
+
7
+ # THIS IS AN EMPTY RBI FILE.
8
+ # see https://github.com/Shopify/tapioca/blob/master/README.md#manual-gem-requires
@@ -0,0 +1,8 @@
1
+ # DO NOT EDIT MANUALLY
2
+ # This is an autogenerated file for types exported from the `rubocop` gem.
3
+ # Please instead update this file by running `dev typecheck update`.
4
+
5
+ # typed: true
6
+
7
+ # THIS IS AN EMPTY RBI FILE.
8
+ # see https://github.com/Shopify/tapioca/blob/master/README.md#manual-gem-requires
@@ -0,0 +1,8 @@
1
+ # DO NOT EDIT MANUALLY
2
+ # This is an autogenerated file for types exported from the `ruby-progressbar` gem.
3
+ # Please instead update this file by running `dev typecheck update`.
4
+
5
+ # typed: true
6
+
7
+ # THIS IS AN EMPTY RBI FILE.
8
+ # see https://github.com/Shopify/tapioca/blob/master/README.md#manual-gem-requires
@@ -0,0 +1,168 @@
1
+ # DO NOT EDIT MANUALLY
2
+ # This is an autogenerated file for types exported from the `smart_properties` gem.
3
+ # Please instead update this file by running `dev typecheck update`.
4
+
5
+ # typed: true
6
+
7
+ module SmartProperties
8
+ mixes_in_class_methods(::SmartProperties::ClassMethods)
9
+
10
+ def initialize(*args, &block); end
11
+
12
+ def [](name); end
13
+ def []=(name, value); end
14
+
15
+ class << self
16
+
17
+ private
18
+
19
+ def included(base); end
20
+ end
21
+ end
22
+
23
+ class SmartProperties::AssignmentError < ::SmartProperties::Error
24
+ def initialize(sender, property, message); end
25
+
26
+ def property; end
27
+ def property=(_); end
28
+ def sender; end
29
+ def sender=(_); end
30
+ end
31
+
32
+ module SmartProperties::ClassMethods
33
+ def properties; end
34
+
35
+ protected
36
+
37
+ def property(name, options = T.unsafe(nil)); end
38
+ def property!(name, options = T.unsafe(nil)); end
39
+ end
40
+
41
+ class SmartProperties::ConfigurationError < ::SmartProperties::Error
42
+ end
43
+
44
+ class SmartProperties::ConstructorArgumentForwardingError < ::SmartProperties::Error
45
+ def initialize(positional_arguments, keyword_arguments); end
46
+
47
+
48
+ private
49
+
50
+ def generate_description(argument_type, argument_number); end
51
+ end
52
+
53
+ class SmartProperties::Error < ::ArgumentError
54
+ end
55
+
56
+ class SmartProperties::InitializationError < ::SmartProperties::Error
57
+ def initialize(sender, properties); end
58
+
59
+ def properties; end
60
+ def properties=(_); end
61
+ def sender; end
62
+ def sender=(_); end
63
+ def to_hash; end
64
+ end
65
+
66
+ class SmartProperties::InvalidValueError < ::SmartProperties::AssignmentError
67
+ def initialize(sender, property, value); end
68
+
69
+ def to_hash; end
70
+ def value; end
71
+ def value=(_); end
72
+
73
+ private
74
+
75
+ def accepter_message(sender, property); end
76
+ end
77
+
78
+ class SmartProperties::MissingValueError < ::SmartProperties::AssignmentError
79
+ def initialize(sender, property); end
80
+
81
+ def to_hash; end
82
+ end
83
+
84
+ class SmartProperties::Property
85
+ def initialize(name, attrs = T.unsafe(nil)); end
86
+
87
+ def accepter; end
88
+ def accepts?(value, scope); end
89
+ def convert(scope, value); end
90
+ def converter; end
91
+ def default(scope); end
92
+ def define(klass); end
93
+ def get(scope); end
94
+ def instance_variable_name; end
95
+ def missing?(scope); end
96
+ def name; end
97
+ def optional?(scope); end
98
+ def prepare(scope, value); end
99
+ def present?(scope); end
100
+ def reader; end
101
+ def required?(scope); end
102
+ def set(scope, value); end
103
+ def set_default(scope); end
104
+ def to_h; end
105
+ def writable; end
106
+ def writable?; end
107
+
108
+ private
109
+
110
+ def null_object?(object); end
111
+
112
+ class << self
113
+ def define(scope, name, options = T.unsafe(nil)); end
114
+ end
115
+ end
116
+
117
+ SmartProperties::Property::ALLOWED_DEFAULT_CLASSES = T.let(T.unsafe(nil), Array)
118
+
119
+ SmartProperties::Property::MODULE_REFERENCE = T.let(T.unsafe(nil), Symbol)
120
+
121
+ class SmartProperties::PropertyCollection
122
+ include(::Enumerable)
123
+
124
+ def initialize; end
125
+
126
+ def [](name); end
127
+ def []=(name, value); end
128
+ def each(&block); end
129
+ def key?(name); end
130
+ def keys; end
131
+ def parent; end
132
+ def register(child); end
133
+ def to_hash; end
134
+ def values; end
135
+
136
+ protected
137
+
138
+ def children; end
139
+ def children=(_); end
140
+ def collection; end
141
+ def collection=(_); end
142
+ def collection_with_parent_collection; end
143
+ def collection_with_parent_collection=(_); end
144
+ def notify_children; end
145
+ def refresh(parent_collection); end
146
+
147
+ class << self
148
+ def for(scope); end
149
+ end
150
+ end
151
+
152
+ SmartProperties::VERSION = T.let(T.unsafe(nil), String)
153
+
154
+ module SmartProperties::Validations
155
+ end
156
+
157
+ class SmartProperties::Validations::Ancestor
158
+ include(::SmartProperties)
159
+ extend(::SmartProperties::ClassMethods)
160
+
161
+ def to_proc; end
162
+ def to_s; end
163
+ def validate(klass); end
164
+
165
+ class << self
166
+ def must_be(*_); end
167
+ end
168
+ end
@@ -0,0 +1,418 @@
1
+ # DO NOT EDIT MANUALLY
2
+ # This is an autogenerated file for types exported from the `spoom` gem.
3
+ # Please instead update this file by running `dev typecheck update`.
4
+
5
+ # typed: true
6
+
7
+ module Spoom
8
+ end
9
+
10
+ module Spoom::Cli
11
+ end
12
+
13
+ module Spoom::Cli::Commands
14
+ end
15
+
16
+ class Spoom::Cli::Commands::Base < ::Thor
17
+ def in_sorbet_project!; end
18
+ def in_sorbet_project?; end
19
+ def say_error(message, status = T.unsafe(nil)); end
20
+ end
21
+
22
+ class Spoom::Cli::Commands::Config < ::Spoom::Cli::Commands::Base
23
+ def files; end
24
+ def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
25
+ def show; end
26
+ end
27
+
28
+ class Spoom::Cli::Commands::LSP < ::Spoom::Cli::Commands::Base
29
+ def defs(file, line, col); end
30
+ def find(query); end
31
+ def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
32
+ def hover(file, line, col); end
33
+ def list; end
34
+ def lsp_client; end
35
+ def refs(file, line, col); end
36
+ def run(&block); end
37
+ def show; end
38
+ def sigs(file, line, col); end
39
+ def symbols(file); end
40
+ def types(file, line, col); end
41
+ end
42
+
43
+ class Spoom::Cli::Commands::Run < ::Spoom::Cli::Commands::Base
44
+ def colorize_code(code, colors = T.unsafe(nil)); end
45
+ def colorize_message(message, colors = T.unsafe(nil)); end
46
+ def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
47
+ def metrics; end
48
+ def tc; end
49
+ end
50
+
51
+ class Spoom::Cli::Main < ::Thor
52
+ def config(*args); end
53
+ def lsp(*args); end
54
+ def tc(*args); end
55
+
56
+ class << self
57
+ def exit_on_failure?; end
58
+ end
59
+ end
60
+
61
+ class Spoom::Cli::SymbolPrinter
62
+ def initialize(default_indent, no_color = T.unsafe(nil)); end
63
+
64
+ def dedent; end
65
+ def indent; end
66
+ def no_color; end
67
+ def no_color=(_); end
68
+ def print(string); end
69
+ def printn; end
70
+ def printt; end
71
+ def seen; end
72
+ def seen=(_); end
73
+ def visit(object); end
74
+
75
+ class << self
76
+ def print_list(list, no_color); end
77
+ def print_object(object, no_color); end
78
+ end
79
+ end
80
+
81
+ module Spoom::Config
82
+ end
83
+
84
+ Spoom::Config::SORBET_CONFIG = T.let(T.unsafe(nil), String)
85
+
86
+ Spoom::Config::SORBET_GEM_PATH = T.let(T.unsafe(nil), String)
87
+
88
+ Spoom::Config::SORBET_PATH = T.let(T.unsafe(nil), String)
89
+
90
+ Spoom::Config::WORKSPACE_PATH = T.let(T.unsafe(nil), String)
91
+
92
+ class Spoom::Error < ::StandardError
93
+ end
94
+
95
+ module Spoom::LSP
96
+ end
97
+
98
+ class Spoom::LSP::Client
99
+ def initialize(sorbet_cmd, *sorbet_args); end
100
+
101
+ def close; end
102
+ def definitions(uri, line, column); end
103
+ def document_symbols(uri); end
104
+ def hover(uri, line, column); end
105
+ def next_id; end
106
+ def open(workspace_path); end
107
+ def read; end
108
+ def read_raw; end
109
+ def references(uri, line, column, include_decl = T.unsafe(nil)); end
110
+ def send(message); end
111
+ def send_raw(json_string); end
112
+ def signatures(uri, line, column); end
113
+ def symbols(query); end
114
+ def type_definitions(uri, line, column); end
115
+ end
116
+
117
+ class Spoom::LSP::Diagnostic < ::T::Struct
118
+ const :range, Spoom::LSP::Range
119
+ const :code, Integer
120
+ const :message, String
121
+ const :informations, Object
122
+
123
+ def to_s; end
124
+
125
+ class << self
126
+ def from_json(json); end
127
+ def inherited(s); end
128
+ end
129
+ end
130
+
131
+ class Spoom::LSP::DocumentSymbol < ::T::Struct
132
+ const :name, String
133
+ const :detail, T.nilable(String)
134
+ const :kind, Integer
135
+ const :location, T.nilable(Spoom::LSP::Location)
136
+ const :range, T.nilable(Spoom::LSP::Range)
137
+ const :children, T::Array[Spoom::LSP::DocumentSymbol]
138
+
139
+ def accept_printer(printer); end
140
+ def kind_string; end
141
+ def to_s; end
142
+
143
+ class << self
144
+ def from_json(json); end
145
+ def inherited(s); end
146
+ end
147
+ end
148
+
149
+ Spoom::LSP::DocumentSymbol::SYMBOL_KINDS = T.let(T.unsafe(nil), Hash)
150
+
151
+ class Spoom::LSP::Error < ::StandardError
152
+ end
153
+
154
+ class Spoom::LSP::Error::AlreadyOpen < ::Spoom::LSP::Error
155
+ end
156
+
157
+ class Spoom::LSP::Error::BadHeaders < ::Spoom::LSP::Error
158
+ end
159
+
160
+ class Spoom::LSP::Error::Diagnostics < ::Spoom::LSP::Error
161
+ def initialize(uri, diagnostics); end
162
+
163
+ def diagnostics; end
164
+ def uri; end
165
+
166
+ class << self
167
+ def from_json(json); end
168
+ end
169
+ end
170
+
171
+ class Spoom::LSP::Hover < ::T::Struct
172
+ const :contents, String
173
+ const :range, T.nilable(T::Range[T.untyped])
174
+
175
+ def accept_printer(printer); end
176
+ def to_s; end
177
+
178
+ class << self
179
+ def from_json(json); end
180
+ def inherited(s); end
181
+ end
182
+ end
183
+
184
+ class Spoom::LSP::Location < ::T::Struct
185
+ const :uri, String
186
+ const :range, Spoom::LSP::Range
187
+
188
+ def accept_printer(printer); end
189
+ def to_s; end
190
+
191
+ class << self
192
+ def from_json(json); end
193
+ def inherited(s); end
194
+ end
195
+ end
196
+
197
+ class Spoom::LSP::Message
198
+ def initialize; end
199
+
200
+ def as_json; end
201
+ def jsonrpc; end
202
+ def to_json(*args); end
203
+ end
204
+
205
+ class Spoom::LSP::Notification < ::Spoom::LSP::Message
206
+ def initialize(method, params); end
207
+
208
+ def method; end
209
+ def params; end
210
+ end
211
+
212
+ class Spoom::LSP::Position < ::T::Struct
213
+ const :line, Integer
214
+ const :char, Integer
215
+
216
+ def accept_printer(printer); end
217
+ def to_s; end
218
+
219
+ class << self
220
+ def from_json(json); end
221
+ def inherited(s); end
222
+ end
223
+ end
224
+
225
+ class Spoom::LSP::Range < ::T::Struct
226
+ const :start, Spoom::LSP::Position
227
+ const :end, Spoom::LSP::Position
228
+
229
+ def accept_printer(printer); end
230
+ def to_s; end
231
+
232
+ class << self
233
+ def from_json(json); end
234
+ def inherited(s); end
235
+ end
236
+ end
237
+
238
+ class Spoom::LSP::Request < ::Spoom::LSP::Message
239
+ def initialize(id, method, params); end
240
+
241
+ def id; end
242
+ def method; end
243
+ def params; end
244
+ end
245
+
246
+ class Spoom::LSP::ResponseError < ::Spoom::LSP::Error
247
+ def initialize(code, message, data); end
248
+
249
+ def code; end
250
+ def data; end
251
+ def message; end
252
+
253
+ class << self
254
+ def from_json(json); end
255
+ end
256
+ end
257
+
258
+ class Spoom::LSP::SignatureHelp < ::T::Struct
259
+ const :label, T.nilable(String)
260
+ const :doc, Object
261
+ const :params, T::Array[T.untyped]
262
+
263
+ def accept_printer(printer); end
264
+ def to_s; end
265
+
266
+ class << self
267
+ def from_json(json); end
268
+ def inherited(s); end
269
+ end
270
+ end
271
+
272
+ module Spoom::Sorbet
273
+ class << self
274
+ sig { params(arg: String, path: String, capture_err: T::Boolean).returns([String, T::Boolean]) }
275
+ def srb(*arg, path: T.unsafe(nil), capture_err: T.unsafe(nil)); end
276
+ sig { params(config: Spoom::Sorbet::Config, path: String).returns(T::Array[String]) }
277
+ def srb_files(config, path: T.unsafe(nil)); end
278
+ sig { params(arg: String, path: String, capture_err: T::Boolean).returns(T.nilable(Spoom::Sorbet::Metrics)) }
279
+ def srb_metrics(*arg, path: T.unsafe(nil), capture_err: T.unsafe(nil)); end
280
+ sig { params(arg: String, path: String, capture_err: T::Boolean).returns([String, T::Boolean]) }
281
+ def srb_tc(*arg, path: T.unsafe(nil), capture_err: T.unsafe(nil)); end
282
+ sig { params(arg: String, path: String, capture_err: T::Boolean).returns(T.nilable(String)) }
283
+ def srb_version(*arg, path: T.unsafe(nil), capture_err: T.unsafe(nil)); end
284
+ end
285
+ end
286
+
287
+ class Spoom::Sorbet::Config
288
+ sig { void }
289
+ def initialize; end
290
+
291
+ def allowed_extensions; end
292
+ def ignore; end
293
+ sig { returns(T::Array[String]) }
294
+ def paths; end
295
+
296
+ class << self
297
+ sig { params(sorbet_config_path: String).returns(Spoom::Sorbet::Config) }
298
+ def parse_file(sorbet_config_path); end
299
+ sig { params(sorbet_config: String).returns(Spoom::Sorbet::Config) }
300
+ def parse_string(sorbet_config); end
301
+
302
+ private
303
+
304
+ sig { params(line: String).returns(String) }
305
+ def parse_option(line); end
306
+ end
307
+ end
308
+
309
+ module Spoom::Sorbet::Errors
310
+ end
311
+
312
+ class Spoom::Sorbet::Errors::Error
313
+ include(::Comparable)
314
+
315
+ sig { params(file: T.nilable(String), line: T.nilable(Integer), message: T.nilable(String), code: T.nilable(Integer), more: T::Array[String]).void }
316
+ def initialize(file, line, message, code, more = T.unsafe(nil)); end
317
+
318
+ sig { params(other: T.untyped).returns(Integer) }
319
+ def <=>(other); end
320
+ def code; end
321
+ sig { returns(T.nilable(String)) }
322
+ def file; end
323
+ sig { returns(T.nilable(Integer)) }
324
+ def line; end
325
+ def message; end
326
+ sig { returns(T::Array[String]) }
327
+ def more; end
328
+ sig { returns(String) }
329
+ def to_s; end
330
+
331
+ class << self
332
+ sig { params(line: String).returns(Spoom::Sorbet::Errors::Error) }
333
+ def from_error_line(line); end
334
+ end
335
+ end
336
+
337
+ class Spoom::Sorbet::Errors::Parser
338
+ sig { void }
339
+ def initialize; end
340
+
341
+ sig { params(output: String).returns(T::Array[Spoom::Sorbet::Errors::Error]) }
342
+ def parse(output); end
343
+
344
+ private
345
+
346
+ sig { params(line: String).void }
347
+ def append_error(line); end
348
+ sig { void }
349
+ def close_error; end
350
+ sig { params(line: String).returns(T.nilable(Integer)) }
351
+ def leading_spaces(line); end
352
+ sig { params(line: String).void }
353
+ def open_error(line); end
354
+
355
+ class << self
356
+ sig { params(output: String).returns(T::Array[Spoom::Sorbet::Errors::Error]) }
357
+ def parse_string(output); end
358
+ end
359
+ end
360
+
361
+ Spoom::Sorbet::Errors::Parser::HEADER = T.let(T.unsafe(nil), Array)
362
+
363
+ class Spoom::Sorbet::Metrics < ::T::Struct
364
+ const :repo, String
365
+ const :sha, String
366
+ const :status, String
367
+ const :branch, String
368
+ const :timestamp, Integer
369
+ const :uuid, String
370
+ const :metrics, T::Hash[String, T.nilable(Integer)]
371
+
372
+ sig { params(key: String).returns(T.nilable(Integer)) }
373
+ def [](key); end
374
+ sig { returns(T::Hash[String, T.nilable(Integer)]) }
375
+ def files_by_strictness; end
376
+ sig { returns(Integer) }
377
+ def files_count; end
378
+ sig { params(out: T.any(IO, StringIO)).void }
379
+ def show(out = T.unsafe(nil)); end
380
+ sig { returns(String) }
381
+ def to_s; end
382
+
383
+ private
384
+
385
+ sig { params(value: T.nilable(Integer), total: T.nilable(Integer)).returns(String) }
386
+ def percent(value, total); end
387
+
388
+ class << self
389
+ def inherited(s); end
390
+ sig { params(path: String, prefix: String).returns(Spoom::Sorbet::Metrics) }
391
+ def parse_file(path, prefix = T.unsafe(nil)); end
392
+ sig { params(obj: T::Hash[String, T.untyped], prefix: String).returns(Spoom::Sorbet::Metrics) }
393
+ def parse_hash(obj, prefix = T.unsafe(nil)); end
394
+ sig { params(string: String, prefix: String).returns(Spoom::Sorbet::Metrics) }
395
+ def parse_string(string, prefix = T.unsafe(nil)); end
396
+ end
397
+ end
398
+
399
+ Spoom::Sorbet::Metrics::DEFAULT_PREFIX = T.let(T.unsafe(nil), String)
400
+
401
+ Spoom::Sorbet::Metrics::SIGILS = T.let(T.unsafe(nil), Array)
402
+
403
+ Spoom::VERSION = T.let(T.unsafe(nil), String)
404
+
405
+ class String
406
+ include(::Comparable)
407
+ include(::Colorize::InstanceMethods)
408
+ include(::JSON::Ext::Generator::GeneratorMethods::String)
409
+ extend(::Colorize::ClassMethods)
410
+ extend(::JSON::Ext::Generator::GeneratorMethods::String::Extend)
411
+
412
+ def from_uri; end
413
+ def to_uri; end
414
+ end
415
+
416
+ String::BLANK_RE = T.let(T.unsafe(nil), Regexp)
417
+
418
+ String::ENCODED_BLANKS = T.let(T.unsafe(nil), Concurrent::Map)