Merge pull request #11602 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-rails-2.11.1
build(deps): bump rubocop-rails from 2.11.0 to 2.11.1 in /Library/Homebrew
This commit is contained in:
		
						commit
						8f765c2c02
					
				@ -126,7 +126,7 @@ GEM
 | 
			
		||||
    rubocop-performance (1.11.3)
 | 
			
		||||
      rubocop (>= 1.7.0, < 2.0)
 | 
			
		||||
      rubocop-ast (>= 0.4.0)
 | 
			
		||||
    rubocop-rails (2.11.0)
 | 
			
		||||
    rubocop-rails (2.11.1)
 | 
			
		||||
      activesupport (>= 4.2.0)
 | 
			
		||||
      rack (>= 1.1)
 | 
			
		||||
      rubocop (>= 1.7.0, < 2.0)
 | 
			
		||||
 | 
			
		||||
@ -655,6 +655,7 @@ class RuboCop::Cop::Rails::FindBy < ::RuboCop::Cop::Base
 | 
			
		||||
 | 
			
		||||
  def autocorrect(corrector, node); end
 | 
			
		||||
  def ignore_where_first?; end
 | 
			
		||||
  def where_method?(receiver); end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
RuboCop::Cop::Rails::FindBy::MSG = T.let(T.unsafe(nil), String)
 | 
			
		||||
@ -83,7 +83,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.11
 | 
			
		||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-2.0.0/lib"
 | 
			
		||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.17.0/lib"
 | 
			
		||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.11.3/lib"
 | 
			
		||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.11.0/lib"
 | 
			
		||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.11.1/lib"
 | 
			
		||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.4.0/lib"
 | 
			
		||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.6.2/lib"
 | 
			
		||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-2.5.1/lib"
 | 
			
		||||
 | 
			
		||||
@ -20,8 +20,7 @@ module RuboCop
 | 
			
		||||
 | 
			
		||||
        MSG = 'Favor `%<bang>sRails.env.%<env>s?` over `%<source>s`.'
 | 
			
		||||
 | 
			
		||||
        SYM_MSG = 'Do not compare `Rails.env` with a symbol, it will always ' \
 | 
			
		||||
          'evaluate to `false`.'
 | 
			
		||||
        SYM_MSG = 'Do not compare `Rails.env` with a symbol, it will always evaluate to `false`.'
 | 
			
		||||
 | 
			
		||||
        RESTRICT_ON_SEND = %i[== !=].freeze
 | 
			
		||||
 | 
			
		||||
@ -32,6 +32,7 @@ module RuboCop
 | 
			
		||||
        RESTRICT_ON_SEND = %i[first take].freeze
 | 
			
		||||
 | 
			
		||||
        def on_send(node)
 | 
			
		||||
          return unless where_method?(node.receiver)
 | 
			
		||||
          return if ignore_where_first? && node.method?(:first)
 | 
			
		||||
 | 
			
		||||
          range = range_between(node.receiver.loc.selector.begin_pos, node.loc.selector.end_pos)
 | 
			
		||||
@ -44,6 +45,12 @@ module RuboCop
 | 
			
		||||
 | 
			
		||||
        private
 | 
			
		||||
 | 
			
		||||
        def where_method?(receiver)
 | 
			
		||||
          return false unless receiver
 | 
			
		||||
 | 
			
		||||
          receiver.respond_to?(:method?) && receiver.method?(:where)
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        def autocorrect(corrector, node)
 | 
			
		||||
          return if node.method?(:first)
 | 
			
		||||
 | 
			
		||||
@ -130,8 +130,7 @@ module RuboCop
 | 
			
		||||
      # @see https://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#module-ActiveRecord::Associations::ClassMethods-label-Setting+Inverses
 | 
			
		||||
      class InverseOf < Base
 | 
			
		||||
        SPECIFY_MSG = 'Specify an `:inverse_of` option.'
 | 
			
		||||
        NIL_MSG = 'You specified `inverse_of: nil`, you probably meant to ' \
 | 
			
		||||
          'use `inverse_of: false`.'
 | 
			
		||||
        NIL_MSG = 'You specified `inverse_of: nil`, you probably meant to use `inverse_of: false`.'
 | 
			
		||||
        RESTRICT_ON_SEND = %i[has_many has_one belongs_to].freeze
 | 
			
		||||
 | 
			
		||||
        def_node_matcher :association_recv_arguments, <<~PATTERN
 | 
			
		||||
@ -40,7 +40,7 @@ module RuboCop
 | 
			
		||||
 | 
			
		||||
        def reflection_class_value?(class_value)
 | 
			
		||||
          if class_value.send_type?
 | 
			
		||||
            !class_value.method?(:to_s) || class_value.receiver.const_type?
 | 
			
		||||
            !class_value.method?(:to_s) || class_value.receiver&.const_type?
 | 
			
		||||
          else
 | 
			
		||||
            !ALLOWED_REFLECTION_CLASS_TYPES.include?(class_value.type)
 | 
			
		||||
          end
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user