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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
7ee9b8e7
Commit
7ee9b8e7
authored
May 30, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable Style/MultilineIfThen rubocop cop
Do not use then for multi-line if. See #7478.
parent
43c35b0f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
.rubocop.yml
.rubocop.yml
+1
-1
app/models/network/graph.rb
app/models/network/graph.rb
+5
-5
No files found.
.rubocop.yml
View file @
7ee9b8e7
...
...
@@ -362,7 +362,7 @@ Style/MultilineHashBraceLayout:
# Do not use then for multi-line if/unless.
Style/MultilineIfThen
:
Enabled
:
fals
e
Enabled
:
tru
e
# Checks that the closing brace in a method call is either on the same line as
# the last method argument, or a new line.
...
...
app/models/network/graph.rb
View file @
7ee9b8e7
...
...
@@ -89,7 +89,7 @@ module Network
end
end
if
self
.
class
.
max_count
/
2
<
offset
then
if
self
.
class
.
max_count
/
2
<
offset
# get max index that commit is displayed in the center.
offset
-
self
.
class
.
max_count
/
2
else
...
...
@@ -130,7 +130,7 @@ module Network
commit
.
parents
(
@map
).
each
do
|
parent
|
range
=
commit
.
time
..
parent
.
time
space
=
if
commit
.
space
>=
parent
.
space
then
space
=
if
commit
.
space
>=
parent
.
space
find_free_parent_space
(
range
,
parent
.
space
,
-
1
,
commit
.
space
)
else
find_free_parent_space
(
range
,
commit
.
space
,
-
1
,
parent
.
space
)
...
...
@@ -144,7 +144,7 @@ module Network
end
def
find_free_parent_space
(
range
,
space_base
,
space_step
,
space_default
)
if
is_overlap?
(
range
,
space_default
)
then
if
is_overlap?
(
range
,
space_default
)
find_free_space
(
range
,
space_step
,
space_base
,
space_default
)
else
space_default
...
...
@@ -155,7 +155,7 @@ module Network
range
.
each
do
|
i
|
if
i
!=
range
.
first
&&
i
!=
range
.
last
&&
@commits
[
i
].
spaces
.
include?
(
overlap_space
)
then
@commits
[
i
].
spaces
.
include?
(
overlap_space
)
return
true
;
end
...
...
@@ -233,7 +233,7 @@ module Network
space
=
space_default
while
reserved
.
include?
(
space
)
do
space
+=
space_step
if
space
<
space_base
then
if
space
<
space_base
space_step
*=
-
1
space
=
space_base
+
space_step
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