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
52515a29
Commit
52515a29
authored
Sep 02, 2020
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'empty-literal-cop' into 'master'
Fix Style/EmptyLiteral cop See merge request gitlab-org/gitlab!41110
parents
2d4d8022
7e2d6db9
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
13 additions
and
19 deletions
+13
-19
.rubocop_todo.yml
.rubocop_todo.yml
+0
-11
changelogs/unreleased/empty-literal-cop.yml
changelogs/unreleased/empty-literal-cop.yml
+5
-0
lib/gitlab/fogbugz_import/importer.rb
lib/gitlab/fogbugz_import/importer.rb
+1
-1
lib/gitlab/git/diff_collection.rb
lib/gitlab/git/diff_collection.rb
+1
-1
lib/gitlab/gitaly_client.rb
lib/gitlab/gitaly_client.rb
+1
-1
spec/helpers/merge_requests_helper_spec.rb
spec/helpers/merge_requests_helper_spec.rb
+1
-1
spec/lib/gitlab/workhorse_spec.rb
spec/lib/gitlab/workhorse_spec.rb
+1
-1
spec/requests/api/jobs_spec.rb
spec/requests/api/jobs_spec.rb
+3
-3
No files found.
.rubocop_todo.yml
View file @
52515a29
...
...
@@ -586,17 +586,6 @@ Style/EmptyLambdaParameter:
-
'
app/models/ci/build.rb'
-
'
app/models/ci/runner.rb'
# Offense count: 7
# Cop supports --auto-correct.
Style/EmptyLiteral
:
Exclude
:
-
'
lib/gitlab/fogbugz_import/importer.rb'
-
'
lib/gitlab/git/diff_collection.rb'
-
'
lib/gitlab/gitaly_client.rb'
-
'
spec/helpers/merge_requests_helper_spec.rb'
-
'
spec/lib/gitlab/workhorse_spec.rb'
-
'
spec/requests/api/jobs_spec.rb'
# Offense count: 170
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
...
...
changelogs/unreleased/empty-literal-cop.yml
0 → 100644
View file @
52515a29
---
title
:
Fix Style/EmptyLiteral cop
merge_request
:
41110
author
:
Rajendra Kadam
type
:
fixed
lib/gitlab/fogbugz_import/importer.rb
View file @
52515a29
...
...
@@ -39,7 +39,7 @@ module Gitlab
def
user_map
@user_map
||=
begin
user_map
=
Hash
.
new
user_map
=
{}
import_data
=
project
.
import_data
.
try
(
:data
)
stored_user_map
=
import_data
[
'user_map'
]
if
import_data
user_map
.
update
(
stored_user_map
)
if
stored_user_map
...
...
lib/gitlab/git/diff_collection.rb
View file @
52515a29
...
...
@@ -37,7 +37,7 @@ module Gitlab
@byte_count
=
0
@overflow
=
false
@empty
=
true
@array
=
Array
.
new
@array
=
[]
end
def
each
(
&
block
)
...
...
lib/gitlab/gitaly_client.rb
View file @
52515a29
...
...
@@ -450,7 +450,7 @@ module Gitlab
stack_string
=
Gitlab
::
BacktraceCleaner
.
clean_backtrace
(
caller
).
drop
(
1
).
join
(
"
\n
"
)
Gitlab
::
SafeRequestStore
[
:stack_counter
]
||=
Hash
.
new
Gitlab
::
SafeRequestStore
[
:stack_counter
]
||=
{}
count
=
Gitlab
::
SafeRequestStore
[
:stack_counter
][
stack_string
]
||
0
Gitlab
::
SafeRequestStore
[
:stack_counter
][
stack_string
]
=
count
+
1
...
...
spec/helpers/merge_requests_helper_spec.rb
View file @
52515a29
...
...
@@ -75,7 +75,7 @@ RSpec.describe MergeRequestsHelper do
describe
'#tab_link_for'
do
let
(
:merge_request
)
{
create
(
:merge_request
,
:simple
)
}
let
(
:options
)
{
Hash
.
new
}
let
(
:options
)
{
{}
}
subject
{
tab_link_for
(
merge_request
,
:show
,
options
)
{
'Discussion'
}
}
...
...
spec/lib/gitlab/workhorse_spec.rb
View file @
52515a29
...
...
@@ -71,7 +71,7 @@ RSpec.describe Gitlab::Workhorse do
context
"when the repository doesn't have an archive file path"
do
before
do
allow
(
project
.
repository
).
to
receive
(
:archive_metadata
).
and_return
(
Hash
.
new
)
allow
(
project
.
repository
).
to
receive
(
:archive_metadata
).
and_return
(
{}
)
end
it
"raises an error"
do
...
...
spec/requests/api/jobs_spec.rb
View file @
52515a29
...
...
@@ -56,7 +56,7 @@ RSpec.describe API::Jobs do
end
describe
'GET /projects/:id/jobs'
do
let
(
:query
)
{
Hash
.
new
}
let
(
:query
)
{
{}
}
before
do
|
example
|
unless
example
.
metadata
[
:skip_before_request
]
...
...
@@ -167,7 +167,7 @@ RSpec.describe API::Jobs do
end
describe
'GET /projects/:id/pipelines/:pipeline_id/jobs'
do
let
(
:query
)
{
Hash
.
new
}
let
(
:query
)
{
{}
}
before
do
|
example
|
unless
example
.
metadata
[
:skip_before_request
]
...
...
@@ -296,7 +296,7 @@ RSpec.describe API::Jobs do
project:
downstream_pipeline
.
project
)
end
let
(
:query
)
{
Hash
.
new
}
let
(
:query
)
{
{}
}
before
do
|
example
|
unless
example
.
metadata
[
:skip_before_request
]
...
...
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