We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Given the original code:
players. map(&:score). compact. max
I expect rubocop -A --only Performance/MapCompact to correct the code to
rubocop -A --only Performance/MapCompact
players. filter_map(&:score). max
Instead, rubocop -A --only Performance/MapCompact corrects the code to
players. filter_map(&:score) max
which ultimately results in
undefined local variable or method `max' for main:Object (NameError)
$ bundle exec rubocop -V 1.14.0 (using Parser 3.0.1.1, rubocop-ast 1.5.0, running on ruby 2.7.3 x86_64-darwin19) - rubocop-performance 1.11.3
The text was updated successfully, but these errors were encountered:
[Fix rubocop#247] Fix an incorrect auto-correct for Performance/MapCo…
dee2a99
…mpact Fixes rubocop#247. This PR fix an incorrect auto-correct for Performance/MapCompact when using multi-line trailing dot method calls.
Performance/MapCompact
[Fix rubocop#247] Fix an incorrect auto-correct for `Performance/MapC…
bf4c866
…ompact` Fixes rubocop#247. This PR fix an incorrect auto-correct for `Performance/MapCompact` when using multi-line trailing dot method calls.
e1b1316
…ompact` Fixes rubocop#247. This PR fixes an incorrect auto-correct for `Performance/MapCompact` when using multi-line trailing dot method calls.
Merge pull request #248 from koic/fix_incorrect_autocorrect_for_perfo…
9b8d2e9
…rmance_map_compact_cop [Fix #247] Fix an incorrect auto-correct for `Performance/MapCompact`
Successfully merging a pull request may close this issue.
Expected behavior
Given the original code:
I expect
rubocop -A --only Performance/MapCompact
to correct the code toActual behavior
Instead,
rubocop -A --only Performance/MapCompact
corrects the code towhich ultimately results in
RuboCop version
The text was updated successfully, but these errors were encountered: