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
When checking map(&:method_x).map(&:method_y) line being a definition of another method, an error is reported:
map(&:method_x).map(&:method_y)
1 error occurred: An error occurred while Performance/MapMethodChain cop was inspecting (...)
Inform about the offence / correct the offence.
I get following message after running rubocop -d:
rubocop -d
(x) files inspected, no offenses detected 1 error occurred: An error occurred while Performance/MapMethodChain cop was inspecting (x)
Define a method with 2 map methods chained, like:
def method map(&:method_x).map(&:method_y) end
1.56.3 (using Parser 3.2.2.3, rubocop-ast 1.29.0, running on ruby 3.2.2) [arm64-darwin22] - rubocop-performance 1.19.1 - rubocop-rails 2.21.1
The text was updated successfully, but these errors were encountered:
[Fix rubocop#374] Fix an error for Performance/MapMethodChain
Performance/MapMethodChain
296489d
Fixes rubocop#374. This PR fixes an error for `Performance/MapMethodChain` when using `map` method chain without receiver.
Merge pull request #375 from koic/fix_an_error_for_performance_map_me…
2086a84
…thod_chain [Fix #374] Fix an error for `Performance/MapMethodChain`
Successfully merging a pull request may close this issue.
When checking
map(&:method_x).map(&:method_y)
line being a definition of another method, an error is reported:Expected behavior
Inform about the offence / correct the offence.
Actual behavior
I get following message after running
rubocop -d
:Steps to reproduce the problem
Define a method with 2 map methods chained, like:
RuboCop version
The text was updated successfully, but these errors were encountered: