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
349949b1
Commit
349949b1
authored
Sep 02, 2020
by
Rajendra Kadam
Committed by
Rémy Coutable
Sep 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Style/SelfAssignment cop
parent
7184f293
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
12 deletions
+9
-12
.rubocop_todo.yml
.rubocop_todo.yml
+0
-8
app/models/concerns/bulk_member_access_load.rb
app/models/concerns/bulk_member_access_load.rb
+1
-1
app/serializers/base_serializer.rb
app/serializers/base_serializer.rb
+1
-1
changelogs/unreleased/self-assign-cop.yml
changelogs/unreleased/self-assign-cop.yml
+5
-0
spec/support/import_export/configuration_helper.rb
spec/support/import_export/configuration_helper.rb
+2
-2
No files found.
.rubocop_todo.yml
View file @
349949b1
...
...
@@ -818,14 +818,6 @@ Style/RescueModifier:
Style/RescueStandardError
:
Enabled
:
false
# Offense count: 4
# Cop supports --auto-correct.
Style/SelfAssignment
:
Exclude
:
-
'
app/models/concerns/bulk_member_access_load.rb'
-
'
app/serializers/base_serializer.rb'
-
'
spec/support/import_export/configuration_helper.rb'
# Offense count: 50
# Cop supports --auto-correct.
# Configuration parameters: AllowIfMethodIsEmpty.
...
...
app/models/concerns/bulk_member_access_load.rb
View file @
349949b1
...
...
@@ -22,7 +22,7 @@ module BulkMemberAccessLoad
end
# Look up only the IDs we need
resource_ids
=
resource_ids
-
access
.
keys
resource_ids
-=
access
.
keys
return
access
if
resource_ids
.
empty?
...
...
app/serializers/base_serializer.rb
View file @
349949b1
...
...
@@ -9,7 +9,7 @@ class BaseSerializer
end
def
represent
(
resource
,
opts
=
{},
entity_class
=
nil
)
entity_class
=
entity_class
||
self
.
class
.
entity_class
entity_class
||=
self
.
class
.
entity_class
entity_class
.
represent
(
resource
,
opts
.
merge
(
request:
@request
))
...
...
changelogs/unreleased/self-assign-cop.yml
0 → 100644
View file @
349949b1
---
title
:
Fix Style/SelfAssignment cop
merge_request
:
41079
author
:
Rajendra Kadam
type
:
fixed
spec/support/import_export/configuration_helper.rb
View file @
349949b1
...
...
@@ -44,8 +44,8 @@ module ConfigurationHelper
import_export_config
=
config_hash
(
config
)
excluded_attributes
=
import_export_config
[
:excluded_attributes
][
relation_name
.
to_sym
]
included_attributes
=
import_export_config
[
:included_attributes
][
relation_name
.
to_sym
]
attributes
=
attributes
-
Gitlab
::
Json
.
parse
(
excluded_attributes
.
to_json
)
if
excluded_attributes
attributes
=
attributes
&
Gitlab
::
Json
.
parse
(
included_attributes
.
to_json
)
if
included_attributes
attributes
-=
Gitlab
::
Json
.
parse
(
excluded_attributes
.
to_json
)
if
excluded_attributes
attributes
&=
Gitlab
::
Json
.
parse
(
included_attributes
.
to_json
)
if
included_attributes
attributes
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