sord 0.8.0 → 3.0.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- data/.github/ISSUE_TEMPLATE/feature-request.md +0 -0
- data/.gitignore +0 -0
- data/.parlour +11 -0
- data/.rspec +0 -0
- data/.travis.yml +6 -0
- data/CHANGELOG.md +99 -0
- data/CODE_OF_CONDUCT.md +0 -0
- data/Gemfile +0 -0
- data/LICENSE.txt +0 -0
- data/README.md +17 -11
- data/Rakefile +87 -12
- data/exe/sord +50 -33
- data/lib/sord.rb +2 -1
- data/lib/sord/generator.rb +592 -0
- data/lib/sord/logging.rb +21 -30
- data/lib/sord/parlour_plugin.rb +84 -0
- data/lib/sord/resolver.rb +9 -2
- data/lib/sord/type_converter.rb +88 -42
- data/lib/sord/version.rb +1 -1
- data/rbi/sord.rbi +279 -68
- data/sord.gemspec +3 -3
- metadata +23 -38
- data/lib/sord/rbi_generator.rb +0 -334
- data/sorbet/config +0 -0
- data/sorbet/rbi/gems/colorize.rbi +0 -81
- data/sorbet/rbi/gems/docile.rbi +0 -31
- data/sorbet/rbi/gems/rake.rbi +0 -643
- data/sorbet/rbi/gems/rspec-core.rbi +0 -1658
- data/sorbet/rbi/gems/rspec-expectations.rbi +0 -389
- data/sorbet/rbi/gems/rspec-mocks.rbi +0 -823
- data/sorbet/rbi/gems/rspec-support.rbi +0 -268
- data/sorbet/rbi/gems/rspec.rbi +0 -14
- data/sorbet/rbi/gems/simplecov-html.rbi +0 -30
- data/sorbet/rbi/gems/simplecov.rbi +0 -223
- data/sorbet/rbi/gems/sorbet-runtime.rbi +0 -647
- data/sorbet/rbi/gems/yard.rbi +0 -310
- data/sorbet/rbi/hidden-definitions/errors.txt +0 -9353
- data/sorbet/rbi/hidden-definitions/hidden.rbi +0 -16640
- data/sorbet/rbi/sorbet-typed/lib/bundler/all/bundler.rbi +0 -8547
- data/sorbet/rbi/sorbet-typed/lib/ruby/all/open3.rbi +0 -111
- data/sorbet/rbi/sorbet-typed/lib/ruby/all/resolv.rbi +0 -543
data/lib/sord/version.rb
CHANGED
data/rbi/sord.rbi
CHANGED
@@ -1,165 +1,376 @@
|
|
1
1
|
# typed: strong
|
2
2
|
module Sord
|
3
|
+
VERSION = T.let('3.0.0.beta.1', T.untyped)
|
4
|
+
|
5
|
+
# Handles writing logs to stdout and any other classes which request them.
|
3
6
|
module Logging
|
7
|
+
AVAILABLE_TYPES = T.let([:warn, :info, :duck, :error, :infer, :omit, :done].freeze, T.untyped)
|
8
|
+
|
9
|
+
# _@return_ — The hooks registered on the logger.
|
4
10
|
sig { returns(T::Array[Proc]) }
|
5
|
-
def self.hooks
|
11
|
+
def self.hooks; end
|
6
12
|
|
13
|
+
# _@return_ — Whether log messages should be printed or not. This is
|
14
|
+
# used for testing.
|
7
15
|
sig { returns(T::Boolean) }
|
8
|
-
def self.silent
|
16
|
+
def self.silent?; end
|
9
17
|
|
18
|
+
# Sets whether log messages should be printed or not.
|
19
|
+
#
|
20
|
+
# _@param_ `value`
|
10
21
|
sig { params(value: T::Boolean).void }
|
11
22
|
def self.silent=(value); end
|
12
23
|
|
24
|
+
# Sets the array of log messages types which should be processed. Any not on
|
25
|
+
# this list will be discarded. This should be a subset of AVAILABLE_TYPES.
|
26
|
+
#
|
27
|
+
# _@param_ `value`
|
13
28
|
sig { params(value: T::Array[Symbol]).void }
|
14
29
|
def self.enabled_types=(value); end
|
15
30
|
|
31
|
+
# Gets the array of log messages types which should be processed. Any not on
|
32
|
+
# this list will be discarded.
|
16
33
|
sig { returns(T::Array[Symbol]) }
|
17
|
-
def self.enabled_types
|
34
|
+
def self.enabled_types; end
|
18
35
|
|
36
|
+
# Returns a boolean indicating whether a given array is a valid value for
|
37
|
+
# #enabled_types.
|
38
|
+
#
|
39
|
+
# _@param_ `value`
|
19
40
|
sig { params(value: T::Array[Symbol]).void }
|
20
41
|
def self.valid_types?(value); end
|
21
42
|
|
22
43
|
# sord warn - YARD::CodeObjects::Base wasn't able to be resolved to a constant in this project
|
44
|
+
# A generic log message writer which is called by all other specific logging
|
45
|
+
# methods. This shouldn't be called outside of the Logging class itself.
|
46
|
+
#
|
47
|
+
# _@param_ `kind` — The kind of log message this is.
|
48
|
+
#
|
49
|
+
# _@param_ `header` — The prefix for this log message. For consistency, it should be up to five uppercase characters wrapped in square brackets, with some unique colour applied.
|
50
|
+
#
|
51
|
+
# _@param_ `msg` — The log message to write.
|
52
|
+
#
|
53
|
+
# _@param_ `item` — The CodeObject which this log is associated with, if any. This is shown before the log message if it is specified.
|
23
54
|
sig do
|
24
55
|
params(
|
25
56
|
kind: Symbol,
|
26
57
|
header: String,
|
27
58
|
msg: String,
|
28
|
-
item: YARD::CodeObjects::Base
|
29
|
-
indent_level: Integer
|
59
|
+
item: YARD::CodeObjects::Base
|
30
60
|
).void
|
31
61
|
end
|
32
|
-
def self.generic(kind, header, msg, item
|
62
|
+
def self.generic(kind, header, msg, item); end
|
33
63
|
|
34
64
|
# sord warn - YARD::CodeObjects::Base wasn't able to be resolved to a constant in this project
|
35
|
-
|
36
|
-
|
65
|
+
# Print a warning message. This should be used for things which require the
|
66
|
+
# user's attention but do not prevent the process from stopping.
|
67
|
+
#
|
68
|
+
# _@param_ `msg` — The log message to write.
|
69
|
+
#
|
70
|
+
# _@param_ `item` — The CodeObject which this log is associated with, if any. This is shown before the log message if it is specified.
|
71
|
+
sig { params(msg: String, item: T.nilable(YARD::CodeObjects::Base)).void }
|
72
|
+
def self.warn(msg, item = nil); end
|
37
73
|
|
38
74
|
# sord warn - YARD::CodeObjects::Base wasn't able to be resolved to a constant in this project
|
39
|
-
|
40
|
-
|
75
|
+
# Print an info message. This should be used for generic informational
|
76
|
+
# messages which the user doesn't need to act on.
|
77
|
+
#
|
78
|
+
# _@param_ `msg` — The log message to write.
|
79
|
+
#
|
80
|
+
# _@param_ `item` — The CodeObject which this log is associated with, if any. This is shown before the log message if it is specified.
|
81
|
+
sig { params(msg: String, item: T.nilable(YARD::CodeObjects::Base)).void }
|
82
|
+
def self.info(msg, item = nil); end
|
41
83
|
|
42
84
|
# sord warn - YARD::CodeObjects::Base wasn't able to be resolved to a constant in this project
|
43
|
-
|
44
|
-
|
85
|
+
# Print a duck-typing message. This should be used when the YARD
|
86
|
+
# documentation contains duck typing, which isn't supported by Sorbet, so
|
87
|
+
# it is substituted for something different.
|
88
|
+
#
|
89
|
+
# _@param_ `msg` — The log message to write.
|
90
|
+
#
|
91
|
+
# _@param_ `item` — The CodeObject which this log is associated with, if any. This is shown before the log message if it is specified.
|
92
|
+
sig { params(msg: String, item: T.nilable(YARD::CodeObjects::Base)).void }
|
93
|
+
def self.duck(msg, item = nil); end
|
45
94
|
|
46
95
|
# sord warn - YARD::CodeObjects::Base wasn't able to be resolved to a constant in this project
|
47
|
-
|
48
|
-
|
96
|
+
# Print an error message. This should be used for things which require the
|
97
|
+
# current process to stop.
|
98
|
+
#
|
99
|
+
# _@param_ `msg` — The log message to write.
|
100
|
+
#
|
101
|
+
# _@param_ `item` — The CodeObject which this log is associated with, if any. This is shown before the log message if it is specified.
|
102
|
+
sig { params(msg: String, item: T.nilable(YARD::CodeObjects::Base)).void }
|
103
|
+
def self.error(msg, item = nil); end
|
49
104
|
|
50
105
|
# sord warn - YARD::CodeObjects::Base wasn't able to be resolved to a constant in this project
|
51
|
-
|
52
|
-
|
106
|
+
# Print an infer message. This should be used when the user should be told
|
107
|
+
# that some information has been filled in or guessed for them, and that
|
108
|
+
# information is likely correct.
|
109
|
+
#
|
110
|
+
# _@param_ `msg` — The log message to write.
|
111
|
+
#
|
112
|
+
# _@param_ `item` — The CodeObject which this log is associated with, if any. This is shown before the log message if it is specified.
|
113
|
+
sig { params(msg: String, item: T.nilable(YARD::CodeObjects::Base)).void }
|
114
|
+
def self.infer(msg, item = nil); end
|
53
115
|
|
54
116
|
# sord warn - YARD::CodeObjects::Base wasn't able to be resolved to a constant in this project
|
55
|
-
|
56
|
-
|
117
|
+
# Print an omit message. This should be used as a special type of warning
|
118
|
+
# to alert the user that there is some information missing, but this
|
119
|
+
# information is not critical to the completion of the process.
|
120
|
+
#
|
121
|
+
# _@param_ `msg` — The log message to write.
|
122
|
+
#
|
123
|
+
# _@param_ `item` — The CodeObject which this log is associated with, if any. This is shown before the log message if it is specified.
|
124
|
+
sig { params(msg: String, item: T.nilable(YARD::CodeObjects::Base)).void }
|
125
|
+
def self.omit(msg, item = nil); end
|
57
126
|
|
58
127
|
# sord warn - YARD::CodeObjects::Base wasn't able to be resolved to a constant in this project
|
59
|
-
|
60
|
-
|
128
|
+
# Print a done message. This should be used when a process completes
|
129
|
+
# successfully.
|
130
|
+
#
|
131
|
+
# _@param_ `msg` — The log message to write.
|
132
|
+
#
|
133
|
+
# _@param_ `item` — The CodeObject which this log is associated with, if any. This is shown before the log message if it is specified.
|
134
|
+
sig { params(msg: String, item: T.nilable(YARD::CodeObjects::Base)).void }
|
135
|
+
def self.done(msg, item = nil); end
|
61
136
|
|
62
137
|
# sord warn - YARD::CodeObjects::Base wasn't able to be resolved to a constant in this project
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
def self.invoke_hooks(kind, msg, item
|
138
|
+
# Invokes all registered hooks on the logger.
|
139
|
+
#
|
140
|
+
# _@param_ `kind` — The kind of log message this is.
|
141
|
+
#
|
142
|
+
# _@param_ `msg` — The log message to write.
|
143
|
+
#
|
144
|
+
# _@param_ `item` — The CodeObject which this log is associated with, if any. This is shown before the log message if it is specified.
|
145
|
+
sig { params(kind: Symbol, msg: String, item: YARD::CodeObjects::Base).void }
|
146
|
+
def self.invoke_hooks(kind, msg, item); end
|
72
147
|
|
73
148
|
# sord warn - YARD::CodeObjects::Base wasn't able to be resolved to a constant in this project
|
74
|
-
|
149
|
+
# Adds a hook to the logger.
|
150
|
+
sig { params(blk: T.proc.params(kind: Symbol, msg: String, item: YARD::CodeObjects::Base).void).void }
|
75
151
|
def self.add_hook(&blk); end
|
76
152
|
end
|
77
153
|
|
78
154
|
module Resolver
|
79
155
|
sig { void }
|
80
|
-
def self.prepare
|
156
|
+
def self.prepare; end
|
81
157
|
|
82
158
|
sig { void }
|
83
|
-
def self.clear
|
159
|
+
def self.clear; end
|
84
160
|
|
161
|
+
# _@param_ `name`
|
85
162
|
sig { params(name: String).returns(T::Array[String]) }
|
86
163
|
def self.paths_for(name); end
|
87
164
|
|
165
|
+
# _@param_ `name`
|
88
166
|
sig { params(name: String).returns(T.nilable(String)) }
|
89
167
|
def self.path_for(name); end
|
90
168
|
|
91
169
|
sig { returns(T::Array[String]) }
|
92
|
-
def self.builtin_classes
|
170
|
+
def self.builtin_classes; end
|
93
171
|
|
172
|
+
# _@param_ `name`
|
173
|
+
#
|
174
|
+
# _@param_ `item`
|
94
175
|
sig { params(name: String, item: Object).returns(T::Boolean) }
|
95
176
|
def self.resolvable?(name, item); end
|
96
177
|
end
|
97
178
|
|
98
|
-
|
99
|
-
|
100
|
-
|
179
|
+
# Converts the current working directory's YARD registry into an type
|
180
|
+
# signature file.
|
181
|
+
class Generator
|
182
|
+
VALID_MODES = T.let([:rbi, :rbs], T.untyped)
|
101
183
|
|
184
|
+
# _@return_ — The number of objects this generator has processed so
|
185
|
+
# far.
|
102
186
|
sig { returns(Integer) }
|
103
|
-
def object_count
|
187
|
+
def object_count; end
|
188
|
+
|
189
|
+
# Create a new generator.
|
190
|
+
#
|
191
|
+
# _@param_ `options`
|
192
|
+
sig { params(options: T::Hash[T.untyped, T.untyped]).void }
|
193
|
+
def initialize(options); end
|
194
|
+
|
195
|
+
# Increment the namespace counter.
|
196
|
+
sig { void }
|
197
|
+
def count_namespace; end
|
198
|
+
|
199
|
+
# Increment the method counter.
|
200
|
+
sig { void }
|
201
|
+
def count_method; end
|
104
202
|
|
105
203
|
# sord warn - YARD::CodeObjects::Base wasn't able to be resolved to a constant in this project
|
106
|
-
|
107
|
-
|
204
|
+
# Given a YARD CodeObject, add lines defining its mixins (that is, extends
|
205
|
+
# and includes) to the current file. Returns the number of mixins.
|
206
|
+
#
|
207
|
+
# _@param_ `item`
|
208
|
+
sig { params(item: YARD::CodeObjects::Base).returns(Integer) }
|
209
|
+
def add_mixins(item); end
|
108
210
|
|
109
|
-
|
110
|
-
|
211
|
+
# sord warn - YARD::CodeObjects::NamespaceObject wasn't able to be resolved to a constant in this project
|
212
|
+
# Given a YARD NamespaceObject, add lines defining constants.
|
213
|
+
#
|
214
|
+
# _@param_ `item`
|
215
|
+
sig { params(item: YARD::CodeObjects::NamespaceObject).void }
|
216
|
+
def add_constants(item); end
|
111
217
|
|
112
|
-
# sord
|
113
|
-
|
114
|
-
|
218
|
+
# sord warn - YARD::CodeObjects::NamespaceObject wasn't able to be resolved to a constant in this project
|
219
|
+
# sord warn - Parlour::TypedObject wasn't able to be resolved to a constant in this project
|
220
|
+
# Adds comments to an object based on a docstring.
|
221
|
+
#
|
222
|
+
# _@param_ `item`
|
223
|
+
#
|
224
|
+
# _@param_ `typed_object`
|
225
|
+
sig { params(item: YARD::CodeObjects::NamespaceObject, typed_object: Parlour::TypedObject).void }
|
226
|
+
def add_comments(item, typed_object); end
|
115
227
|
|
116
|
-
|
117
|
-
|
228
|
+
# sord warn - YARD::CodeObjects::NamespaceObject wasn't able to be resolved to a constant in this project
|
229
|
+
# Given a YARD NamespaceObject, add lines defining its methods and their
|
230
|
+
# signatures to the current file.
|
231
|
+
#
|
232
|
+
# _@param_ `item`
|
233
|
+
sig { params(item: YARD::CodeObjects::NamespaceObject).void }
|
234
|
+
def add_methods(item); end
|
118
235
|
|
236
|
+
# sord warn - YARD::CodeObjects::NamespaceObject wasn't able to be resolved to a constant in this project
|
237
|
+
# Given a YARD NamespaceObject, add lines defining either its class
|
238
|
+
# and instance attributes and their signatures to the current file.
|
239
|
+
#
|
240
|
+
# _@param_ `item`
|
241
|
+
sig { params(item: YARD::CodeObjects::NamespaceObject).void }
|
242
|
+
def add_attributes(item); end
|
243
|
+
|
244
|
+
# sord warn - YARD::CodeObjects::NamespaceObject wasn't able to be resolved to a constant in this project
|
245
|
+
# Given a YARD NamespaceObject, add lines defining its mixins, methods
|
246
|
+
# and children to the file.
|
247
|
+
#
|
248
|
+
# _@param_ `item`
|
249
|
+
sig { params(item: YARD::CodeObjects::NamespaceObject).void }
|
250
|
+
def add_namespace(item); end
|
251
|
+
|
252
|
+
# Populates the generator with the contents of the YARD registry. You
|
253
|
+
# must load the YARD registry first!
|
119
254
|
sig { void }
|
120
|
-
def
|
255
|
+
def populate; end
|
121
256
|
|
257
|
+
# Populates the generator with the contents of the YARD registry, then
|
258
|
+
# uses the loaded Parlour::Generator to generate the file. You must
|
259
|
+
# load the YARD registry first!
|
122
260
|
sig { void }
|
123
|
-
def
|
261
|
+
def generate; end
|
124
262
|
|
263
|
+
# Loads the YARD registry, populates the file, and prints any relevant
|
264
|
+
# final logs.
|
125
265
|
sig { void }
|
126
|
-
def
|
266
|
+
def run; end
|
267
|
+
|
268
|
+
# Given two pairs of arrays representing method parameters, in the form
|
269
|
+
# of ["variable_name", "default_value"], sort the parameters so they're
|
270
|
+
# valid for Sorbet. Sorbet requires that, e.g. required kwargs go before
|
271
|
+
# optional kwargs.
|
272
|
+
#
|
273
|
+
# _@param_ `pair1`
|
274
|
+
#
|
275
|
+
# _@param_ `pair2`
|
276
|
+
#
|
277
|
+
# _@return_ — Integer
|
278
|
+
sig { params(pair1: T::Array[T.untyped], pair2: T::Array[T.untyped]).returns(T.untyped) }
|
279
|
+
def sort_params(pair1, pair2); end
|
127
280
|
|
128
281
|
# sord warn - YARD::CodeObjects::Base wasn't able to be resolved to a constant in this project
|
129
|
-
|
130
|
-
|
282
|
+
# _@return_ — The
|
283
|
+
# errors encountered by by the generator. Each element is of the form
|
284
|
+
# [message, item, line].
|
285
|
+
sig { returns(T::Array[[String, YARD::CodeObjects::Base, Integer]]) }
|
286
|
+
attr_reader :warnings
|
287
|
+
end
|
131
288
|
|
132
|
-
|
133
|
-
|
289
|
+
class ParlourPlugin < Parlour::Plugin
|
290
|
+
# sord omit - no YARD type given for "options", using untyped
|
291
|
+
sig { params(options: T.untyped).void }
|
292
|
+
def initialize(options); end
|
134
293
|
|
135
|
-
# sord
|
136
|
-
|
137
|
-
|
294
|
+
# sord omit - no YARD type given for "root", using untyped
|
295
|
+
# sord omit - no YARD return type given, using untyped
|
296
|
+
sig { params(root: T.untyped).returns(T.untyped) }
|
297
|
+
def generate(root); end
|
138
298
|
|
139
|
-
# sord
|
140
|
-
sig { params(
|
141
|
-
def
|
299
|
+
# sord omit - no YARD return type given, using untyped
|
300
|
+
sig { params(block: T.untyped).returns(T.untyped) }
|
301
|
+
def self.with_clean_env(&block); end
|
142
302
|
|
143
|
-
|
144
|
-
|
303
|
+
# sord omit - no YARD type given for :options, using untyped
|
304
|
+
# Returns the value of attribute options.
|
305
|
+
sig { returns(T.untyped) }
|
306
|
+
attr_reader :options
|
145
307
|
|
146
|
-
|
147
|
-
|
308
|
+
# Returns the value of attribute parlour.
|
309
|
+
sig { returns(T.untyped) }
|
310
|
+
attr_accessor :parlour
|
148
311
|
end
|
149
312
|
|
313
|
+
# Contains methods to convert YARD types to Parlour types.
|
150
314
|
module TypeConverter
|
315
|
+
SIMPLE_TYPE_REGEX = T.let(/(?:\:\:)?[a-zA-Z_][\w]*(?:\:\:[a-zA-Z_][\w]*)*/, T.untyped)
|
316
|
+
GENERIC_TYPE_REGEX = T.let(/(#{SIMPLE_TYPE_REGEX})\s*[<{]\s*(.*)\s*[>}]/, T.untyped)
|
317
|
+
DUCK_TYPE_REGEX = T.let(/^\#[a-zA-Z_][\w]*(?:[a-zA-Z_][\w=]*)*(?:( ?\& ?\#)*[a-zA-Z_][\w=]*)*$/, T.untyped)
|
318
|
+
ORDERED_LIST_REGEX = T.let(/^(?:Array|)\((.*)\s*\)$/, T.untyped)
|
319
|
+
SHORTHAND_HASH_SYNTAX = T.let(/^{\s*(.*)\s*}$/, T.untyped)
|
320
|
+
SHORTHAND_ARRAY_SYNTAX = T.let(/^<\s*(.*)\s*>$/, T.untyped)
|
321
|
+
SUPPORTED_GENERIC_TYPES = T.let(%w{Array Set Enumerable Enumerator Range Hash Class}, T.untyped)
|
322
|
+
SINGLE_ARG_GENERIC_TYPES = T.let(%w{Array Set Enumerable Enumerator Range}, T.untyped)
|
323
|
+
|
324
|
+
# Given a string of YARD type parameters (without angle brackets), splits
|
325
|
+
# the string into an array of each type parameter.
|
326
|
+
#
|
327
|
+
# _@param_ `params` — The type parameters.
|
328
|
+
#
|
329
|
+
# _@return_ — The split type parameters.
|
151
330
|
sig { params(params: String).returns(T::Array[String]) }
|
152
331
|
def self.split_type_parameters(params); end
|
153
332
|
|
154
333
|
# sord warn - YARD::CodeObjects::Base wasn't able to be resolved to a constant in this project
|
334
|
+
# sord warn - Parlour::Types::Type wasn't able to be resolved to a constant in this project
|
335
|
+
# Converts a YARD type into a Parlour type.
|
336
|
+
#
|
337
|
+
# _@param_ `yard` — The YARD type.
|
338
|
+
#
|
339
|
+
# _@param_ `item` — The CodeObject which the YARD type is associated with. This is used for logging and can be nil, but this will lead to less informative log messages.
|
340
|
+
#
|
341
|
+
# _@param_ `replace_errors_with_untyped` — If true, T.untyped is used instead of SORD_ERROR_ constants for unknown types.
|
342
|
+
#
|
343
|
+
# _@param_ `replace_unresolved_with_untyped` — If true, T.untyped is used when Sord is unable to resolve a constant.
|
344
|
+
sig do
|
345
|
+
params(
|
346
|
+
yard: T.any(T::Boolean, T::Array[T.untyped], String),
|
347
|
+
item: T.nilable(YARD::CodeObjects::Base),
|
348
|
+
replace_errors_with_untyped: T::Boolean,
|
349
|
+
replace_unresolved_with_untyped: T::Boolean
|
350
|
+
).returns(Parlour::Types::Type)
|
351
|
+
end
|
352
|
+
def self.yard_to_parlour(yard, item = nil, replace_errors_with_untyped = false, replace_unresolved_with_untyped = false); end
|
353
|
+
|
354
|
+
# sord warn - Parlour::Types::Type wasn't able to be resolved to a constant in this project
|
355
|
+
# sord warn - YARD::CodeObjects::Base wasn't able to be resolved to a constant in this project
|
356
|
+
# sord warn - Parlour::Types::Type wasn't able to be resolved to a constant in this project
|
357
|
+
# Handles SORD_ERRORs.
|
358
|
+
#
|
359
|
+
# _@param_ `name`
|
360
|
+
#
|
361
|
+
# _@param_ `log_warning`
|
362
|
+
#
|
363
|
+
# _@param_ `item`
|
364
|
+
#
|
365
|
+
# _@param_ `replace_errors_with_untyped`
|
155
366
|
sig do
|
156
367
|
params(
|
157
|
-
|
368
|
+
name: T.any(String, Parlour::Types::Type),
|
369
|
+
log_warning: String,
|
158
370
|
item: YARD::CodeObjects::Base,
|
159
|
-
indent_level: Integer,
|
160
371
|
replace_errors_with_untyped: T::Boolean
|
161
|
-
).returns(
|
372
|
+
).returns(Parlour::Types::Type)
|
162
373
|
end
|
163
|
-
def self.
|
374
|
+
def self.handle_sord_error(name, log_warning, item, replace_errors_with_untyped); end
|
164
375
|
end
|
165
|
-
end
|
376
|
+
end
|
data/sord.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
|
|
16
16
|
# Specify which files should be added to the gem when it is released.
|
17
17
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
18
18
|
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
19
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
19
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|sorbet)/}) }
|
20
20
|
end
|
21
21
|
spec.bindir = "exe"
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
@@ -24,8 +24,8 @@ Gem::Specification.new do |spec|
|
|
24
24
|
|
25
25
|
spec.add_dependency 'yard'
|
26
26
|
spec.add_dependency 'sorbet-runtime'
|
27
|
-
spec.add_dependency '
|
28
|
-
spec.add_dependency '
|
27
|
+
spec.add_dependency 'commander', '~> 4.5'
|
28
|
+
spec.add_dependency 'parlour', '5.0.0.beta.3'
|
29
29
|
|
30
30
|
spec.add_development_dependency "bundler", "~> 2.0"
|
31
31
|
spec.add_development_dependency "rake", "~> 10.0"
|