Add extend/node.rbi, remove unused methods
This commit is contained in:
parent
09f5a46218
commit
b010e397d6
@ -8,17 +8,11 @@ module RuboCop
|
||||
include RuboCop::Cask::Constants
|
||||
|
||||
def_node_matcher :method_node, "{$(send ...) (block $(send ...) ...)}"
|
||||
def_node_matcher :block_args, "(block _ $_ _)"
|
||||
def_node_matcher :block_body, "(block _ _ $_)"
|
||||
|
||||
def_node_matcher :key_node, "{(pair $_ _) (hash (pair $_ _) ...)}"
|
||||
def_node_matcher :val_node, "{(pair _ $_) (hash (pair _ $_) ...)}"
|
||||
|
||||
def_node_matcher :cask_block?, "(block (send nil? :cask ...) args ...)"
|
||||
def_node_matcher :on_system_block?,
|
||||
"(block (send nil? {#{ON_SYSTEM_METHODS.map(&:inspect).join(" ")}} ...) args ...)"
|
||||
def_node_matcher :arch_variable?, "(lvasgn _ (send nil? :on_arch_conditional ...))"
|
||||
|
||||
def_node_matcher :begin_block?, "(begin ...)"
|
||||
|
||||
sig { returns(T::Boolean) }
|
||||
|
21
Library/Homebrew/rubocops/cask/extend/node.rbi
Normal file
21
Library/Homebrew/rubocops/cask/extend/node.rbi
Normal file
@ -0,0 +1,21 @@
|
||||
# typed: strict
|
||||
|
||||
class RuboCop::AST::Node
|
||||
sig { returns(T::Boolean) }
|
||||
def arch_variable?; end
|
||||
|
||||
sig { returns(T::Boolean) }
|
||||
def begin_block?; end
|
||||
|
||||
sig { returns(T.nilable(RuboCop::AST::Node)) }
|
||||
def block_body; end
|
||||
|
||||
sig { returns(T::Boolean) }
|
||||
def cask_block?; end
|
||||
|
||||
sig { returns(T.nilable(RuboCop::AST::Node)) }
|
||||
def method_node; end
|
||||
|
||||
sig { returns(T::Boolean) }
|
||||
def on_system_block?; end
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user