Actions
Defect #44243
closedFix RuboCop Style/ArrayIntersect offenses
Resolution:
Fixed
Affected version:
Description
This patch fixes Style/ArrayIntersect offenses reported by RuboCop 1.88.2. Both trunk and 7.0-stable are affected.
app/models/issue_query.rb:409:12: C: [Correctable] Style/ArrayIntersect: Use ["#{Issue.table_name}.id ASC", "#{Issue.table_name}.id DESC"].intersect?(order_option) instead of ["#{Issue.table_name}.id ASC", "#{Issue.table_name}.id DESC"].any?{|i| order_option.include?(i)}.
unless ["#{Issue.table_name}.id ASC", "#{Issue.table_name}.id DESC"].any?{|i| order_option.include?(i)}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/issue_query.rb:460:12: C: [Correctable] Style/ArrayIntersect: Use ["#{Issue.table_name}.id ASC", "#{Issue.table_name}.id DESC"].intersect?(order_option) instead of ["#{Issue.table_name}.id ASC", "#{Issue.table_name}.id DESC"].any?{|i| order_option.include?(i)}.
unless ["#{Issue.table_name}.id ASC", "#{Issue.table_name}.id DESC"].any?{|i| order_option.include?(i)}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Files
Updated by Go MAEDA about 2 months ago
- Status changed from New to Resolved
- Assignee set to Go MAEDA
- Resolution set to Fixed
Committed the fix in r24839.
Updated by Go MAEDA about 2 months ago
- Status changed from Resolved to Closed
Merged the fix into 7.0-stable in r24840.
Actions