Skip to content

Conversation

ushi-as
Copy link
Contributor

@ushi-as ushi-as commented Oct 2, 2025

The detection of nameless doubles is broken, when methods are specified. This PR fixes it.


Before submitting the PR make sure the following are checked:

  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Updated documentation.
  • Added an entry to the CHANGELOG.md if the new code introduces user-observable changes.
  • The build (bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).

If you have created a new cop:

  • Added the new cop to config/default.yml.
  • The cop is configured as Enabled: pending in config/default.yml.
  • The cop is configured as Enabled: true in .rubocop.yml.
  • The cop documents examples of good and bad code.
  • The tests assert both that bad code is reported and that good code is not reported.
  • Set VersionAdded: "<<next>>" in default/config.yml.

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

  • Set VersionChanged: "<<next>>" in config/default.yml.

@ushi-as ushi-as requested a review from a team as a code owner October 2, 2025 11:04
Copy link
Collaborator

@bquorning bquorning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find

@ushi-as ushi-as force-pushed the fix-detection-of-nameless-doubles branch from 8bb3a46 to 1667b51 Compare October 2, 2025 12:18
ydah added a commit that referenced this pull request Oct 2, 2025
While reviewing the following PR, I noticed that there is no documentation for cop_config in the relevant Cop, so I will add it.
- #2112
@bquorning
Copy link
Collaborator

Let me have a look at the failing CI. It seems unrelated to your changes.

@bquorning
Copy link
Collaborator

CI is fixed now. Please try rebasing on master.

ydah added a commit that referenced this pull request Oct 2, 2025
While reviewing the following PR, I noticed that there is no documentation for cop_config in the relevant Cop, so I will add it.
- #2112
@ushi-as ushi-as force-pushed the fix-detection-of-nameless-doubles branch from 1667b51 to bf983d6 Compare October 5, 2025 18:26
@ushi-as
Copy link
Contributor Author

ushi-as commented Oct 5, 2025

@bquorning thx for fixing the CI. I rebased on master.

@ydah
Copy link
Member

ydah commented Oct 5, 2025

Could you please review the test coverage? Add tests as needed.

@ushi-as ushi-as force-pushed the fix-detection-of-nameless-doubles branch from bf983d6 to 87b00cb Compare October 6, 2025 10:32
@ushi-as ushi-as requested a review from pirj October 6, 2025 10:36
@ushi-as ushi-as force-pushed the fix-detection-of-nameless-doubles branch from 87b00cb to 0549bae Compare October 6, 2025 10:37
@bquorning bquorning merged commit 9b5dd15 into rubocop:master Oct 6, 2025
27 checks passed
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.

4 participants