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
f5cbb44d
Commit
f5cbb44d
authored
Jun 21, 2018
by
gfyoung
Committed by
Clement Ho
Jun 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Follow-up to !19808: Split up for-loop initializations
parent
94ac31e2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
18 deletions
+17
-18
app/assets/javascripts/line_highlighter.js
app/assets/javascripts/line_highlighter.js
+4
-4
app/assets/javascripts/network/branch_graph.js
app/assets/javascripts/network/branch_graph.js
+2
-4
app/assets/javascripts/profile/gl_crop.js
app/assets/javascripts/profile/gl_crop.js
+3
-4
app/assets/javascripts/project_find_file.js
app/assets/javascripts/project_find_file.js
+1
-2
app/assets/javascripts/users_select.js
app/assets/javascripts/users_select.js
+2
-4
changelogs/unreleased/no-multi-assign-follow-up.yml
changelogs/unreleased/no-multi-assign-follow-up.yml
+5
-0
No files found.
app/assets/javascripts/line_highlighter.js
View file @
f5cbb44d
...
@@ -142,14 +142,14 @@ LineHighlighter.prototype.highlightLine = function(lineNumber) {
...
@@ -142,14 +142,14 @@ LineHighlighter.prototype.highlightLine = function(lineNumber) {
//
//
// range - Array containing the starting and ending line numbers
// range - Array containing the starting and ending line numbers
LineHighlighter
.
prototype
.
highlightRange
=
function
(
range
)
{
LineHighlighter
.
prototype
.
highlightRange
=
function
(
range
)
{
var
i
,
lineNumber
,
ref
,
ref1
,
results
;
if
(
range
[
1
])
{
if
(
range
[
1
])
{
results
=
[];
const
results
=
[];
const
ref
=
range
[
0
]
<=
range
[
1
]
?
range
:
range
.
reverse
();
// eslint-disable-next-line no-multi-assign
for
(
let
lineNumber
=
range
[
0
];
lineNumber
<=
ref
[
1
];
lineNumber
+=
1
)
{
for
(
lineNumber
=
i
=
ref
=
range
[
0
],
ref1
=
range
[
1
];
ref
<=
ref1
?
i
<=
ref1
:
i
>=
ref1
;
lineNumber
=
ref
<=
ref1
?
(
i
+=
1
)
:
(
i
-=
1
))
{
results
.
push
(
this
.
highlightLine
(
lineNumber
));
results
.
push
(
this
.
highlightLine
(
lineNumber
));
}
}
return
results
;
return
results
;
}
else
{
}
else
{
return
this
.
highlightLine
(
range
[
0
]);
return
this
.
highlightLine
(
range
[
0
]);
...
...
app/assets/javascripts/network/branch_graph.js
View file @
f5cbb44d
...
@@ -113,8 +113,7 @@ export default (function() {
...
@@ -113,8 +113,7 @@ export default (function() {
});
});
ref
=
this
.
days
;
ref
=
this
.
days
;
// eslint-disable-next-line no-multi-assign
for
(
mm
=
0
,
len
=
ref
.
length
;
mm
<
len
;
mm
+=
1
)
{
for
(
mm
=
j
=
0
,
len
=
ref
.
length
;
j
<
len
;
mm
=
(
j
+=
1
))
{
day
=
ref
[
mm
];
day
=
ref
[
mm
];
if
(
cuday
!==
day
[
0
]
||
cumonth
!==
day
[
1
])
{
if
(
cuday
!==
day
[
0
]
||
cumonth
!==
day
[
1
])
{
// Dates
// Dates
...
@@ -288,8 +287,7 @@ export default (function() {
...
@@ -288,8 +287,7 @@ export default (function() {
ref
=
commit
.
parents
;
ref
=
commit
.
parents
;
results
=
[];
results
=
[];
// eslint-disable-next-line no-multi-assign
for
(
i
=
0
,
len
=
ref
.
length
;
i
<
len
;
i
+=
1
)
{
for
(
i
=
j
=
0
,
len
=
ref
.
length
;
j
<
len
;
i
=
(
j
+=
1
))
{
parent
=
ref
[
i
];
parent
=
ref
[
i
];
parentCommit
=
this
.
preparedCommits
[
parent
[
0
]];
parentCommit
=
this
.
preparedCommits
[
parent
[
0
]];
parentY
=
this
.
offsetY
+
this
.
unitTime
*
parentCommit
.
time
;
parentY
=
this
.
offsetY
+
this
.
unitTime
*
parentCommit
.
time
;
...
...
app/assets/javascripts/profile/gl_crop.js
View file @
f5cbb44d
...
@@ -140,10 +140,9 @@ import _ from 'underscore';
...
@@ -140,10 +140,9 @@ import _ from 'underscore';
binary
=
atob
(
dataURL
.
split
(
'
,
'
)[
1
]);
binary
=
atob
(
dataURL
.
split
(
'
,
'
)[
1
]);
array
=
[];
array
=
[];
// eslint-disable-next-line no-multi-assign
for
(
i
=
0
,
len
=
binary
.
length
;
i
<
len
;
i
+=
1
)
{
for
(
k
=
i
=
0
,
len
=
binary
.
length
;
i
<
len
;
k
=
(
i
+=
1
))
{
v
=
binary
[
i
];
v
=
binary
[
k
];
array
.
push
(
binary
.
charCodeAt
(
i
));
array
.
push
(
binary
.
charCodeAt
(
k
));
}
}
return
new
Blob
([
new
Uint8Array
(
array
)],
{
return
new
Blob
([
new
Uint8Array
(
array
)],
{
type
:
'
image/png
'
type
:
'
image/png
'
...
...
app/assets/javascripts/project_find_file.js
View file @
f5cbb44d
...
@@ -92,8 +92,7 @@ export default class ProjectFindFile {
...
@@ -92,8 +92,7 @@ export default class ProjectFindFile {
this
.
element
.
find
(
"
.tree-table > tbody
"
).
empty
();
this
.
element
.
find
(
"
.tree-table > tbody
"
).
empty
();
results
=
[];
results
=
[];
// eslint-disable-next-line no-multi-assign
for
(
i
=
0
,
len
=
filePaths
.
length
;
i
<
len
;
i
+=
1
)
{
for
(
i
=
j
=
0
,
len
=
filePaths
.
length
;
j
<
len
;
i
=
(
j
+=
1
))
{
filePath
=
filePaths
[
i
];
filePath
=
filePaths
[
i
];
if
(
i
===
20
)
{
if
(
i
===
20
)
{
break
;
break
;
...
...
app/assets/javascripts/users_select.js
View file @
f5cbb44d
...
@@ -259,8 +259,7 @@ function UsersSelect(currentUser, els, options = {}) {
...
@@ -259,8 +259,7 @@ function UsersSelect(currentUser, els, options = {}) {
showDivider
=
0
;
showDivider
=
0
;
if
(
firstUser
)
{
if
(
firstUser
)
{
// Move current user to the front of the list
// Move current user to the front of the list
// eslint-disable-next-line no-multi-assign
for
(
index
=
0
,
len
=
users
.
length
;
index
<
len
;
index
+=
1
)
{
for
(
index
=
j
=
0
,
len
=
users
.
length
;
j
<
len
;
index
=
(
j
+=
1
))
{
obj
=
users
[
index
];
obj
=
users
[
index
];
if
(
obj
.
username
===
firstUser
)
{
if
(
obj
.
username
===
firstUser
)
{
users
.
splice
(
index
,
1
);
users
.
splice
(
index
,
1
);
...
@@ -563,8 +562,7 @@ function UsersSelect(currentUser, els, options = {}) {
...
@@ -563,8 +562,7 @@ function UsersSelect(currentUser, els, options = {}) {
// Move current user to the front of the list
// Move current user to the front of the list
ref
=
data
.
results
;
ref
=
data
.
results
;
// eslint-disable-next-line no-multi-assign
for
(
index
=
0
,
len
=
ref
.
length
;
index
<
len
;
index
+=
1
)
{
for
(
index
=
j
=
0
,
len
=
ref
.
length
;
j
<
len
;
index
=
(
j
+=
1
))
{
obj
=
ref
[
index
];
obj
=
ref
[
index
];
if
(
obj
.
username
===
firstUser
)
{
if
(
obj
.
username
===
firstUser
)
{
data
.
results
.
splice
(
index
,
1
);
data
.
results
.
splice
(
index
,
1
);
...
...
changelogs/unreleased/no-multi-assign-follow-up.yml
0 → 100644
View file @
f5cbb44d
---
title
:
Improve no-multi-assignment fixes after enabling rule
merge_request
:
19915
author
:
gfyoung
type
:
other
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