rubocop / rubocop-capybara

Code style checking for Capybara files.
https://docs.rubocop.org/rubocop-capybara
MIT License
41 stars 8 forks source link

Correct a `InternalAffairs/NodeFirstOrLastArgument` #83

Closed ydah closed 10 months ago

ydah commented 10 months ago

❯ bundle exec rubocop -A Inspecting 40 files .................C......................

Offenses:

lib/rubocop/cop/capybara/specific_finders.rb:79:30: C: [Corrected] InternalAffairs/NodeFirstOrLastArgument: Use #first_argument instead of #arguments[0]. range_between(node.arguments[0].source_range.end_pos, ^^^^^^^^^^^^

40 files inspected, 1 offense detected, 1 offense corrected


Before submitting the PR make sure the following are checked:

If you have created a new cop:

If you have modified an existing cop's configuration options:

pirj commented 10 months ago

Thank you!