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/MapIntoArray
misinterprets my class design
#12894
Comments
Style/MapIntoArray
misinterprets my class design
|
@koic auto-correction is not the issue here. The main problem is the wrong complaint. I believe, it should be fixed. Currently, I have to suppress, look: https://github.com/yegor256/factbase/blob/master/lib/factbase/query.rb#L49-L55 |
Fixes rubocop#12894. This PR fixes false positives for `Style/MapIntoArray` when using `each` without receiver with `<<` to build an array.
Ah, sure. In most contexts that this Cop should detect, the receiver is usually not omitted. This means that cases where the receiver is omitted can be considered as not |
…_into_array [Fix #12894] Fix false positives for `Style/MapIntoArray`
This is the code:
This is my config:
Rubocop 1.63.5 complains (which is a wrong complaint):
Then, I run
rubocop -A
and it produced a broken code:The text was updated successfully, but these errors were encountered: