Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Suppress
Performance/MapMethodChain
cop's offenses
This PR suppresses the following `Performance/MapMethodChain` cop's offenses: ```console $ bundle exec rubocop (snip) lib/rubocop/ast/node_pattern/node.rb:210:33: C: Performance/MapMethodChain: Use map { |x| x.arity_range.minmax } instead of map method chain. min, max = children.map(&:arity_range).map(&:minmax).transpose.map(&:sum) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lib/rubocop/ast/node_pattern/node.rb:226:39: C: Performance/MapMethodChain: Use map { |x| x.arity_range.minmax } instead of map method chain. minima, maxima = children.map(&:arity_range).map(&:minmax).transpose ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ spec/rubocop/ast/node_pattern/lexer_spec.rb:35:21: C: Performance/MapMethodChain: Use map { |x| x.last.first } instead of map method chain. expect(tokens.map(&:last).map(&:first)).to eq \ ^^^^^^^^^^^^^^^^^^^^^^^^ spec/rubocop/ast/node_pattern/lexer_spec.rb:71:39: C: Performance/MapMethodChain: Use map { |x| x.last.first } instead of map method chain. zz, percent_zz = tokens.last(2).map(&:last).map(&:first) ^^^^^^^^^^^^^^^^^^^^^^^^ spec/rubocop/ast/node_pattern/lexer_spec.rb:81:21: C: Performance/MapMethodChain: Use map { |x| x.last.first } instead of map method chain. expect(tokens.map(&:last).map(&:first)).to eq [:&] ^^^^^^^^^^^^^^^^^^^^^^^^ 163 files inspected, 5 offenses detected ```
- Loading branch information