-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
False positive for Lint/UselessAssignment
when assigning in branch and block
#13395
Comments
Same situation with me. And autofix will change the function's first line from
|
cc @pCosta99 |
I'll take a look throughout the day if no one gets to it first |
pCosta99
added a commit
to pCosta99/rubocop
that referenced
this issue
Nov 1, 2024
…signing in branch and block
pCosta99
added a commit
to pCosta99/rubocop
that referenced
this issue
Nov 1, 2024
…signing in branch and block
pCosta99
added a commit
to pCosta99/rubocop
that referenced
this issue
Nov 1, 2024
…hen assigning in branch and block
pCosta99
added a commit
to pCosta99/rubocop
that referenced
this issue
Nov 1, 2024
…hen assigning in branch and block
Open
8 tasks
Open
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
The following code warns about a unused variable:
I expect no offense for this case. The first assignment is meaningful, removing it will change the output from
false
tonil
. Changed with #13389, not released yet.Actual behavior
RuboCop version
The text was updated successfully, but these errors were encountered: