class RuboCop::Cop::RubyLsp::UseLanguageServerAliases
end
end
def run; end
sig { override.returns(T.all(T::Array, Object)) }
class FoldingRanges
module RubyLsp
# good
end
def run; end
sig { override.returns(T.all(T::Array, Object)) }
class FoldingRanges
module RubyLsp
# bad
@example
`LanguageServer::Protocol`
within the ‘RubyLsp` module, without having to prefix with
Prefer using `Interface`, `Transport` and `Constant` aliases
def on_new_investigation
def on_new_investigation return if processed_source.blank? ruby_lsp_modules(processed_source.ast).each do |ruby_lsp_mod| lsp_constant_usages(ruby_lsp_mod).each do |node| lsp_const = node.children.last next unless ALIASED_CONSTANTS.include?(lsp_const) add_offense(node, message: format(MSG, constant: lsp_const)) do |corrector| corrector.replace(node, lsp_const) end end end end