Commit 27da446c authored by Shubham Kumar's avatar Shubham Kumar

Resolves rubocop offense Style/RedundantSelfAssignment

Fixes auto correct rubocop offenses
parent d9a2c221
......@@ -927,13 +927,6 @@ Style/RedundantRegexpEscape:
Style/RedundantSelf:
Enabled: false
# Offense count: 2
# Cop supports --auto-correct.
Style/RedundantSelfAssignment:
Exclude:
- 'app/models/concerns/issuable.rb'
- 'spec/db/schema_spec.rb'
# Offense count: 213
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
......
......@@ -324,7 +324,7 @@ module Issuable
# This prevents errors when ignored columns are present in the database.
issuable_columns = with_cte ? issue_grouping_columns(use_cte: with_cte) : "#{table_name}.*"
extra_select_columns = extra_select_columns.unshift("(#{highest_priority}) AS highest_priority")
extra_select_columns.unshift("(#{highest_priority}) AS highest_priority")
select(issuable_columns)
.select(extra_select_columns)
......
---
title: Fixes rubocop offenses Style/RedundantSelfAssignment
merge_request:
author: Shubham Kumar (@imskr)
type: fixed
......@@ -115,7 +115,7 @@ RSpec.describe 'Database schema' do
# postgres and mysql both automatically create an index on the primary
# key. Also, the rails connection.indexes() method does not return
# automatically generated indexes (like the primary key index).
first_indexed_column = first_indexed_column.push(primary_key_column)
first_indexed_column.push(primary_key_column)
expect(first_indexed_column.uniq).to include(*foreign_keys_columns)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment