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
[1.28.0] Problem with ENV.fetch
#10557
Labels
Comments
koic
added a commit
to koic/rubocop
that referenced
this issue
Apr 21, 2022
Fixes rubocop#10557. This PR fixes a false positive for `Style/FetchEnvVar` when `ENV['key']` is a receiver of `||=`.
8 tasks
bbatsov
pushed a commit
that referenced
this issue
Apr 21, 2022
Fixes #10557. This PR fixes a false positive for `Style/FetchEnvVar` when `ENV['key']` is a receiver of `||=`.
8 tasks
ydah
added a commit
to ydah/rubocop
that referenced
this issue
Apr 23, 2022
This PR improves the edge case of `Style/FetchEnvVar`. There are cases that are false positive and true negative, and it eliminates them. false positive cases are as follows: ```ruby ENV['X'] &&= y ``` true negative cases are as follows: ```ruby y ||= ENV['X'] y &&= ENV['X'] ``` This PR follows up on the same issue as the Issue raised at rubocop#10557.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello. Today updated from version 1.27.0 to version 1.28.0. Then I ran
bundle exec rubocop -A
and got this change:Before rubocop, this line looked like this:
This code cannot work. But this code is fixed in this way only after the update.
The text was updated successfully, but these errors were encountered: