brew vendor-gems: commit updates.
This commit is contained in:
parent
688f7c61b3
commit
5ccd9c5a1d
@ -88,7 +88,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.27.0/lib"
|
||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.13.3/lib"
|
||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.14.2/lib"
|
||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.10.0/lib"
|
||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.6.7/lib"
|
||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.6.8/lib"
|
||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-3.0.0/lib"
|
||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-html-0.12.3/lib"
|
||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov_json_formatter-0.1.4/lib"
|
||||
|
||||
@ -57,12 +57,18 @@ module RuboCop
|
||||
)
|
||||
PATTERN
|
||||
|
||||
def_node_matcher(:generic_parameter_decl?, <<-PATTERN)
|
||||
def_node_matcher(:generic_parameter_decl_call?, <<-PATTERN)
|
||||
(
|
||||
send nil? {:type_template :type_member} ...
|
||||
)
|
||||
PATTERN
|
||||
|
||||
def_node_matcher(:generic_parameter_decl_block_call?, <<-PATTERN)
|
||||
(block
|
||||
(send nil? {:type_template :type_member}) ...
|
||||
)
|
||||
PATTERN
|
||||
|
||||
def_node_search(:method_needing_aliasing_on_t?, <<-PATTERN)
|
||||
(
|
||||
send
|
||||
@ -81,7 +87,7 @@ module RuboCop
|
||||
end
|
||||
|
||||
def not_generic_parameter_decl?(node)
|
||||
!generic_parameter_decl?(node)
|
||||
!generic_parameter_decl_call?(node) && !generic_parameter_decl_block_call?(node)
|
||||
end
|
||||
|
||||
def not_nil?(node)
|
||||
@ -0,0 +1,29 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "rubocop/cop/style/mutable_constant"
|
||||
|
||||
module RuboCop
|
||||
module Cop
|
||||
module Sorbet
|
||||
module MutableConstantSorbetAwareBehaviour
|
||||
def self.prepended(base)
|
||||
base.def_node_matcher(:t_let, <<~PATTERN)
|
||||
(send (const nil? :T) :let $_constant _type)
|
||||
PATTERN
|
||||
end
|
||||
|
||||
def on_assignment(value)
|
||||
t_let(value) do |constant|
|
||||
value = constant
|
||||
end
|
||||
|
||||
super(value)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
RuboCop::Cop::Style::MutableConstant.prepend(
|
||||
RuboCop::Cop::Sorbet::MutableConstantSorbetAwareBehaviour
|
||||
)
|
||||
@ -28,3 +28,5 @@ require_relative "sorbet/sigils/strict_sigil"
|
||||
require_relative "sorbet/sigils/strong_sigil"
|
||||
require_relative "sorbet/sigils/enforce_sigil_order"
|
||||
require_relative "sorbet/sigils/enforce_single_sigil"
|
||||
|
||||
require_relative "sorbet/mutable_constant_sorbet_aware_behaviour"
|
||||
@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
module RuboCop
|
||||
module Sorbet
|
||||
VERSION = "0.6.7"
|
||||
VERSION = "0.6.8"
|
||||
end
|
||||
end
|
||||
Loading…
x
Reference in New Issue
Block a user