Closed ydah closed 1 year ago
This PR correct offenses for InternalAffairs/LocationExpression and InternalAffairs/RedundantSourceRange.
InternalAffairs/LocationExpression
InternalAffairs/RedundantSourceRange
Offenses: lib/rubocop/cop/capybara/specific_actions.rb:78:52: C: [Corrected] InternalAffairs/LocationExpression: Use source_range instead. receiver.loc.selector.with(end_pos: node.loc.expression.end_pos) ^^^^^^^^^^^^^^ lib/rubocop/cop/capybara/specific_finders.rb:71:51: C: [Corrected] InternalAffairs/LocationExpression: Use source_range instead. corrector.replace(node.first_argument.loc.expression, ^^^^^^^^^^^^^^ lib/rubocop/cop/capybara/specific_finders.rb:120:18: C: [Corrected] InternalAffairs/LocationExpression: Use source_range instead. node.loc.expression.end_pos ^^^^^^^^^^^^^^ 33 files inspected, 3 offenses detected, 3 offenses corrected
Offenses: lib/rubocop/cop/capybara/specific_finders.rb:71:51: C: [Correctable] InternalAffairs/RedundantSourceRange: Remove the redundant source_range. corrector.replace(node.first_argument.source_range, ^^^^^^^^^^^^ 33 files inspected, 1 offense detected, 1 offense autocorrectable Error: Process completed with exit code 1.
Before submitting the PR make sure the following are checked:
main
CHANGELOG.md
bundle exec rake
This PR correct offenses for
InternalAffairs/LocationExpression
andInternalAffairs/RedundantSourceRange
.Before submitting the PR make sure the following are checked:
main
(if not - rebase it).CHANGELOG.md
if the new code introduces user-observable changes.bundle exec rake
) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).