From 38006ad93b35382079c8eb8550abeb25cabab9d8 Mon Sep 17 00:00:00 2001 From: Kaan Ozkan Date: Wed, 27 Sep 2023 10:22:01 -0400 Subject: [PATCH] Update gem RBIs --- ...2.18.0.rbi => rubocop-capybara@2.19.0.rbi} | 386 ++++++++++++++++-- ...3.1.rbi => rubocop-factory_bot@2.24.0.rbi} | 190 ++++++--- ...ec@2.24.0.rbi => rubocop-rspec@2.24.1.rbi} | 44 +- 3 files changed, 495 insertions(+), 125 deletions(-) rename sorbet/rbi/gems/{rubocop-capybara@2.18.0.rbi => rubocop-capybara@2.19.0.rbi} (69%) rename sorbet/rbi/gems/{rubocop-factory_bot@2.23.1.rbi => rubocop-factory_bot@2.24.0.rbi} (89%) rename sorbet/rbi/gems/{rubocop-rspec@2.24.0.rbi => rubocop-rspec@2.24.1.rbi} (99%) diff --git a/sorbet/rbi/gems/rubocop-capybara@2.18.0.rbi b/sorbet/rbi/gems/rubocop-capybara@2.19.0.rbi similarity index 69% rename from sorbet/rbi/gems/rubocop-capybara@2.18.0.rbi rename to sorbet/rbi/gems/rubocop-capybara@2.19.0.rbi index 5cad5664e..a67022133 100644 --- a/sorbet/rbi/gems/rubocop-capybara@2.18.0.rbi +++ b/sorbet/rbi/gems/rubocop-capybara@2.19.0.rbi @@ -195,6 +195,68 @@ RuboCop::Cop::Capybara::CapybaraHelp::SPECIFIC_OPTIONS = T.let(T.unsafe(nil), Ha # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#35 RuboCop::Cop::Capybara::CapybaraHelp::SPECIFIC_PSEUDO_CLASSES = T.let(T.unsafe(nil), Array) +# Checks for click button or link style. +# +# @example EnforcedStyle: strict (default) +# # bad +# click_link_or_button('foo') +# click_on('foo') +# +# # good +# click_link('foo') +# click_button('foo') +# @example EnforcedStyle: link_or_button +# # bad +# click_link('foo') +# click_button('foo') +# +# # good +# click_link_or_button('foo') +# click_on('foo') +# +# source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#26 +class RuboCop::Cop::Capybara::ClickLinkOrButtonStyle < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#37 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#62 + def link_or_button_method?(node); end + + # @return [Boolean] + # + # source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#45 + def offense?(node); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#50 + def offense_message(node); end + + # @return [Boolean] + # + # source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#58 + def strict_method?(node); end +end + +# source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#34 +RuboCop::Cop::Capybara::ClickLinkOrButtonStyle::CLICK_LINK_OR_BUTTON = T.let(T.unsafe(nil), Array) + +# source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#31 +RuboCop::Cop::Capybara::ClickLinkOrButtonStyle::MSG_CLICK_LINK_OR_BUTTON = T.let(T.unsafe(nil), String) + +# source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#29 +RuboCop::Cop::Capybara::ClickLinkOrButtonStyle::MSG_STRICT = T.let(T.unsafe(nil), String) + +# source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#35 +RuboCop::Cop::Capybara::ClickLinkOrButtonStyle::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#33 +RuboCop::Cop::Capybara::ClickLinkOrButtonStyle::STRICT_METHODS = T.let(T.unsafe(nil), Array) + # Helps parsing css selector. # # @api private @@ -393,75 +455,73 @@ end # @example # # bad # expect(current_path).to eq('/callback') +# expect(page.current_path).to eq('/callback') # # # good -# expect(page).to have_current_path('/callback') +# expect(page).to have_current_path('/callback', ignore_query: true) # -# # bad (does not support autocorrection) -# expect(page.current_path).to match(variable) +# # bad (does not support autocorrection when `match` with a variable) +# expect(page).to match(variable) # -# # good -# expect(page).to have_current_path('/callback') -# -# source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#31 +# source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#29 class RuboCop::Cop::Capybara::CurrentPathExpectation < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector # Supported matchers: eq(...) / match(/regexp/) / match('regexp') # - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#48 + # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#46 def as_is_matcher(param0 = T.unsafe(nil)); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#42 + # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#40 def expectation_set_on_current_path(param0 = T.unsafe(nil)); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#65 + # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#63 def on_send(node); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#55 + # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#53 def regexp_node_matcher(param0 = T.unsafe(nil)); end private - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#115 + # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#113 def add_argument_parentheses(corrector, arg_node); end # `have_current_path` with no options will include the querystring # while `page.current_path` does not. # This ensures the option `ignore_query: true` is added - # except when the expectation is a regexp or string + # except when `match` matcher. # - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#133 - def add_ignore_query_options(corrector, node); end + # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#131 + def add_ignore_query_options(corrector, node, matcher_node); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#77 + # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#75 def autocorrect(corrector, node); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#101 + # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#99 def convert_regexp_node_to_literal(corrector, matcher_node, regexp_node); end # @return [Boolean] # - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#125 + # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#123 def method_call_with_no_parentheses?(arg_node); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#107 + # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#105 def regexp_node_to_regexp_expr(regexp_node); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#88 + # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#86 def rewrite_expectation(corrector, node, to_symbol, matcher_node); end class << self - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#61 + # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#59 def autocorrect_incompatible_with; end end end -# source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#35 +# source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#33 RuboCop::Cop::Capybara::CurrentPathExpectation::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#39 +# source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#37 RuboCop::Cop::Capybara::CurrentPathExpectation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for usage of deprecated style methods. @@ -577,6 +637,241 @@ RuboCop::Cop::Capybara::NegationMatcher::POSITIVE_MATCHERS = T.let(T.unsafe(nil) # source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#41 RuboCop::Cop::Capybara::NegationMatcher::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/have_selector.rb#6 +module RuboCop::Cop::Capybara::RSpec; end + +# A helper for `explicit` style +# +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#108 +module RuboCop::Cop::Capybara::RSpec::ExplicitHelper + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#138 + def predicate_matcher?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#124 + def allowed_explicit_matchers; end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#128 + def check_explicit(node); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#162 + def corrector_explicit(corrector, to_node, actual, matcher); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#156 + def message_explicit(matcher); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#169 + def move_predicate(corrector, actual, matcher); end + + # @return [Boolean] + # + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#149 + def predicate_matcher_name?(name); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#180 + def replacement_matcher(node); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#176 + def to_predicate_method(matcher); end +end + +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#113 +RuboCop::Cop::Capybara::RSpec::ExplicitHelper::BUILT_IN_MATCHERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#118 +RuboCop::Cop::Capybara::RSpec::ExplicitHelper::INFLECTED_MATCHER = T.let(T.unsafe(nil), Array) + +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#111 +RuboCop::Cop::Capybara::RSpec::ExplicitHelper::MSG_EXPLICIT = T.let(T.unsafe(nil), String) + +# Use `have_css` or `have_xpath` instead of `have_selector`. +# +# @example +# # bad +# expect(foo).to have_selector(:css, 'bar') +# +# # good +# expect(foo).to have_css('bar') +# +# # bad +# expect(foo).to have_selector(:xpath, 'bar') +# +# # good +# expect(foo).to have_xpath('bar') +# @example DefaultSelector: css (default) +# # bad +# expect(foo).to have_selector('bar') +# +# # good +# expect(foo).to have_css('bar') +# @example DefaultSelector: xpath +# # bad +# expect(foo).to have_selector('bar') +# +# # good +# expect(foo).to have_xpath('bar') +# +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/have_selector.rb#36 +class RuboCop::Cop::Capybara::RSpec::HaveSelector < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/have_selector.rb#44 + def on_send(node); end + + private + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/have_selector.rb#80 + def default_selector; end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/have_selector.rb#65 + def deletion_range(first_argument, second_argument); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/have_selector.rb#61 + def message_typed(type); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/have_selector.rb#76 + def message_untyped; end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/have_selector.rb#52 + def on_select_with_type(node, type); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/have_selector.rb#70 + def on_select_without_type(node); end +end + +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/have_selector.rb#40 +RuboCop::Cop::Capybara::RSpec::HaveSelector::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/have_selector.rb#41 +RuboCop::Cop::Capybara::RSpec::HaveSelector::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/have_selector.rb#42 +RuboCop::Cop::Capybara::RSpec::HaveSelector::SELECTORS = T.let(T.unsafe(nil), Array) + +# A helper for `inflected` style +# +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#8 +module RuboCop::Cop::Capybara::RSpec::InflectedHelper + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#46 + def be_bool?(param0 = T.unsafe(nil)); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#51 + def be_boolthy?(param0 = T.unsafe(nil)); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#32 + def predicate_in_actual?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#55 + def boolean_matcher?(node); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#19 + def check_inflected(node); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#67 + def message_inflected(predicate); end + + # @return [Boolean] + # + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#63 + def predicate?(sym); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#77 + def remove_predicate(corrector, predicate); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#85 + def rewrite_matcher(corrector, predicate, matcher); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#73 + def to_predicate_matcher(name); end + + # @return [Boolean] + # + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#94 + def true?(to_symbol, matcher); end +end + +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#11 +RuboCop::Cop::Capybara::RSpec::InflectedHelper::EXPLICIT_MATCHER = T.let(T.unsafe(nil), Array) + +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#14 +RuboCop::Cop::Capybara::RSpec::InflectedHelper::MSG_INFLECTED = T.let(T.unsafe(nil), String) + +# Prefer using predicate matcher over using predicate method directly. +# +# Capybara defines magic matchers for predicate methods. +# This cop recommends to use the predicate matcher instead of using +# predicate method directly. +# +# @example Strict: true, EnforcedStyle: inflected (default) +# # bad +# expect(foo.matches_css?(bar: 'baz')).to be_truthy +# expect(foo.matches_selector?(bar: 'baz')).to be_truthy +# expect(foo.matches_style?(bar: 'baz')).to be_truthy +# expect(foo.matches_xpath?(bar: 'baz')).to be_truthy +# +# # good +# expect(foo).to match_css(bar: 'baz') +# expect(foo).to match_selector(bar: 'baz') +# expect(foo).to match_style(bar: 'baz') +# expect(foo).to match_xpath(bar: 'baz') +# +# # also good - It checks "true" strictly. +# expect(foo.matches_style?(bar: 'baz')).to be(true) +# @example Strict: false, EnforcedStyle: inflected +# # bad +# expect(foo.matches_style?(bar: 'baz')).to be_truthy +# expect(foo.matches_style?(bar: 'baz')).to be(true) +# +# # good +# expect(foo).to match_style(bar: 'baz') +# @example Strict: true, EnforcedStyle: explicit +# # bad +# expect(foo).to match_style(bar: 'baz') +# +# # good - the above code is rewritten to it by this cop +# expect(foo.matches_style?(bar: 'baz')).to be(true) +# @example Strict: false, EnforcedStyle: explicit +# # bad +# expect(foo).to match_style(bar: 'baz') +# +# # good - the above code is rewritten to it by this cop +# expect(foo.matches_style?(bar: 'baz')).to be_truthy +# +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#238 +class RuboCop::Cop::Capybara::RSpec::PredicateMatcher < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::Capybara::RSpec::InflectedHelper + include ::RuboCop::Cop::Capybara::RSpec::ExplicitHelper + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#246 + def on_send(node); end + + private + + # returns args location with whitespace + # + # @example + # foo 1, 2 + # ^^^^^ + # + # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#260 + def args_loc(send_node); end +end + +# source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#244 +RuboCop::Cop::Capybara::RSpec::PredicateMatcher::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for there is a more specific actions offered by Capybara. # # @example @@ -648,68 +943,71 @@ RuboCop::Cop::Capybara::SpecificActions::SPECIFIC_ACTION = T.let(T.unsafe(nil), # @example # # bad # find('#some-id') -# find('[visible][id=some-id]') +# find('[id=some-id]') +# find(:css, '#some-id') # # # good # find_by_id('some-id') -# find_by_id('some-id', visible: true) # # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#17 class RuboCop::Cop::Capybara::SpecificFinders < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#31 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#30 def class_options(param0); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#26 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#25 def find_argument(param0 = T.unsafe(nil)); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#35 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#34 def on_send(node); end private - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#89 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#93 def append_options(classes, options); end # @return [Boolean] # - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#63 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#62 def attribute?(arg); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#79 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#83 def autocorrect_classes(corrector, node, classes); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#116 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#78 + def deletion_range(node); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#120 def end_pos(node); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#94 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#98 def keyword_argument_class(classes); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#112 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#116 def offense_range(node); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#47 - def on_attr(node, arg); end + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#46 + def on_attr(node, sym, arg); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#55 - def on_id(node, arg); end + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#54 + def on_id(node, sym, arg); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#68 - def register_offense(node, id, classes = T.unsafe(nil)); end + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#67 + def register_offense(node, sym, id, classes = T.unsafe(nil)); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#99 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#103 def replaced_arguments(arg, id); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#104 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#108 def to_options(attrs); end end -# source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#22 +# source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#21 RuboCop::Cop::Capybara::SpecificFinders::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#23 +# source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#22 RuboCop::Cop::Capybara::SpecificFinders::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for there is a more specific matcher offered by Capybara. diff --git a/sorbet/rbi/gems/rubocop-factory_bot@2.23.1.rbi b/sorbet/rbi/gems/rubocop-factory_bot@2.24.0.rbi similarity index 89% rename from sorbet/rbi/gems/rubocop-factory_bot@2.23.1.rbi rename to sorbet/rbi/gems/rubocop-factory_bot@2.24.0.rbi index fed875311..da0a7a7f3 100644 --- a/sorbet/rbi/gems/rubocop-factory_bot@2.23.1.rbi +++ b/sorbet/rbi/gems/rubocop-factory_bot@2.24.0.rbi @@ -25,6 +25,16 @@ module RuboCop::Cop::FactoryBot; end # factory :post do # user # end +# +# # bad +# factory :post do +# association :user, :author +# end +# +# # good +# factory :post do +# user factory: %i[user author] +# end # @example EnforcedStyle: explicit # # bad # factory :post do @@ -36,6 +46,16 @@ module RuboCop::Cop::FactoryBot; end # association :user # end # +# # bad +# factory :post do +# user factory: %i[user author] +# end +# +# # good +# factory :post do +# association :user, :author +# end +# # # good (NonImplicitAssociationMethodNames: ['email']) # sequence :email do |n| # "person#{n}@example.com" @@ -45,70 +65,92 @@ module RuboCop::Cop::FactoryBot; end # email # end # -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#43 +# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#63 class RuboCop::Cop::FactoryBot::AssociationStyle < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#71 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#139 + def association_names(param0); end + + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#96 def explicit_association?(param0 = T.unsafe(nil)); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#81 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#113 def factory_option_matcher(param0 = T.unsafe(nil)); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#76 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#108 def implicit_association?(param0 = T.unsafe(nil)); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#57 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#82 def on_send(node); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#102 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#144 + def trait_name(param0); end + + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#134 def trait_names_from_explicit(param0 = T.unsafe(nil)); end + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#101 + def with_strategy_build_option?(param0 = T.unsafe(nil)); end + private - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#106 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#148 def autocorrect(corrector, node); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#114 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#156 def autocorrect_to_explicit_style(corrector, node); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#122 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#164 def autocorrect_to_implicit_style(corrector, node); end # @return [Boolean] # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#132 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#174 def bad?(node); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#140 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#195 def bad_associations_in(node); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#146 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#201 def children_of_factory_block(node); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#158 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#213 def factory_names_from_explicit(node); end # @return [Boolean] # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#168 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#185 + def keyword?(node); end + + # @return [Boolean] + # + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#223 def non_implicit_association_method_name?(method_name); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#172 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#227 def non_implicit_association_method_names; end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#185 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#240 def options_for_autocorrect_to_implicit_style(node); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#177 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#232 def options_from_explicit(node); end + + # @return [Boolean] + # + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#249 + def trait_within_trait?(node); end end -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#48 +# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#68 RuboCop::Cop::FactoryBot::AssociationStyle::DEFAULT_NON_IMPLICIT_ASSOCIATION_METHOD_NAMES = T.let(T.unsafe(nil), Array) -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#55 +# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#76 +RuboCop::Cop::FactoryBot::AssociationStyle::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#75 RuboCop::Cop::FactoryBot::AssociationStyle::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Always declare attribute values as blocks. @@ -372,41 +414,32 @@ class RuboCop::Cop::FactoryBot::CreateList < ::RuboCop::Cop::Base include ::RuboCop::Cop::FactoryBot::ConfigurableExplicitOnly extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#101 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#92 def arguments_include_method_call?(param0 = T.unsafe(nil)); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#77 - def array_new?(param0 = T.unsafe(nil)); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#92 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#83 def block_with_arg_and_used?(param0 = T.unsafe(nil)); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#106 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#97 def factory_call(param0 = T.unsafe(nil)); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#116 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#107 def factory_calls_in_array?(param0); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#111 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#102 def factory_list_call(param0 = T.unsafe(nil)); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#82 - def n_times?(param0 = T.unsafe(nil)); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#87 - def n_times_map?(param0 = T.unsafe(nil)); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#120 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#111 def on_array(node); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#131 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#123 def on_block(node); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#145 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#136 def on_send(node); end # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#72 - def repetition_block?(param0 = T.unsafe(nil)); end + def repeat_count(param0 = T.unsafe(nil)); end private @@ -414,77 +447,82 @@ class RuboCop::Cop::FactoryBot::CreateList < ::RuboCop::Cop::Base # but if it is not appropriate for the configured style, # it will be replaced in the subsequent autocorrection. # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#161 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#160 def autocorrect_same_factory_calls_in_array(corrector, node); end # @return [Boolean] # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#172 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#171 def contains_only_factory?(node); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#180 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#179 def preferred_message_for_array(node); end # @return [Boolean] # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#189 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#151 + def repeat_multiple_time?(node); end + + # @return [Boolean] + # + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#188 def same_factory_calls_in_array?(node); end end # :nodoc # -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#195 +# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#194 module RuboCop::Cop::FactoryBot::CreateList::Corrector private - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#198 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#197 def build_options_string(options); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#202 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#201 def format_method_call(node, method, arguments); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#210 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#209 def format_receiver(receiver); end end -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#255 +# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#254 class RuboCop::Cop::FactoryBot::CreateList::CreateListCorrector include ::RuboCop::Cop::FactoryBot::CreateList::Corrector # @return [CreateListCorrector] a new instance of CreateListCorrector # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#258 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#257 def initialize(node); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#262 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#261 def call(corrector); end private - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#285 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#284 def build_arguments(node, count); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#294 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#293 def call_replacement(node); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#276 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#275 def call_with_block_replacement(node); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#307 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#306 def count_from(node); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#320 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#319 def format_block(node); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#328 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#327 def format_multiline_block(node); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#336 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#335 def format_singleline_block(node); end # Returns the value of attribute node. # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#274 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#273 def node; end end @@ -499,29 +537,29 @@ RuboCop::Cop::FactoryBot::CreateList::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar # :nodoc # -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#218 +# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#217 class RuboCop::Cop::FactoryBot::CreateList::TimesCorrector include ::RuboCop::Cop::FactoryBot::CreateList::Corrector # @return [TimesCorrector] a new instance of TimesCorrector # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#221 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#220 def initialize(node); end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#225 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#224 def call(corrector); end private - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#247 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#246 def factory_call_block_source; end - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#234 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#233 def generate_n_times_block(node); end # Returns the value of attribute node. # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#232 + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#231 def node; end end @@ -686,6 +724,34 @@ RuboCop::Cop::FactoryBot::FactoryNameStyle::MSG = T.let(T.unsafe(nil), String) # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#56 RuboCop::Cop::FactoryBot::FactoryNameStyle::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) +# Do not create a FactoryBot sequence for an id column. +# +# @example +# # bad - can lead to conflicts between FactoryBot and DB sequences +# factory :foo do +# sequence :id +# end +# +# # good - a non-id column +# factory :foo do +# sequence :some_non_id_column +# end +# +# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/id_sequence.rb#19 +class RuboCop::Cop::FactoryBot::IdSequence < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/id_sequence.rb#26 + def on_send(node); end +end + +# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/id_sequence.rb#23 +RuboCop::Cop::FactoryBot::IdSequence::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/id_sequence.rb#24 +RuboCop::Cop::FactoryBot::IdSequence::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for redundant `factory` option. # # @example diff --git a/sorbet/rbi/gems/rubocop-rspec@2.24.0.rbi b/sorbet/rbi/gems/rubocop-rspec@2.24.1.rbi similarity index 99% rename from sorbet/rbi/gems/rubocop-rspec@2.24.0.rbi rename to sorbet/rbi/gems/rubocop-rspec@2.24.1.rbi index 06800f30c..80f60b4b4 100644 --- a/sorbet/rbi/gems/rubocop-rspec@2.24.0.rbi +++ b/sorbet/rbi/gems/rubocop-rspec@2.24.1.rbi @@ -2602,6 +2602,12 @@ end # Checks that spec file paths are consistent and well-formed. # +# This cop is deprecated. +# We plan to remove it in the next major version update to 3.0. +# The migration targets are `RSpec/SpecFilePathSuffix` +# and `RSpec/SpecFilePathFormat`. +# If you are using this cop, please plan for migration. +# # By default, this checks that spec file paths are consistent with the # test subject and enforces that it reflects the described # class/module and its optionally called out method. @@ -2651,78 +2657,78 @@ end # # good # my_class_spec.rb # describe MyClass, '#method' # -# source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#59 +# source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#65 class RuboCop::Cop::RSpec::FilePath < ::RuboCop::Cop::RSpec::Base include ::RuboCop::Cop::RSpec::TopLevelGroup include ::RuboCop::Cop::RSpec::Namespace - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#66 + # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#72 def example_group(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#75 + # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#81 def on_top_level_example_group(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#73 + # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#79 def routing_metadata?(param0); end private - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#136 + # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#142 def camel_to_snake_case(string); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#143 + # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#149 def custom_transform; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#85 + # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#91 def ensure_correct_file_path(send_node, example_group, arguments); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#167 + # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#173 def expanded_file_path; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#126 + # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#132 def expected_path(constant); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#151 + # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#157 def filename_ends_with?(pattern); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#147 + # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#153 def ignore_methods?; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#119 + # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#125 def name_pattern(method_name); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#101 + # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#107 def pattern_for(example_group, arguments); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#115 + # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#121 def pattern_for_spec_suffix_only; end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#155 + # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#161 def relevant_rubocop_rspec_file?(_file); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#97 + # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#103 def routing_spec?(args); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#163 + # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#169 def routing_spec_path?; end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#159 + # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#165 def spec_suffix_only?; end end -# source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#63 +# source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#69 RuboCop::Cop::RSpec::FilePath::MSG = T.let(T.unsafe(nil), String) # Helps find the true end location of nodes which might contain heredocs.