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

RedundantPredicateMatcher is not a safe autocorrect #2012

Open
luke-hill opened this issue Dec 24, 2024 · 0 comments
Open

RedundantPredicateMatcher is not a safe autocorrect #2012

luke-hill opened this issue Dec 24, 2024 · 0 comments

Comments

@luke-hill
Copy link
Contributor

luke-hill commented Dec 24, 2024

Expected behavior

When using RSpec with autocorrect I assumed it wouldn't break my codebase

Actual behavior

In cucumber-ruby-core it replaced be_match with match. However these weren't correct, because the codebase had defined match? as a method. So the correct behaviour here is to detect that the method match? has been defined, and then not suggest an autocorrect or error here.

Steps to reproduce the problem

cucumber/cucumber-ruby-core@release/v13.0.3...main#diff-146e0d9fad5351a0fc7a77b7bb4e47a19b46a83e67e03c9330cd294077be02abL65)

RuboCop RSpec version

RuboCop version incompatibility found, RuboCop server restarting...
RuboCop server starting on 127.0.0.1:36575.
1.69.2 (using Parser 3.3.6.0, rubocop-ast 1.37.0, analyzing as Ruby 3.0, running on ruby 3.1.6) +server [x86_64-linux]
  - rubocop-packaging 0.5.2
  - rubocop-rake 0.6.0
  - rubocop-rspec 3.0.5
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

No branches or pull requests

1 participant