-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Style/RedundantReturn cop does not detect any offences #12106
Comments
Your code is explicitly an example of a "good" use in the documentation: # good
def test
return something if something_else
end It looks like it was intended to be implemented in the future but never happened. I'll take a look at it now. |
8 tasks
koic
added a commit
to koic/rubocop
that referenced
this issue
Aug 8, 2023
Fixes rubocop#12106. This PR fixes a false negative for `Style/RedundantReturn` when returning value with guard clause and `return` is used.
I had already opened #12108 as a false negative. Thank you. |
bbatsov
pushed a commit
that referenced
this issue
Aug 8, 2023
Fixes #12106. This PR fixes a false negative for `Style/RedundantReturn` when returning value with guard clause and `return` is used.
waiting-for-dev
added a commit
to nebulab/solidus
that referenced
this issue
Aug 9, 2023
Rubocop 1.56 fixed a false negative for `Style/RedundantReturn` cop. See rubocop/rubocop#12106
3 tasks
github-actions bot
pushed a commit
to solidusio/solidus
that referenced
this issue
Aug 10, 2023
Rubocop 1.56 fixed a false negative for `Style/RedundantReturn` cop. See rubocop/rubocop#12106 (cherry picked from commit ddba778)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Actual behavior
I have the following code:
I run rubocop and don't get any offences.
RuboCop version
ydakuka@yauhenid:~/Work/project$ bin/rails_docker rubocop -V 1.55.1 (using Parser 3.2.2.3, rubocop-ast 1.29.0, running on ruby 2.7.8) [x86_64-linux] - rubocop-capybara 2.18.0 - rubocop-factory_bot 2.23.1 - rubocop-performance 1.18.0 - rubocop-rails 2.20.2 - rubocop-rake 0.6.0 - rubocop-rspec 2.23.0 - rubocop-thread_safety 0.5.1
The text was updated successfully, but these errors were encountered: