Skip to content
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

Add Performance/ReduceMerge cop #328

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Jan 2, 2023

  1. Add Performance/ReduceMerge cop

    This cop detects and corrects building up a `Hash` using `reduce` and
    `merge`, which creates a new copy of the `Hash` so far on each iteration.
    
    It is preferable to mutate a single `Hash`, successively adding entries,
    ideally avoiding small temporary hashes as well.
    sambostock committed Jan 2, 2023
    Configuration menu
    Copy the full SHA
    1d474dc View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2023

  1. Handle .reduce(Set.new) edge case

    `Set#merge` mutates the receiver, like `Hash#merge!`.
    sambostock committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    299ee4a View commit details
    Browse the repository at this point in the history