Skip to content

Fix Signature diagnostics #code #306

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/steep/diagnostic/signature.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def detail_lines
end

def diagnostic_code
"Ruby::#{error_name}"
"RBS::#{error_name}"
end

def path
Expand Down
2 changes: 1 addition & 1 deletion smoke/diagnostics-rbs-duplicated/test_expectations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
character: 3
severity: ERROR
message: Declaration of `::A` is duplicated
code: Ruby::DuplicatedDeclaration
code: RBS::DuplicatedDeclaration
40 changes: 20 additions & 20 deletions smoke/diagnostics-rbs/test_expectations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
severity: ERROR
message: Non-overloading method definition of `foo` in `::DuplicatedMethodDefinitionError`
cannot be duplicated
code: Ruby::DuplicatedMethodDefinition
code: RBS::DuplicatedMethodDefinition
- range:
start:
line: 6
Expand All @@ -22,7 +22,7 @@
severity: ERROR
message: Non-overloading method definition of `f` in `::DuplicatedMethodDefinitionError::_Hello`
cannot be duplicated
code: Ruby::DuplicatedMethodDefinition
code: RBS::DuplicatedMethodDefinition
- range:
start:
line: 18
Expand All @@ -33,7 +33,7 @@
severity: ERROR
message: Non-overloading method definition of `g` in `::DuplicatedMethodDefinitionError::A`
cannot be duplicated
code: Ruby::DuplicatedMethodDefinition
code: RBS::DuplicatedMethodDefinition
- file: generic-parameter-mismatch.rbs
diagnostics:
- range:
Expand All @@ -45,7 +45,7 @@
character: 5
severity: ERROR
message: Different generic parameters are specified across definitions of `::GenericParameterMismatchError::Foo`
code: Ruby::GenericParameterMismatch
code: RBS::GenericParameterMismatch
- file: invalid-method-overload.rbs
diagnostics:
- range:
Expand All @@ -57,7 +57,7 @@
character: 27
severity: ERROR
message: Cannot find a non-overloading definition of `foo` in `::InvalidMethodOverload`
code: Ruby::InvalidMethodOverload
code: RBS::InvalidMethodOverload
- file: invalid-type-application.rbs
diagnostics:
- range:
Expand All @@ -69,7 +69,7 @@
character: 23
severity: ERROR
message: Type `::Integer` is not generic but used as a generic type with 1 arguments
code: Ruby::InvalidTypeApplication
code: RBS::InvalidTypeApplication
- range:
start:
line: 4
Expand All @@ -79,7 +79,7 @@
character: 24
severity: ERROR
message: Type `::Array` expects 1 arguments, but 2 arguments are given
code: Ruby::InvalidTypeApplication
code: RBS::InvalidTypeApplication
- range:
start:
line: 6
Expand All @@ -89,7 +89,7 @@
character: 17
severity: ERROR
message: Type `::Hash` is generic but used as a non generic type
code: Ruby::InvalidTypeApplication
code: RBS::InvalidTypeApplication
- file: invalid_variance_annotation.rbs
diagnostics:
- range:
Expand All @@ -102,7 +102,7 @@
severity: ERROR
message: The variance of type parameter `A` is covariant, but used in incompatible
position here
code: Ruby::InvalidVarianceAnnotation
code: RBS::InvalidVarianceAnnotation
- file: recursive-alias.rbs
diagnostics:
- range:
Expand All @@ -115,7 +115,7 @@
severity: ERROR
message: 'Circular method alias is detected in `::RecursiveAlias`: foo -> bar
-> baz'
code: Ruby::RecursiveAlias
code: RBS::RecursiveAlias
- file: recursive-class.rbs
diagnostics:
- range:
Expand All @@ -128,7 +128,7 @@
severity: ERROR
message: 'Circular inheritance/mix-in is detected: ::Foo <: ::Bar <: ::Baz <:
::Foo'
code: Ruby::RecursiveAncestor
code: RBS::RecursiveAncestor
- range:
start:
line: 4
Expand All @@ -139,7 +139,7 @@
severity: ERROR
message: 'Circular inheritance/mix-in is detected: ::Bar <: ::Baz <: ::Foo <:
::Bar'
code: Ruby::RecursiveAncestor
code: RBS::RecursiveAncestor
- range:
start:
line: 7
Expand All @@ -150,7 +150,7 @@
severity: ERROR
message: 'Circular inheritance/mix-in is detected: ::Baz <: ::Foo <: ::Bar <:
::Baz'
code: Ruby::RecursiveAncestor
code: RBS::RecursiveAncestor
- file: superclass-mismatch.rbs
diagnostics:
- range:
Expand All @@ -162,7 +162,7 @@
character: 5
severity: ERROR
message: Different superclasses are specified for `::SuperclassMismatch::Foo`
code: Ruby::SuperclassMismatch
code: RBS::SuperclassMismatch
- file: unknown-method-alias.rbs
diagnostics:
- range:
Expand All @@ -174,7 +174,7 @@
character: 15
severity: ERROR
message: Cannot find the original method `bar` in `::UnknownMethodAlias`
code: Ruby::UnknownMethodAlias
code: RBS::UnknownMethodAlias
- file: unknown-type-name.rbs
diagnostics:
- range:
Expand All @@ -186,7 +186,7 @@
character: 16
severity: ERROR
message: Cannot find type `::bar`
code: Ruby::UnknownTypeName
code: RBS::UnknownTypeName
- range:
start:
line: 4
Expand All @@ -196,7 +196,7 @@
character: 14
severity: ERROR
message: Cannot find type `::World`
code: Ruby::UnknownTypeName
code: RBS::UnknownTypeName
- range:
start:
line: 6
Expand All @@ -206,7 +206,7 @@
character: 15
severity: ERROR
message: Cannot find type `World`
code: Ruby::UnknownTypeName
code: RBS::UnknownTypeName
- range:
start:
line: 8
Expand All @@ -216,7 +216,7 @@
character: 5
severity: ERROR
message: Cannot find type `ABC`
code: Ruby::UnknownTypeName
code: RBS::UnknownTypeName
- range:
start:
line: 11
Expand All @@ -226,4 +226,4 @@
character: 18
severity: ERROR
message: Cannot find type `ZZZ`
code: Ruby::UnknownTypeName
code: RBS::UnknownTypeName