Skip to content

Commit

Permalink
remove unused IncompatibleTypeCase rule
Browse files Browse the repository at this point in the history
  • Loading branch information
euglena1215 committed Sep 30, 2024
1 parent f34dae5 commit a589395
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 36 deletions.
22 changes: 0 additions & 22 deletions lib/steep/diagnostic/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -726,25 +726,6 @@ def header_line
end
end

class IncompatibleTypeCase < Base
attr_reader :var_name
attr_reader :result
attr_reader :relation

def initialize(node:, var_name:, result:, relation:)
super(node: node)
@var_name = var_name
@result = result
@relation = relation
end

include ResultPrinter

def header_line
"Type annotation for branch about `#{var_name}` is incompatible since #{relation} doesn't hold"
end
end

class UnreachableBranch < Base
def header_line
"The branch is unreachable"
Expand Down Expand Up @@ -1007,7 +988,6 @@ def self.default
IncompatibleAnnotation => :hint,
IncompatibleArgumentForwarding => :warning,
IncompatibleAssignment => :hint,
IncompatibleTypeCase => :hint,
InsufficientKeywordArguments => :error,
InsufficientPositionalArguments => :error,
InsufficientTypeArgument => :hint,
Expand Down Expand Up @@ -1064,7 +1044,6 @@ def self.strict
IncompatibleAnnotation => :error,
IncompatibleArgumentForwarding => :error,
IncompatibleAssignment => :error,
IncompatibleTypeCase => :error,
InsufficientKeywordArguments => :error,
InsufficientPositionalArguments => :error,
InsufficientTypeArgument => :error,
Expand Down Expand Up @@ -1121,7 +1100,6 @@ def self.lenient
IncompatibleAnnotation => nil,
IncompatibleArgumentForwarding => :information,
IncompatibleAssignment => :hint,
IncompatibleTypeCase => nil,
InsufficientKeywordArguments => :information,
InsufficientPositionalArguments => :information,
InsufficientTypeArgument => nil,
Expand Down
14 changes: 0 additions & 14 deletions sig/steep/diagnostic/ruby.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -449,20 +449,6 @@ module Steep
def header_line: () -> ::String
end

class IncompatibleTypeCase < Base
attr_reader var_name: untyped

attr_reader result: untyped

attr_reader relation: untyped

def initialize: (node: untyped, var_name: untyped, result: untyped, relation: untyped) -> void

include ResultPrinter

def header_line: () -> ::String
end

class UnreachableBranch < Base
def header_line: () -> String
end
Expand Down

0 comments on commit a589395

Please sign in to comment.