Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix #12087] Fix a false positive for Style/ArgumentsForwarding #12101

Conversation

koic
Copy link
Member

@koic koic commented Aug 8, 2023

Fixes #12087, #12089, #12096, and #12100.

This PR fixes false positives for Style/ArgumentsForwarding when leading argument with rest arguments.


Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
  • Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

Fixes rubocop#12087, rubocop#12089, rubocop#12096, and rubocop#12100.

This PR fixes false positives for `Style/ArgumentsForwarding`
when leading argument with rest arguments.
@koic koic force-pushed the fix_false_positives_for_style_arguments_forwarding branch from 42554d7 to 91c35af Compare August 8, 2023 07:14
@bbatsov
Copy link
Collaborator

bbatsov commented Aug 8, 2023

//cc @owst

@owst
Copy link
Contributor

owst commented Aug 8, 2023

Thanks for fixing these issues @koic - I did try to indicate that I've been working (albeit a bit slowly, apologies!) on a fix for these same issues that I think is slightly cleaner by also refactoring some of my original code from #11794

I'll pull it together and open a PR this morning, and we can compare?

@koic
Copy link
Member Author

koic commented Aug 8, 2023

@owst OK, I'll take and review #12103. Thank you.

@koic koic closed this Aug 8, 2023
@koic koic deleted the fix_false_positives_for_style_arguments_forwarding branch August 8, 2023 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Style/ArgumentsForwarding mis-corrects when the called method has additional arguments.
3 participants