-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Invalid autocorrection (breaks existing code) for Performance/MapCompact
#257
Labels
bug
Something isn't working
Comments
koic
added a commit
to koic/rubocop-performance
that referenced
this issue
Aug 13, 2021
…ompact` This PR fixes an incorrect auto-correct for `Performance/MapCompact` when using multi-line `collection.map { |item| }.compact` as a method argument.
koic
added a commit
to koic/rubocop-performance
that referenced
this issue
Aug 13, 2021
…ompact` This PR fixes an incorrect auto-correct for `Performance/MapCompact` when using multi-line `collection.map { ... }.compact` as a method argument.
koic
added a commit
to koic/rubocop-performance
that referenced
this issue
Aug 13, 2021
…ompact` Fixes rubocop#257. This PR fixes an incorrect auto-correct for `Performance/MapCompact` when using multi-line `collection.map { ... }.compact` as a method argument.
8 tasks
koic
added a commit
to koic/rubocop-performance
that referenced
this issue
Aug 14, 2021
…ompact` Fixes rubocop#257. This PR fixes an incorrect auto-correct for `Performance/MapCompact` when using multi-line `collection.map { ... }.compact` as a method argument.
koic
added a commit
that referenced
this issue
Aug 15, 2021
…rformance_map_compact_cop [Fix #257] Fix an incorrect auto-correct for `Performance/MapCompact`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
I expect rubocop no to break existing code.
Actual behavior
Rubocop breaks existing code.
Steps to reproduce the problem
Given
.rubocop.yml
:And given
test.rb
:When I run
rubocop -A test.rb
, it outputs:And leaves the file as (notice there's no
end
for the filter_map block)RuboCop version
The text was updated successfully, but these errors were encountered: