Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
[Rule Request] Prefer reduce(into:_:) over reduce(_:_:) #2658
New Issue Checklist
New rule request
The docs say:
See #2657 for some examples.
Enabled by default if we can avoid false positives
I’d love to see a rule like this but I don’t know if I’d enable it by default. If the code isn’t performance critical, there are times when the legibility of the other reduce function makes it worth using it.