Remove Performance/Detect rubocop rule
After upgrading the rubocop-performance gem, we're asked to change this
code:
milestones.select { |milestone| milestone.image.present? }.last
To:
milestones.reverse.find { |milestone| milestone.image.present? }
IMHO the original code is easier to read, so the performance gain isn't
worth it.
This commit is contained in:
@@ -186,9 +186,6 @@ Lint/UselessAssignment:
|
|||||||
Performance/CompareWithBlock:
|
Performance/CompareWithBlock:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
Performance/Detect:
|
|
||||||
Enabled: true
|
|
||||||
|
|
||||||
Performance/DoubleStartEndWith:
|
Performance/DoubleStartEndWith:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user