BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
a55e8f10
Commit
a55e8f10
authored
May 30, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable Style/NegatedIf Rubocop cop
Favor `unless` over `if` for negative conditions (or control flow ||). See #17478
parent
43c35b0f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
6 deletions
+6
-6
.rubocop.yml
.rubocop.yml
+1
-1
runner.rb
app/models/ci/runner.rb
+1
-1
git_tag_push_service.rb
app/services/git_tag_push_service.rb
+1
-1
housekeeping_service.rb
app/services/projects/housekeeping_service.rb
+1
-1
1_settings.rb
config/initializers/1_settings.rb
+1
-1
gitlab_ci_yaml_processor.rb
lib/ci/gitlab_ci_yaml_processor.rb
+1
-1
No files found.
.rubocop.yml
View file @
a55e8f10
...
...
@@ -394,7 +394,7 @@ Style/MutableConstant:
# Favor unless over if for negative conditions (or control flow or).
Style/NegatedIf
:
Enabled
:
fals
e
Enabled
:
tru
e
# Favor until over while for negative conditions.
Style/NegatedWhile
:
...
...
app/models/ci/runner.rb
View file @
a55e8f10
...
...
@@ -60,7 +60,7 @@ module Ci
end
def
display_name
return
short_sha
unless
!
description
.
blank?
return
short_sha
if
description
.
blank?
description
end
...
...
app/services/git_tag_push_service.rb
View file @
a55e8f10
...
...
@@ -23,7 +23,7 @@ class GitTagPushService < BaseService
commits
=
[]
message
=
nil
if
!
Gitlab
::
Git
.
blank_ref?
(
params
[
:newrev
])
unless
Gitlab
::
Git
.
blank_ref?
(
params
[
:newrev
])
tag_name
=
Gitlab
::
Git
.
ref_name
(
params
[
:ref
])
tag
=
project
.
repository
.
find_tag
(
tag_name
)
if
tag
&&
tag
.
target
==
params
[
:newrev
]
...
...
app/services/projects/housekeeping_service.rb
View file @
a55e8f10
...
...
@@ -22,7 +22,7 @@ module Projects
end
def
execute
raise
LeaseTaken
if
!
try_obtain_lease
raise
LeaseTaken
unless
try_obtain_lease
GitlabShellOneShotWorker
.
perform_async
(
:gc
,
@project
.
path_with_namespace
)
ensure
...
...
config/initializers/1_settings.rb
View file @
a55e8f10
...
...
@@ -52,7 +52,7 @@ class Settings < Settingslogic
# check that values in `current` (string or integer) is a contant in `modul`.
def
verify_constant_array
(
modul
,
current
,
default
)
values
=
default
||
[]
if
!
current
.
nil?
unless
current
.
nil?
values
=
[]
current
.
each
do
|
constant
|
values
.
push
(
verify_constant
(
modul
,
constant
,
nil
))
...
...
lib/ci/gitlab_ci_yaml_processor.rb
View file @
a55e8f10
...
...
@@ -265,7 +265,7 @@ module Ci
end
def
validate_job_dependencies!
(
name
,
job
)
if
!
validate_array_of_strings
(
job
[
:dependencies
])
unless
validate_array_of_strings
(
job
[
:dependencies
])
raise
ValidationError
,
"
#{
name
}
job: dependencies parameter should be an array of strings"
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