brew vendor-gems: commit updates.

This commit is contained in:
BrewTestBot 2022-09-23 18:09:46 +00:00
parent c3ff984beb
commit bbd2d50478
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
131 changed files with 33 additions and 18 deletions

View File

@ -89,7 +89,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.35.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.15.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.16.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.13.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.13.2/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.6.11/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"

View File

@ -76,8 +76,15 @@ module RuboCop
end
def offense_range(node)
range_between(node.loc.selector.begin_pos,
node.loc.end.end_pos)
range_between(node.loc.selector.begin_pos, end_pos(node))
end
def end_pos(node)
if node.loc.end
node.loc.end.end_pos
else
node.loc.expression.end_pos
end
end
end
end

View File

@ -29,20 +29,20 @@ module RuboCop
class VisibilityMatcher < Base
MSG_FALSE = 'Use `:all` or `:hidden` instead of `false`.'
MSG_TRUE = 'Use `:visible` instead of `true`.'
CAPYBARA_MATCHER_METHODS = %i[
have_selector
have_css
have_xpath
have_link
have_button
have_field
have_select
have_table
have_checked_field
have_unchecked_field
have_text
have_content
].freeze
CAPYBARA_MATCHER_METHODS = %w[
button
checked_field
css
field
link
select
selector
table
unchecked_field
xpath
].flat_map do |element|
["have_#{element}".to_sym, "have_no_#{element}".to_sym]
end
RESTRICT_ON_SEND = CAPYBARA_MATCHER_METHODS

View File

@ -49,10 +49,18 @@ module RuboCop
send_pattern('#Expectations.all')
)
# @!method including_any_skip_example?(node)
# @param [RuboCop::AST::Node] node
# @return [Boolean]
def_node_search :including_any_skip_example?, <<~PATTERN
(send nil? {:pending :skip} ...)
PATTERN
# @param [RuboCop::AST::BlockNode] node
def on_block(node)
return unless regular_or_focused_example?(node)
return if including_any_expectation?(node)
return if including_any_skip_example?(node)
add_offense(node)
end

Some files were not shown because too many files have changed in this diff Show More