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

Declare autocorrect as unsafe for RSpec/ReceiveMessages #1687

Merged
merged 1 commit into from
Aug 7, 2023

Conversation

bquorning
Copy link
Collaborator

As suggested in #1677.

I am unsure if I should change VersionChanged for the cop too.


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 modified an existing cop's configuration options:

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

Copy link

@john-h-k john-h-k left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@ydah ydah left a comment

Choose a reason for hiding this comment

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

Thank you!

config/default.yml Show resolved Hide resolved
@ydah
Copy link
Member

ydah commented Aug 7, 2023

We can also follow up after this PR to make autocorrect as safe as possible 👍🏻

@bquorning bquorning force-pushed the receive-messages-has-unsafe-autocorrection branch from 098a426 to 233faf2 Compare August 7, 2023 07:49
@bquorning bquorning merged commit 7e4e0d9 into master Aug 7, 2023
22 checks passed
@bquorning bquorning deleted the receive-messages-has-unsafe-autocorrection branch August 7, 2023 07:52
@pirj
Copy link
Member

pirj commented Aug 7, 2023

Historically I was always against marking cops as unsafe if they were buggy.
The only case when cops should be marked as unsafe is when it is unsafe by design.
Not temporarily. Not in a non-real far fetched scenario.

@ydah
Copy link
Member

ydah commented Aug 7, 2023

Historically I was always against marking cops as unsafe if they were buggy.
The only case when cops should be marked as unsafe is when it is unsafe by design.
Not temporarily. Not in a non-real far fetched scenario.

I agree with you. However, I believe that the case mentioned in the next comment may be difficult to design.
#1677 (comment)
However, it may be "a non-realistic far fetched scenario." 🤔

@bquorning
Copy link
Collaborator Author

Ah sorry @pirj, I only just saw your comment now. I had just merged #1688 and was about to push this change as a bugfix release (but I’ll wait, pending this discussion).

Not temporarily.

My idea was exactly to temporarily mark the cop as unsafe, and then have a potential subsequent PR make the cop safe again. Can you elaborate on why you prefer not having temporarily unsafe cops?

@bquorning bquorning mentioned this pull request Aug 7, 2023
6 tasks
@pirj
Copy link
Member

pirj commented Aug 7, 2023

There’s nothing more permanent than temporary 😅

@bquorning
Copy link
Collaborator Author

Ah yes, that is true. However in this case we have released a bug (claiming the autocorrect is safe) and the fastest way to fix it is to stop claiming the autocorrect is safe. Issue #1677 is still open, so we (someone) can pick it up and implement safe autocorrect.

Would it be ok if I proceed with the v2.23.1 release?

@pirj
Copy link
Member

pirj commented Aug 7, 2023

Please go ahead with the release.

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