type_toolkit 0.0.3 → 0.0.4
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/lib/rubocop/cop/type_toolkit/plugin.rb +33 -0
- data/lib/rubocop-type_toolkit.rb +1 -3
- data/lib/type_toolkit/version.rb +1 -1
- data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +204 -0
- metadata +32 -3
- data/sorbet/rbi/shims/lint_roller.rbi +0 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 69ee145e7a3995343a9eb0be2c2f5635c5a1b4b2533fb3b5853f7bee2ead80d5
|
|
4
|
+
data.tar.gz: f83c63c927776efaf6ae381a2450497bbf84fb138d403eddf353387ef85fd3e0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a3d3fad09a17f97fdfc2a2e5fe9a2699ac4d5c3e0363ab1ce2024867b6d06008c2ec3beb2608066392bd83ea9727459f3fa43aa25de70db347720f8eda5a11ed
|
|
7
|
+
data.tar.gz: '08a4fa698f10777b073ec2b8d90e85e2a332d278c30134b9a8931c83b8df70e1cdc588517f1c45811455c43efa146f867ffb90778e7c859f64096eedeea7ef70'
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# typed: false
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
require "lint_roller"
|
|
5
|
+
|
|
6
|
+
module RuboCop
|
|
7
|
+
module Cop
|
|
8
|
+
module TypeToolkit
|
|
9
|
+
class Plugin < LintRoller::Plugin
|
|
10
|
+
def about
|
|
11
|
+
LintRoller::About.new(
|
|
12
|
+
name: "rubocop-type_toolkit",
|
|
13
|
+
version: ::TypeToolkit::VERSION,
|
|
14
|
+
homepage: "https://github.com/Shopify/type_toolkit",
|
|
15
|
+
description: "Detects misuse of UnexpectedNilError.",
|
|
16
|
+
)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def supported?(context)
|
|
20
|
+
context.engine == :rubocop
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def rules(_context)
|
|
24
|
+
LintRoller::Rules.new(
|
|
25
|
+
type: :path,
|
|
26
|
+
config_format: :rubocop,
|
|
27
|
+
value: Pathname.new(__dir__).join("../../../../config/default.yml"),
|
|
28
|
+
)
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
data/lib/rubocop-type_toolkit.rb
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "rubocop"
|
|
4
|
-
|
|
5
|
-
RuboCop::ConfigLoader.inject_defaults!(File.join(__dir__, "..", "config", "default.yml"))
|
|
6
|
-
|
|
4
|
+
require_relative "rubocop/cop/type_toolkit/plugin"
|
|
7
5
|
require_relative "rubocop/cop/type_toolkit/dont_expect_unexpected_nil"
|
data/lib/type_toolkit/version.rb
CHANGED
|
@@ -8,6 +8,86 @@
|
|
|
8
8
|
# source://lint_roller//lib/lint_roller/context.rb#1
|
|
9
9
|
module LintRoller; end
|
|
10
10
|
|
|
11
|
+
# source://lint_roller//lib/lint_roller/about.rb#2
|
|
12
|
+
class LintRoller::About < ::Struct
|
|
13
|
+
# Returns the value of attribute description
|
|
14
|
+
#
|
|
15
|
+
# @return [Object] the current value of description
|
|
16
|
+
#
|
|
17
|
+
# source://lint_roller//lib/lint_roller/about.rb#2
|
|
18
|
+
def description; end
|
|
19
|
+
|
|
20
|
+
# Sets the attribute description
|
|
21
|
+
#
|
|
22
|
+
# @param value [Object] the value to set the attribute description to.
|
|
23
|
+
# @return [Object] the newly set value
|
|
24
|
+
#
|
|
25
|
+
# source://lint_roller//lib/lint_roller/about.rb#2
|
|
26
|
+
def description=(_); end
|
|
27
|
+
|
|
28
|
+
# Returns the value of attribute homepage
|
|
29
|
+
#
|
|
30
|
+
# @return [Object] the current value of homepage
|
|
31
|
+
#
|
|
32
|
+
# source://lint_roller//lib/lint_roller/about.rb#2
|
|
33
|
+
def homepage; end
|
|
34
|
+
|
|
35
|
+
# Sets the attribute homepage
|
|
36
|
+
#
|
|
37
|
+
# @param value [Object] the value to set the attribute homepage to.
|
|
38
|
+
# @return [Object] the newly set value
|
|
39
|
+
#
|
|
40
|
+
# source://lint_roller//lib/lint_roller/about.rb#2
|
|
41
|
+
def homepage=(_); end
|
|
42
|
+
|
|
43
|
+
# Returns the value of attribute name
|
|
44
|
+
#
|
|
45
|
+
# @return [Object] the current value of name
|
|
46
|
+
#
|
|
47
|
+
# source://lint_roller//lib/lint_roller/about.rb#2
|
|
48
|
+
def name; end
|
|
49
|
+
|
|
50
|
+
# Sets the attribute name
|
|
51
|
+
#
|
|
52
|
+
# @param value [Object] the value to set the attribute name to.
|
|
53
|
+
# @return [Object] the newly set value
|
|
54
|
+
#
|
|
55
|
+
# source://lint_roller//lib/lint_roller/about.rb#2
|
|
56
|
+
def name=(_); end
|
|
57
|
+
|
|
58
|
+
# Returns the value of attribute version
|
|
59
|
+
#
|
|
60
|
+
# @return [Object] the current value of version
|
|
61
|
+
#
|
|
62
|
+
# source://lint_roller//lib/lint_roller/about.rb#2
|
|
63
|
+
def version; end
|
|
64
|
+
|
|
65
|
+
# Sets the attribute version
|
|
66
|
+
#
|
|
67
|
+
# @param value [Object] the value to set the attribute version to.
|
|
68
|
+
# @return [Object] the newly set value
|
|
69
|
+
#
|
|
70
|
+
# source://lint_roller//lib/lint_roller/about.rb#2
|
|
71
|
+
def version=(_); end
|
|
72
|
+
|
|
73
|
+
class << self
|
|
74
|
+
# source://lint_roller//lib/lint_roller/about.rb#2
|
|
75
|
+
def [](*_arg0); end
|
|
76
|
+
|
|
77
|
+
# source://lint_roller//lib/lint_roller/about.rb#2
|
|
78
|
+
def inspect; end
|
|
79
|
+
|
|
80
|
+
# source://lint_roller//lib/lint_roller/about.rb#2
|
|
81
|
+
def keyword_init?; end
|
|
82
|
+
|
|
83
|
+
# source://lint_roller//lib/lint_roller/about.rb#2
|
|
84
|
+
def members; end
|
|
85
|
+
|
|
86
|
+
# source://lint_roller//lib/lint_roller/about.rb#2
|
|
87
|
+
def new(*_arg0); end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
11
91
|
# source://lint_roller//lib/lint_roller/context.rb#2
|
|
12
92
|
class LintRoller::Context < ::Struct
|
|
13
93
|
# Returns the value of attribute engine
|
|
@@ -117,3 +197,127 @@ class LintRoller::Context < ::Struct
|
|
|
117
197
|
def new(*_arg0); end
|
|
118
198
|
end
|
|
119
199
|
end
|
|
200
|
+
|
|
201
|
+
# source://lint_roller//lib/lint_roller/error.rb#2
|
|
202
|
+
class LintRoller::Error < ::StandardError; end
|
|
203
|
+
|
|
204
|
+
# source://lint_roller//lib/lint_roller/plugin.rb#2
|
|
205
|
+
class LintRoller::Plugin
|
|
206
|
+
# `config' is a Hash of options passed to the plugin by the user
|
|
207
|
+
#
|
|
208
|
+
# @return [Plugin] a new instance of Plugin
|
|
209
|
+
#
|
|
210
|
+
# source://lint_roller//lib/lint_roller/plugin.rb#4
|
|
211
|
+
def initialize(config = T.unsafe(nil)); end
|
|
212
|
+
|
|
213
|
+
# @raise [Error]
|
|
214
|
+
#
|
|
215
|
+
# source://lint_roller//lib/lint_roller/plugin.rb#8
|
|
216
|
+
def about; end
|
|
217
|
+
|
|
218
|
+
# `context' is an instance of LintRoller::Context provided by the runner
|
|
219
|
+
#
|
|
220
|
+
# @raise [Error]
|
|
221
|
+
#
|
|
222
|
+
# source://lint_roller//lib/lint_roller/plugin.rb#18
|
|
223
|
+
def rules(context); end
|
|
224
|
+
|
|
225
|
+
# `context' is an instance of LintRoller::Context provided by the runner
|
|
226
|
+
#
|
|
227
|
+
# @return [Boolean]
|
|
228
|
+
#
|
|
229
|
+
# source://lint_roller//lib/lint_roller/plugin.rb#13
|
|
230
|
+
def supported?(context); end
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# source://lint_roller//lib/lint_roller/rules.rb#2
|
|
234
|
+
class LintRoller::Rules < ::Struct
|
|
235
|
+
# Returns the value of attribute config_format
|
|
236
|
+
#
|
|
237
|
+
# @return [Object] the current value of config_format
|
|
238
|
+
#
|
|
239
|
+
# source://lint_roller//lib/lint_roller/rules.rb#2
|
|
240
|
+
def config_format; end
|
|
241
|
+
|
|
242
|
+
# Sets the attribute config_format
|
|
243
|
+
#
|
|
244
|
+
# @param value [Object] the value to set the attribute config_format to.
|
|
245
|
+
# @return [Object] the newly set value
|
|
246
|
+
#
|
|
247
|
+
# source://lint_roller//lib/lint_roller/rules.rb#2
|
|
248
|
+
def config_format=(_); end
|
|
249
|
+
|
|
250
|
+
# Returns the value of attribute error
|
|
251
|
+
#
|
|
252
|
+
# @return [Object] the current value of error
|
|
253
|
+
#
|
|
254
|
+
# source://lint_roller//lib/lint_roller/rules.rb#2
|
|
255
|
+
def error; end
|
|
256
|
+
|
|
257
|
+
# Sets the attribute error
|
|
258
|
+
#
|
|
259
|
+
# @param value [Object] the value to set the attribute error to.
|
|
260
|
+
# @return [Object] the newly set value
|
|
261
|
+
#
|
|
262
|
+
# source://lint_roller//lib/lint_roller/rules.rb#2
|
|
263
|
+
def error=(_); end
|
|
264
|
+
|
|
265
|
+
# Returns the value of attribute type
|
|
266
|
+
#
|
|
267
|
+
# @return [Object] the current value of type
|
|
268
|
+
#
|
|
269
|
+
# source://lint_roller//lib/lint_roller/rules.rb#2
|
|
270
|
+
def type; end
|
|
271
|
+
|
|
272
|
+
# Sets the attribute type
|
|
273
|
+
#
|
|
274
|
+
# @param value [Object] the value to set the attribute type to.
|
|
275
|
+
# @return [Object] the newly set value
|
|
276
|
+
#
|
|
277
|
+
# source://lint_roller//lib/lint_roller/rules.rb#2
|
|
278
|
+
def type=(_); end
|
|
279
|
+
|
|
280
|
+
# Returns the value of attribute value
|
|
281
|
+
#
|
|
282
|
+
# @return [Object] the current value of value
|
|
283
|
+
#
|
|
284
|
+
# source://lint_roller//lib/lint_roller/rules.rb#2
|
|
285
|
+
def value; end
|
|
286
|
+
|
|
287
|
+
# Sets the attribute value
|
|
288
|
+
#
|
|
289
|
+
# @param value [Object] the value to set the attribute value to.
|
|
290
|
+
# @return [Object] the newly set value
|
|
291
|
+
#
|
|
292
|
+
# source://lint_roller//lib/lint_roller/rules.rb#2
|
|
293
|
+
def value=(_); end
|
|
294
|
+
|
|
295
|
+
class << self
|
|
296
|
+
# source://lint_roller//lib/lint_roller/rules.rb#2
|
|
297
|
+
def [](*_arg0); end
|
|
298
|
+
|
|
299
|
+
# source://lint_roller//lib/lint_roller/rules.rb#2
|
|
300
|
+
def inspect; end
|
|
301
|
+
|
|
302
|
+
# source://lint_roller//lib/lint_roller/rules.rb#2
|
|
303
|
+
def keyword_init?; end
|
|
304
|
+
|
|
305
|
+
# source://lint_roller//lib/lint_roller/rules.rb#2
|
|
306
|
+
def members; end
|
|
307
|
+
|
|
308
|
+
# source://lint_roller//lib/lint_roller/rules.rb#2
|
|
309
|
+
def new(*_arg0); end
|
|
310
|
+
end
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
# source://lint_roller//lib/lint_roller/support/merges_upstream_metadata.rb#2
|
|
314
|
+
module LintRoller::Support; end
|
|
315
|
+
|
|
316
|
+
# source://lint_roller//lib/lint_roller/support/merges_upstream_metadata.rb#3
|
|
317
|
+
class LintRoller::Support::MergesUpstreamMetadata
|
|
318
|
+
# source://lint_roller//lib/lint_roller/support/merges_upstream_metadata.rb#4
|
|
319
|
+
def merge(plugin_yaml, upstream_yaml); end
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
# source://lint_roller//lib/lint_roller/version.rb#2
|
|
323
|
+
LintRoller::VERSION = T.let(T.unsafe(nil), String)
|
metadata
CHANGED
|
@@ -1,14 +1,42 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: type_toolkit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alexander Momchilov
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
-
dependencies:
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: lint_roller
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '0'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - ">="
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '0'
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: rubocop
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - ">="
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: 1.72.0
|
|
33
|
+
type: :runtime
|
|
34
|
+
prerelease: false
|
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - ">="
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: 1.72.0
|
|
12
40
|
description: 'A minimal runtime library for implementing abstract classes, interfaces,
|
|
13
41
|
and more.
|
|
14
42
|
|
|
@@ -27,6 +55,7 @@ files:
|
|
|
27
55
|
- config/default.yml
|
|
28
56
|
- lib/rubocop-type_toolkit.rb
|
|
29
57
|
- lib/rubocop/cop/type_toolkit/dont_expect_unexpected_nil.rb
|
|
58
|
+
- lib/rubocop/cop/type_toolkit/plugin.rb
|
|
30
59
|
- lib/type_toolkit.rb
|
|
31
60
|
- lib/type_toolkit/ext/nil_assertions.rb
|
|
32
61
|
- lib/type_toolkit/version.rb
|
|
@@ -79,7 +108,6 @@ files:
|
|
|
79
108
|
- sorbet/rbi/gems/unicode-emoji@4.2.0.rbi
|
|
80
109
|
- sorbet/rbi/gems/yard-sorbet@0.9.0.rbi
|
|
81
110
|
- sorbet/rbi/gems/yard@0.9.38.rbi
|
|
82
|
-
- sorbet/rbi/shims/lint_roller.rbi
|
|
83
111
|
- sorbet/rbi/shims/minitest.rbi
|
|
84
112
|
- sorbet/rbi/shims/rubocop_minitest.rbi
|
|
85
113
|
- sorbet/rbi/todo.rbi
|
|
@@ -96,6 +124,7 @@ metadata:
|
|
|
96
124
|
allowed_push_host: https://rubygems.org
|
|
97
125
|
homepage_uri: https://github.com/Shopify/type_kit
|
|
98
126
|
source_code_uri: https://github.com/Shopify/type_kit
|
|
127
|
+
default_lint_roller_plugin: RuboCop::Cop::TypeToolkit::Plugin
|
|
99
128
|
rdoc_options: []
|
|
100
129
|
require_paths:
|
|
101
130
|
- lib
|