steep 0.40.0 → 0.41.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/bin/output_rebaseline.rb +15 -30
- data/bin/output_test.rb +17 -57
- data/lib/steep.rb +4 -0
- data/lib/steep/cli.rb +9 -3
- data/lib/steep/drivers/check.rb +106 -14
- data/lib/steep/drivers/diagnostic_printer.rb +11 -11
- data/lib/steep/expectations.rb +159 -0
- data/lib/steep/project.rb +6 -0
- data/lib/steep/version.rb +1 -1
- data/smoke/alias/test_expectations.yml +96 -0
- data/smoke/and/test_expectations.yml +31 -0
- data/smoke/array/test_expectations.yml +103 -0
- data/smoke/block/test_expectations.yml +125 -0
- data/smoke/case/test_expectations.yml +47 -0
- data/smoke/class/test_expectations.yml +120 -0
- data/smoke/const/test_expectations.yml +139 -0
- data/smoke/diagnostics-rbs-duplicated/test_expectations.yml +13 -0
- data/smoke/diagnostics-rbs/test_expectations.yml +229 -0
- data/smoke/diagnostics/test_expectations.yml +477 -0
- data/smoke/dstr/test_expectations.yml +13 -0
- data/smoke/ensure/test_expectations.yml +62 -0
- data/smoke/enumerator/test_expectations.yml +135 -0
- data/smoke/extension/test_expectations.yml +61 -0
- data/smoke/hash/test_expectations.yml +81 -0
- data/smoke/hello/test_expectations.yml +25 -0
- data/smoke/if/test_expectations.yml +34 -0
- data/smoke/implements/test_expectations.yml +23 -0
- data/smoke/initialize/test_expectations.yml +1 -0
- data/smoke/integer/test_expectations.yml +101 -0
- data/smoke/interface/test_expectations.yml +23 -0
- data/smoke/kwbegin/test_expectations.yml +17 -0
- data/smoke/lambda/test_expectations.yml +39 -0
- data/smoke/literal/test_expectations.yml +106 -0
- data/smoke/map/test_expectations.yml +1 -0
- data/smoke/method/test_expectations.yml +90 -0
- data/smoke/module/test_expectations.yml +75 -0
- data/smoke/regexp/test_expectations.yml +615 -0
- data/smoke/regression/test_expectations.yml +43 -0
- data/smoke/rescue/test_expectations.yml +79 -0
- data/smoke/self/test_expectations.yml +23 -0
- data/smoke/skip/test_expectations.yml +23 -0
- data/smoke/stdout/test_expectations.yml +1 -0
- data/smoke/super/test_expectations.yml +79 -0
- data/smoke/toplevel/test_expectations.yml +15 -0
- data/smoke/tsort/test_expectations.yml +43 -0
- data/smoke/type_case/test_expectations.yml +48 -0
- data/smoke/yield/test_expectations.yml +68 -0
- metadata +41 -44
- data/smoke/alias/test.yaml +0 -73
- data/smoke/and/test.yaml +0 -24
- data/smoke/array/test.yaml +0 -80
- data/smoke/block/test.yaml +0 -96
- data/smoke/broken/Steepfile +0 -5
- data/smoke/broken/broken.rb +0 -0
- data/smoke/broken/broken.rbs +0 -0
- data/smoke/broken/test.yaml +0 -6
- data/smoke/case/test.yaml +0 -36
- data/smoke/class/test.yaml +0 -89
- data/smoke/const/test.yaml +0 -96
- data/smoke/diagnostics-rbs-duplicated/test.yaml +0 -10
- data/smoke/diagnostics-rbs/test.yaml +0 -142
- data/smoke/diagnostics/test.yaml +0 -333
- data/smoke/dstr/test.yaml +0 -10
- data/smoke/ensure/test.yaml +0 -47
- data/smoke/enumerator/test.yaml +0 -100
- data/smoke/extension/test.yaml +0 -50
- data/smoke/hash/test.yaml +0 -62
- data/smoke/hello/test.yaml +0 -18
- data/smoke/if/test.yaml +0 -27
- data/smoke/implements/test.yaml +0 -16
- data/smoke/initialize/test.yaml +0 -4
- data/smoke/integer/test.yaml +0 -66
- data/smoke/interface/test.yaml +0 -16
- data/smoke/kwbegin/test.yaml +0 -14
- data/smoke/lambda/test.yaml +0 -28
- data/smoke/literal/test.yaml +0 -79
- data/smoke/map/test.yaml +0 -4
- data/smoke/method/test.yaml +0 -71
- data/smoke/module/test.yaml +0 -51
- data/smoke/regexp/test.yaml +0 -372
- data/smoke/regression/test.yaml +0 -38
- data/smoke/rescue/test.yaml +0 -60
- data/smoke/self/test.yaml +0 -16
- data/smoke/skip/test.yaml +0 -16
- data/smoke/stdout/test.yaml +0 -4
- data/smoke/super/test.yaml +0 -52
- data/smoke/toplevel/test.yaml +0 -12
- data/smoke/tsort/test.yaml +0 -32
- data/smoke/type_case/test.yaml +0 -33
- data/smoke/yield/test.yaml +0 -49
data/smoke/regression/test.yaml
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
---
|
2
|
-
test:
|
3
|
-
array.rb:
|
4
|
-
diagnostics: []
|
5
|
-
fun.rb:
|
6
|
-
diagnostics: []
|
7
|
-
hash.rb:
|
8
|
-
diagnostics: []
|
9
|
-
poly_new.rb:
|
10
|
-
diagnostics: []
|
11
|
-
range.rb:
|
12
|
-
diagnostics: []
|
13
|
-
set_divide.rb:
|
14
|
-
diagnostics:
|
15
|
-
- |
|
16
|
-
set_divide.rb:2:2: [error] Type `::Set[::String]` does not have method `ffffffff`
|
17
|
-
│ Diagnostic ID: Ruby::NoMethod
|
18
|
-
│
|
19
|
-
└ d.ffffffff
|
20
|
-
~~~~~~~~
|
21
|
-
- |
|
22
|
-
set_divide.rb:5:4: [error] Type `::String` does not have method `ggggg`
|
23
|
-
│ Diagnostic ID: Ruby::NoMethod
|
24
|
-
│
|
25
|
-
└ x.ggggg
|
26
|
-
~~~~~
|
27
|
-
- |
|
28
|
-
set_divide.rb:7:4: [error] Type `::String` does not have method `ggggg`
|
29
|
-
│ Diagnostic ID: Ruby::NoMethod
|
30
|
-
│
|
31
|
-
└ y.ggggg
|
32
|
-
~~~~~
|
33
|
-
- |
|
34
|
-
set_divide.rb:11:4: [error] Type `::String` does not have method `ggggg`
|
35
|
-
│ Diagnostic ID: Ruby::NoMethod
|
36
|
-
│
|
37
|
-
└ x.ggggg
|
38
|
-
~~~~~
|
data/smoke/rescue/test.yaml
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
---
|
2
|
-
test:
|
3
|
-
a.rb:
|
4
|
-
diagnostics:
|
5
|
-
- |
|
6
|
-
a.rb:3:0: [error] Cannot assign a value of type `(::String | ::Integer)` to a variable of type `::Integer`
|
7
|
-
│ (::String | ::Integer) <: ::Integer
|
8
|
-
│ ::String <: ::Integer
|
9
|
-
│ ::Object <: ::Integer
|
10
|
-
│ ::BasicObject <: ::Integer
|
11
|
-
│
|
12
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
13
|
-
│
|
14
|
-
└ a = begin
|
15
|
-
~~~~~~~~~
|
16
|
-
- |
|
17
|
-
a.rb:11:0: [error] Cannot assign a value of type `(::String | ::Integer)` to a variable of type `::Integer`
|
18
|
-
│ (::String | ::Integer) <: ::Integer
|
19
|
-
│ ::String <: ::Integer
|
20
|
-
│ ::Object <: ::Integer
|
21
|
-
│ ::BasicObject <: ::Integer
|
22
|
-
│
|
23
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
24
|
-
│
|
25
|
-
└ b = 'foo' rescue 1
|
26
|
-
~~~~~~~~~~~~~~~~~~
|
27
|
-
- |
|
28
|
-
a.rb:15:0: [error] Cannot assign a value of type `(::String | ::Symbol | ::Integer)` to a variable of type `::Integer`
|
29
|
-
│ (::String | ::Symbol | ::Integer) <: ::Integer
|
30
|
-
│ ::String <: ::Integer
|
31
|
-
│ ::Object <: ::Integer
|
32
|
-
│ ::BasicObject <: ::Integer
|
33
|
-
│
|
34
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
35
|
-
│
|
36
|
-
└ c = begin
|
37
|
-
~~~~~~~~~
|
38
|
-
- |
|
39
|
-
a.rb:25:0: [error] Cannot assign a value of type `(::Array[::Integer] | ::Symbol | ::Integer)` to a variable of type `::Integer`
|
40
|
-
│ (::Array[::Integer] | ::Symbol | ::Integer) <: ::Integer
|
41
|
-
│ ::Array[::Integer] <: ::Integer
|
42
|
-
│ ::Object <: ::Integer
|
43
|
-
│ ::BasicObject <: ::Integer
|
44
|
-
│
|
45
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
46
|
-
│
|
47
|
-
└ e = begin
|
48
|
-
~~~~~~~~~
|
49
|
-
- |
|
50
|
-
a.rb:37:0: [error] Cannot allow method body have type `(::Integer | ::String)` because declared as type `::String`
|
51
|
-
│ (::Integer | ::String) <: ::String
|
52
|
-
│ ::Integer <: ::String
|
53
|
-
│ ::Numeric <: ::String
|
54
|
-
│ ::Object <: ::String
|
55
|
-
│ ::BasicObject <: ::String
|
56
|
-
│
|
57
|
-
│ Diagnostic ID: Ruby::MethodBodyTypeMismatch
|
58
|
-
│
|
59
|
-
└ def foo(a)
|
60
|
-
~~~~~~~~~~
|
data/smoke/self/test.yaml
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
---
|
2
|
-
test:
|
3
|
-
a.rb:
|
4
|
-
diagnostics:
|
5
|
-
- |
|
6
|
-
a.rb:16:2: [error] Type `::Object` does not have method `baz`
|
7
|
-
│ Diagnostic ID: Ruby::NoMethod
|
8
|
-
│
|
9
|
-
└ baz
|
10
|
-
~~~
|
11
|
-
- |
|
12
|
-
a.rb:19:4: [error] Type `::Object` does not have method `baz`
|
13
|
-
│ Diagnostic ID: Ruby::NoMethod
|
14
|
-
│
|
15
|
-
└ baz
|
16
|
-
~~~
|
data/smoke/skip/test.yaml
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
---
|
2
|
-
test:
|
3
|
-
skip.rb:
|
4
|
-
diagnostics:
|
5
|
-
- |
|
6
|
-
skip.rb:8:7: [error] Type `::Object` does not have method `no_such_method`
|
7
|
-
│ Diagnostic ID: Ruby::NoMethod
|
8
|
-
│
|
9
|
-
└ self.no_such_method
|
10
|
-
~~~~~~~~~~~~~~
|
11
|
-
- |
|
12
|
-
skip.rb:12:7: [error] Type `::Object` does not have method `no_such_method`
|
13
|
-
│ Diagnostic ID: Ruby::NoMethod
|
14
|
-
│
|
15
|
-
└ self.no_such_method
|
16
|
-
~~~~~~~~~~~~~~
|
data/smoke/stdout/test.yaml
DELETED
data/smoke/super/test.yaml
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
---
|
2
|
-
test:
|
3
|
-
a.rb:
|
4
|
-
diagnostics:
|
5
|
-
- |
|
6
|
-
a.rb:6:4: [error] Cannot assign a value of type `::Object` to a variable of type `::Integer`
|
7
|
-
│ ::Object <: ::Integer
|
8
|
-
│ ::BasicObject <: ::Integer
|
9
|
-
│
|
10
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
11
|
-
│
|
12
|
-
└ a = super(x)
|
13
|
-
~~~~~~~~~~~~
|
14
|
-
- |
|
15
|
-
a.rb:7:4: [error] Cannot assign a value of type `::Object` to a variable of type `::Integer`
|
16
|
-
│ ::Object <: ::Integer
|
17
|
-
│ ::BasicObject <: ::Integer
|
18
|
-
│
|
19
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
20
|
-
│
|
21
|
-
└ a = super
|
22
|
-
~~~~~~~~~
|
23
|
-
- |
|
24
|
-
a.rb:19:4: [error] Cannot detect the type of the expression
|
25
|
-
│ Diagnostic ID: Ruby::FallbackAny
|
26
|
-
│
|
27
|
-
└ super()
|
28
|
-
~~~~~~~
|
29
|
-
- |
|
30
|
-
a.rb:20:4: [error] Cannot detect the type of the expression
|
31
|
-
│ Diagnostic ID: Ruby::FallbackAny
|
32
|
-
│
|
33
|
-
└ super
|
34
|
-
~~~~~
|
35
|
-
- |
|
36
|
-
a.rb:26:4: [error] UnexpectedSuper
|
37
|
-
│ Diagnostic ID: Ruby::UnexpectedSuper
|
38
|
-
│
|
39
|
-
└ super()
|
40
|
-
~~~~~~~
|
41
|
-
- |
|
42
|
-
a.rb:28:4: [error] UnexpectedSuper
|
43
|
-
│ Diagnostic ID: Ruby::UnexpectedSuper
|
44
|
-
│
|
45
|
-
└ super
|
46
|
-
~~~~~
|
47
|
-
- |
|
48
|
-
a.rb:28:4: [error] Cannot detect the type of the expression
|
49
|
-
│ Diagnostic ID: Ruby::FallbackAny
|
50
|
-
│
|
51
|
-
└ super
|
52
|
-
~~~~~
|
data/smoke/toplevel/test.yaml
DELETED
data/smoke/tsort/test.yaml
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
---
|
2
|
-
test:
|
3
|
-
a.rb:
|
4
|
-
diagnostics:
|
5
|
-
- |
|
6
|
-
a.rb:7:0: [error] Cannot assign a value of type `^() -> ::Hash[::Integer, ::Array[::Integer]]` to a variable of type `^() { (::Integer) -> void } -> void`
|
7
|
-
│ ^() -> ::Hash[::Integer, ::Array[::Integer]] <: ^() { (::Integer) -> void } -> void
|
8
|
-
│
|
9
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
10
|
-
│
|
11
|
-
└ each_node = -> (&b) { g.each_key(&b) }
|
12
|
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
13
|
-
- |
|
14
|
-
a.rb:9:0: [error] Cannot assign a value of type `^(::Integer) -> ::Array[::Integer]` to a variable of type `^(::Integer) { (::Integer) -> void } -> void`
|
15
|
-
│ ^(::Integer) -> ::Array[::Integer] <: ^(::Integer) { (::Integer) -> void } -> void
|
16
|
-
│
|
17
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
18
|
-
│
|
19
|
-
└ each_child = -> (n, &b) { g[n].each(&b) }
|
20
|
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
21
|
-
- |
|
22
|
-
a.rb:12:0: [error] Cannot assign a value of type `::Array[::Integer]` to a variable of type `::Array[::String]`
|
23
|
-
│ ::Array[::Integer] <: ::Array[::String]
|
24
|
-
│ ::Integer <: ::String
|
25
|
-
│ ::Numeric <: ::String
|
26
|
-
│ ::Object <: ::String
|
27
|
-
│ ::BasicObject <: ::String
|
28
|
-
│
|
29
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
30
|
-
│
|
31
|
-
└ xs = TSort.tsort(each_node, each_child)
|
32
|
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
data/smoke/type_case/test.yaml
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
---
|
2
|
-
test:
|
3
|
-
a.rb:
|
4
|
-
diagnostics:
|
5
|
-
- |
|
6
|
-
a.rb:7:4: [error] Type `(::Integer | ::String)` does not have method `foobar`
|
7
|
-
│ Diagnostic ID: Ruby::NoMethod
|
8
|
-
│
|
9
|
-
└ x.foobar()
|
10
|
-
~~~~~~
|
11
|
-
- |
|
12
|
-
a.rb:12:4: [error] Type `(::Integer | ::String | ::Symbol)` does not have method `foobar`
|
13
|
-
│ Diagnostic ID: Ruby::NoMethod
|
14
|
-
│
|
15
|
-
└ x.foobar
|
16
|
-
~~~~~~
|
17
|
-
- |
|
18
|
-
a.rb:17:4: [error] Type `1` does not have method `foobar`
|
19
|
-
│ Diagnostic ID: Ruby::NoMethod
|
20
|
-
│
|
21
|
-
└ x.foobar
|
22
|
-
~~~~~~
|
23
|
-
- |
|
24
|
-
a.rb:23:2: [error] Type annotation about `x` is incompatible since ::Integer <: ::String doesn't hold
|
25
|
-
│ ::Integer <: ::String
|
26
|
-
│ ::Numeric <: ::String
|
27
|
-
│ ::Object <: ::String
|
28
|
-
│ ::BasicObject <: ::String
|
29
|
-
│
|
30
|
-
│ Diagnostic ID: Ruby::IncompatibleAnnotation
|
31
|
-
│
|
32
|
-
└ x + 1
|
33
|
-
~~~~~
|
data/smoke/yield/test.yaml
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
---
|
2
|
-
test:
|
3
|
-
a.rb:
|
4
|
-
diagnostics:
|
5
|
-
- |
|
6
|
-
a.rb:6:4: [error] Cannot assign a value of type `::Integer` to a variable of type `::String`
|
7
|
-
│ ::Integer <: ::String
|
8
|
-
│ ::Numeric <: ::String
|
9
|
-
│ ::Object <: ::String
|
10
|
-
│ ::BasicObject <: ::String
|
11
|
-
│
|
12
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
13
|
-
│
|
14
|
-
└ x = yield(3)
|
15
|
-
~~~~~~~~~~~~
|
16
|
-
- |
|
17
|
-
a.rb:8:10: [error] Cannot assign a value of type `::String` to an expression of type `::Integer`
|
18
|
-
│ ::String <: ::Integer
|
19
|
-
│ ::Object <: ::Integer
|
20
|
-
│ ::BasicObject <: ::Integer
|
21
|
-
│
|
22
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
23
|
-
│
|
24
|
-
└ yield(x)
|
25
|
-
~
|
26
|
-
- |
|
27
|
-
a.rb:13:4: [error] No block given for `yield`
|
28
|
-
│ Diagnostic ID: Ruby::UnexpectedYield
|
29
|
-
│
|
30
|
-
└ yield 4
|
31
|
-
~~~~~~~
|
32
|
-
- |
|
33
|
-
a.rb:13:4: [error] Cannot detect the type of the expression
|
34
|
-
│ Diagnostic ID: Ruby::FallbackAny
|
35
|
-
│
|
36
|
-
└ yield 4
|
37
|
-
~~~~~~~
|
38
|
-
b.rb:
|
39
|
-
diagnostics:
|
40
|
-
- |
|
41
|
-
b.rb:4:10: [error] Cannot assign a value of type `::String` to an expression of type `::Integer`
|
42
|
-
│ ::String <: ::Integer
|
43
|
-
│ ::Object <: ::Integer
|
44
|
-
│ ::BasicObject <: ::Integer
|
45
|
-
│
|
46
|
-
│ Diagnostic ID: Ruby::IncompatibleAssignment
|
47
|
-
│
|
48
|
-
└ yield ""
|
49
|
-
~~
|