Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
27da446c
Commit
27da446c
authored
Mar 30, 2021
by
Shubham Kumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolves rubocop offense Style/RedundantSelfAssignment
Fixes auto correct rubocop offenses
parent
d9a2c221
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
9 deletions
+7
-9
.rubocop_todo.yml
.rubocop_todo.yml
+0
-7
app/models/concerns/issuable.rb
app/models/concerns/issuable.rb
+1
-1
changelogs/unreleased/pl-rubocop-todo-redundant-self-assignment.yml
.../unreleased/pl-rubocop-todo-redundant-self-assignment.yml
+5
-0
spec/db/schema_spec.rb
spec/db/schema_spec.rb
+1
-1
No files found.
.rubocop_todo.yml
View file @
27da446c
...
@@ -927,13 +927,6 @@ Style/RedundantRegexpEscape:
...
@@ -927,13 +927,6 @@ Style/RedundantRegexpEscape:
Style/RedundantSelf
:
Style/RedundantSelf
:
Enabled
:
false
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
# Offense count: 213
# Cop supports --auto-correct.
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
...
...
app/models/concerns/issuable.rb
View file @
27da446c
...
@@ -324,7 +324,7 @@ module Issuable
...
@@ -324,7 +324,7 @@ module Issuable
# This prevents errors when ignored columns are present in the database.
# This prevents errors when ignored columns are present in the database.
issuable_columns
=
with_cte
?
issue_grouping_columns
(
use_cte:
with_cte
)
:
"
#{
table_name
}
.*"
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
(
issuable_columns
)
.
select
(
extra_select_columns
)
.
select
(
extra_select_columns
)
...
...
changelogs/unreleased/pl-rubocop-todo-redundant-self-assignment.yml
0 → 100644
View file @
27da446c
---
title
:
Fixes rubocop offenses Style/RedundantSelfAssignment
merge_request
:
author
:
Shubham Kumar (@imskr)
type
:
fixed
spec/db/schema_spec.rb
View file @
27da446c
...
@@ -115,7 +115,7 @@ RSpec.describe 'Database schema' do
...
@@ -115,7 +115,7 @@ RSpec.describe 'Database schema' do
# postgres and mysql both automatically create an index on the primary
# postgres and mysql both automatically create an index on the primary
# key. Also, the rails connection.indexes() method does not return
# key. Also, the rails connection.indexes() method does not return
# automatically generated indexes (like the primary key index).
# 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
)
expect
(
first_indexed_column
.
uniq
).
to
include
(
*
foreign_keys_columns
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment